All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Calaby <julian.calaby@gmail.com>
To: Ivo van Doorn <ivdoorn@gmail.com>,
	Gertjan van Wingerde <gwingerde@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [PATCH 1/7] rt2x00: Enable PA_PE bits in TX_PIN_CFG according to active band.
Date: Thu, 19 May 2011 09:24:15 +1000	[thread overview]
Message-ID: <BANLkTim7MSG7NYJ8Kk7Nm=1V=bx=55z60Q@mail.gmail.com> (raw)
In-Reply-To: <201105182025.05979.IvDoorn@gmail.com>

Gertjan, Ivo,

Minor nit

On Thu, May 19, 2011 at 04:25, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 93fb674..1cad89e 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -1795,8 +1795,10 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
>
>        /* Turn on unused PA or LNA when not using 1T or 1R */
>        if (rt2x00dev->default_ant.tx_chain_num == 2) {
> -               rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A1_EN, 1);
> -               rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G1_EN, 1);
> +               rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A1_EN,
> +                                  rf->channel > 14);
> +               rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G1_EN,
> +                                  rf->channel <= 14);

Aren't there better ways to determine the band from the channel?

I recall that there were some patches floating around relating to
supporting Japanese channels (802.11j ?) which (IIRC) use channel 14
in both bands - I'm not sure if this is applicable here, but would it
not be better to get the actual band from mac/cfg80211 and switch
based on that instead of on the channel number?

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

  reply	other threads:[~2011-05-18 23:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 18:25 [PATCH 1/7] rt2x00: Enable PA_PE bits in TX_PIN_CFG according to active band Ivo van Doorn
2011-05-18 23:24 ` Julian Calaby [this message]
2011-05-19 11:16   ` 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='BANLkTim7MSG7NYJ8Kk7Nm=1V=bx=55z60Q@mail.gmail.com' \
    --to=julian.calaby@gmail.com \
    --cc=gwingerde@gmail.com \
    --cc=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=users@rt2x00.serialmonkey.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.