All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gertjan van Wingerde <gwingerde@gmail.com>
To: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: John Linville <linville@tuxdriver.com>,
	Ivo van Doorn <ivdoorn@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rt2x00: rt2800: use tx_power2 in rt2800_config_channel_rf3xxx
Date: Fri, 23 Apr 2010 17:25:18 +0200	[thread overview]
Message-ID: <4BD1BBDE.7080607@gmail.com> (raw)
In-Reply-To: <201004231554.43474.helmut.schaa@googlemail.com>

On 04/23/10 15:54, Helmut Schaa wrote:
> Get closer to what the ralink driver does by setting the rf register 13
> to tx_power2 during channel switch.
> 
> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

Good catch.

Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>

> ---
> 
> Just found that difference between rt2x00 and the ralink driver.
> However I couldn't see any obvious improvements. So, this change
> is mostly for completeness.
> 
>  drivers/net/wireless/rt2x00/rt2800.h    |    5 +++++
>  drivers/net/wireless/rt2x00/rt2800lib.c |    5 +++++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
> index ec89372..1c59dc6 100644
> --- a/drivers/net/wireless/rt2x00/rt2800.h
> +++ b/drivers/net/wireless/rt2x00/rt2800.h
> @@ -1566,6 +1566,11 @@ struct mac_iveiv_entry {
>  #define RFCSR12_TX_POWER		FIELD8(0x1f)
>  
>  /*
> + * RFCSR 13:
> + */
> +#define RFCSR13_TX_POWER		FIELD8(0x1f)
> +
> +/*
>   * RFCSR 15:
>   */
>  #define RFCSR15_TX_LO2_EN		FIELD8(0x08)
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index aa02ff6..3ee9882 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -794,6 +794,11 @@ static void rt2800_config_channel_rf3xxx(struct rt2x00_dev *rt2x00dev,
>  			  TXPOWER_G_TO_DEV(info->tx_power1));
>  	rt2800_rfcsr_write(rt2x00dev, 12, rfcsr);
>  
> +	rt2800_rfcsr_read(rt2x00dev, 13, &rfcsr);
> +	rt2x00_set_field8(&rfcsr, RFCSR13_TX_POWER,
> +			  TXPOWER_G_TO_DEV(info->tx_power2));
> +	rt2800_rfcsr_write(rt2x00dev, 13, rfcsr);
> +
>  	rt2800_rfcsr_read(rt2x00dev, 23, &rfcsr);
>  	rt2x00_set_field8(&rfcsr, RFCSR23_FREQ_OFFSET, rt2x00dev->freq_offset);
>  	rt2800_rfcsr_write(rt2x00dev, 23, rfcsr);


  reply	other threads:[~2010-04-23 15:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23 13:54 [PATCH] rt2x00: rt2800: use tx_power2 in rt2800_config_channel_rf3xxx Helmut Schaa
2010-04-23 15:25 ` Gertjan van Wingerde [this message]
2010-04-23 18:01 ` Ivo van Doorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD1BBDE.7080607@gmail.com \
    --to=gwingerde@gmail.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.