From: "Michael Büsch" <mb@bu3sch.de>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
b43-dev@lists.infradead.org
Subject: [PATCH 3/3] b43: N-PHY: don't duplicate setting channel in shared memory
Date: Wed, 06 Oct 2010 17:30:40 +0200 [thread overview]
Message-ID: <1286379040.11721.1.camel@maggie> (raw)
In-Reply-To: <1286344208-32479-4-git-send-email-zajec5@gmail.com> (sfid-20101006_015010_704414_EB285C04)
On Wed, 2010-10-06 at 07:50 +0200, Rafa? Mi?ecki wrote:
> It's already set in PHY common code.
>
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
> ---
> drivers/net/wireless/b43/phy_n.c | 13 +++----------
> 1 files changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
> index 47c58cd..bb8cb36 100644
> --- a/drivers/net/wireless/b43/phy_n.c
> +++ b/drivers/net/wireless/b43/phy_n.c
> @@ -73,8 +73,6 @@ static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field,
> u16 value, u8 core, bool off);
> static void b43_nphy_rf_control_intc_override(struct b43_wldev *dev, u8 field,
> u16 value, u8 core);
> -static int b43_nphy_op_switch_channel(struct b43_wldev *dev,
> - unsigned int new_channel);
>
> static inline bool b43_empty_chanspec(struct b43_chanspec *chanspec)
> {
> @@ -224,7 +222,7 @@ static void b43_radio_init2055_post(struct b43_wldev *dev)
> if (i)
> b43err(dev->wl, "radio post init timeout\n");
> b43_radio_mask(dev, B2055_CAL_LPOCTL, 0xFF7F);
> - b43_nphy_op_switch_channel(dev, dev->phy.channel);
> + b43_switch_channel(dev, dev->phy.channel);
> b43_radio_write(dev, B2055_C1_RX_BB_LPF, 0x9);
> b43_radio_write(dev, B2055_C2_RX_BB_LPF, 0x9);
> b43_radio_write(dev, B2055_C1_RX_BB_MIDACHP, 0x83);
> @@ -3352,12 +3350,7 @@ static void b43_nphy_chanspec_setup(struct b43_wldev *dev,
>
> b43_chantab_phy_upload(dev, e);
>
> - tmp = chanspec.channel;
> - if (chanspec.b_freq == 1)
> - tmp |= 0x0100;
> - if (chanspec.b_width == 3)
> - tmp |= 0x0200;
> - b43_shm_write16(dev, B43_SHM_SHARED, 0xA0, tmp);
> + /* Don't follow specs, B43_SHM_SH_CHAN is set by b43_switch_channel */
Looks great. I dunno if a comment is really needed and whether it is
correct, though. We _do_ follow the specs. We just do it elsewhere.
> if (nphy->radio_chanspec.channel == 14) {
> b43_nphy_classifier(dev, 2, 0);
> @@ -3559,7 +3552,7 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev,
> } else {
> if (dev->phy.rev >= 3) {
> b43_radio_init2056(dev);
> - b43_nphy_op_switch_channel(dev, dev->phy.channel);
> + b43_switch_channel(dev, dev->phy.channel);
> } else {
> b43_radio_init2055(dev);
> }
--
Greetings Michael.
next prev parent reply other threads:[~2010-10-06 15:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 5:50 [PATCH 0/3] b43: channel switching little cleaning Rafał Miłecki
2010-10-06 5:50 ` [PATCH 1/3] b43: N-PHY: simplify channel switching Rafał Miłecki
2010-10-06 5:50 ` [PATCH 2/3] b43: define B43_SHM_SH_CHAN_40MHZ Rafał Miłecki
2010-10-06 5:50 ` [PATCH 3/3] b43: N-PHY: don't duplicate setting channel in shared memory Rafał Miłecki
2010-10-06 15:30 ` Michael Büsch [this message]
2010-10-06 16:07 ` Rafał Miłecki
2010-10-06 20:18 ` John W. Linville
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=1286379040.11721.1.camel@maggie \
--to=mb@bu3sch.de \
--cc=b43-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=zajec5@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).