From: "Michael Büsch" <m@bues.ch>
To: Adrian Chadd <adrian@freebsd.org>
Cc: b43-dev@lists.infradead.org,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Kalle Valo <kvalo@codeaurora.org>
Subject: [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM.
Date: Sun, 15 May 2016 16:32:17 +0200 [thread overview]
Message-ID: <20160515163217.2b75ba97@wiggum> (raw)
In-Reply-To: <CAJ-Vmom45Pb9X_1Zw6VdszZAiizZUUd=HbEFw0hFMmPFFSNbpQ@mail.gmail.com>
On Sun, 15 May 2016 07:23:25 -0700
Adrian Chadd <adrian@freebsd.org> wrote:
> Author: Adrian Chadd <adrian@freebsd.org>
> Date: Sun May 15 07:15:54 2016 -0700
>
> [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM.
>
> Check the current PHY operating mode (gmode) to see if we should
> fall back from 6MB OFDM to 11MB CCK. For 5GHz operation this isn't
> allowed.
>
> Note, the fallback lookup is only done for RTS rates; normal fallback
> rates are done via mac80211 and aren't affected by this change.
>
> Signed-off-by: Adrian Chadd <adrian@freebsd.org>
This makes sense. I guess you tested this on actual hardware?
In the final submission please send this to Kalle Valo and add [PATCH]
to the subject, so tools can pick this up.
> diff --git a/drivers/net/wireless/broadcom/b43/xmit.c
> b/drivers/net/wireless/broadcom/b43/xmit.c
> index f620126..fbf0e92 100644
> --- a/drivers/net/wireless/broadcom/b43/xmit.c
> +++ b/drivers/net/wireless/broadcom/b43/xmit.c
> @@ -205,7 +205,7 @@ static u16 b43_generate_tx_phy_ctl1(struct
> b43_wldev *dev, u8 bitrate)
> return control;
> }
>
> -static u8 b43_calc_fallback_rate(u8 bitrate)
> +static u8 b43_calc_fallback_rate(u8 bitrate, int gmode)
> {
> switch (bitrate) {
> case B43_CCK_RATE_1MB:
> @@ -216,8 +216,16 @@ static u8 b43_calc_fallback_rate(u8 bitrate)
> return B43_CCK_RATE_2MB;
> case B43_CCK_RATE_11MB:
> return B43_CCK_RATE_5MB;
> +
> + /*
> + * Don't just fallback to CCK; it may be in 5GHz operation
> + * and falling back to CCK won't work out very well.
> + */
> case B43_OFDM_RATE_6MB:
> - return B43_CCK_RATE_5MB;
> + if (gmode)
> + return B43_CCK_RATE_5MB;
> + else
> + return B43_OFDM_RATE_6MB;
> case B43_OFDM_RATE_9MB:
> return B43_OFDM_RATE_6MB;
> case B43_OFDM_RATE_12MB:
> @@ -438,7 +446,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
>
> rts_rate = rts_cts_rate ? rts_cts_rate->hw_value :
> B43_CCK_RATE_1MB;
> rts_rate_ofdm = b43_is_ofdm_rate(rts_rate);
> - rts_rate_fb = b43_calc_fallback_rate(rts_rate);
> + rts_rate_fb = b43_calc_fallback_rate(rts_rate, phy->gmode);
> rts_rate_fb_ofdm = b43_is_ofdm_rate(rts_rate_fb);
>
> if (rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20160515/c119f07f/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: "Michael Büsch" <m@bues.ch>
To: Adrian Chadd <adrian@freebsd.org>
Cc: b43-dev@lists.infradead.org,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Kalle Valo <kvalo@codeaurora.org>
Subject: Re: [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM.
Date: Sun, 15 May 2016 16:32:17 +0200 [thread overview]
Message-ID: <20160515163217.2b75ba97@wiggum> (raw)
In-Reply-To: <CAJ-Vmom45Pb9X_1Zw6VdszZAiizZUUd=HbEFw0hFMmPFFSNbpQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2600 bytes --]
On Sun, 15 May 2016 07:23:25 -0700
Adrian Chadd <adrian@freebsd.org> wrote:
> Author: Adrian Chadd <adrian@freebsd.org>
> Date: Sun May 15 07:15:54 2016 -0700
>
> [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM.
>
> Check the current PHY operating mode (gmode) to see if we should
> fall back from 6MB OFDM to 11MB CCK. For 5GHz operation this isn't
> allowed.
>
> Note, the fallback lookup is only done for RTS rates; normal fallback
> rates are done via mac80211 and aren't affected by this change.
>
> Signed-off-by: Adrian Chadd <adrian@freebsd.org>
This makes sense. I guess you tested this on actual hardware?
In the final submission please send this to Kalle Valo and add [PATCH]
to the subject, so tools can pick this up.
> diff --git a/drivers/net/wireless/broadcom/b43/xmit.c
> b/drivers/net/wireless/broadcom/b43/xmit.c
> index f620126..fbf0e92 100644
> --- a/drivers/net/wireless/broadcom/b43/xmit.c
> +++ b/drivers/net/wireless/broadcom/b43/xmit.c
> @@ -205,7 +205,7 @@ static u16 b43_generate_tx_phy_ctl1(struct
> b43_wldev *dev, u8 bitrate)
> return control;
> }
>
> -static u8 b43_calc_fallback_rate(u8 bitrate)
> +static u8 b43_calc_fallback_rate(u8 bitrate, int gmode)
> {
> switch (bitrate) {
> case B43_CCK_RATE_1MB:
> @@ -216,8 +216,16 @@ static u8 b43_calc_fallback_rate(u8 bitrate)
> return B43_CCK_RATE_2MB;
> case B43_CCK_RATE_11MB:
> return B43_CCK_RATE_5MB;
> +
> + /*
> + * Don't just fallback to CCK; it may be in 5GHz operation
> + * and falling back to CCK won't work out very well.
> + */
> case B43_OFDM_RATE_6MB:
> - return B43_CCK_RATE_5MB;
> + if (gmode)
> + return B43_CCK_RATE_5MB;
> + else
> + return B43_OFDM_RATE_6MB;
> case B43_OFDM_RATE_9MB:
> return B43_OFDM_RATE_6MB;
> case B43_OFDM_RATE_12MB:
> @@ -438,7 +446,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
>
> rts_rate = rts_cts_rate ? rts_cts_rate->hw_value :
> B43_CCK_RATE_1MB;
> rts_rate_ofdm = b43_is_ofdm_rate(rts_rate);
> - rts_rate_fb = b43_calc_fallback_rate(rts_rate);
> + rts_rate_fb = b43_calc_fallback_rate(rts_rate, phy->gmode);
> rts_rate_fb_ofdm = b43_is_ofdm_rate(rts_rate_fb);
>
> if (rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-15 14:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-15 14:23 [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM Adrian Chadd
2016-05-15 14:32 ` Michael Büsch [this message]
2016-05-15 14:32 ` Michael Büsch
2016-05-16 11:41 ` Kalle Valo
2016-05-16 11:41 ` Kalle Valo
2016-05-15 14:39 ` Michael Büsch
2016-05-15 14:39 ` Michael Büsch
2016-05-15 14:44 ` Adrian Chadd
2016-05-15 14:44 ` Adrian Chadd
2016-05-15 17:09 ` Rafał Miłecki
2016-05-15 17:09 ` Rafał Miłecki
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=20160515163217.2b75ba97@wiggum \
--to=m@bues.ch \
--cc=adrian@freebsd.org \
--cc=b43-dev@lists.infradead.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/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.