linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] b43: don't fall back to CCK rates on 5GHz OFDM for RTS frames
@ 2016-05-17  3:25 Adrian Chadd
  2016-05-17  3:25 ` [PATCH] [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM Adrian Chadd
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Chadd @ 2016-05-17  3:25 UTC (permalink / raw)
  To: linux-wireless; +Cc: Adrian Chadd, Kalle Valo, b43-dev

This fixes a small issue with selecting fallback rates for
RTS frames.  For OFDM PHY rates in 5GHz mode we shouldn't
fall back to CCK.

Adrian Chadd (1):
  [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM.

 drivers/net/wireless/broadcom/b43/xmit.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

-- 
2.6.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM.
  2016-05-17  3:25 [PATCH] b43: don't fall back to CCK rates on 5GHz OFDM for RTS frames Adrian Chadd
@ 2016-05-17  3:25 ` Adrian Chadd
  2016-05-17  4:47   ` Kalle Valo
  2016-06-04 15:00   ` b43: " Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Adrian Chadd @ 2016-05-17  3:25 UTC (permalink / raw)
  To: linux-wireless; +Cc: Adrian Chadd, Kalle Valo, b43-dev

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>
---
 drivers/net/wireless/broadcom/b43/xmit.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43/xmit.c b/drivers/net/wireless/broadcom/b43/xmit.c
index f620126..7edbcdb 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,15 @@ 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 +445,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) {
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM.
  2016-05-17  3:25 ` [PATCH] [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM Adrian Chadd
@ 2016-05-17  4:47   ` Kalle Valo
  2016-06-04 15:00   ` b43: " Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2016-05-17  4:47 UTC (permalink / raw)
  To: Adrian Chadd; +Cc: linux-wireless, b43-dev

Adrian Chadd <adrian@freebsd.org> writes:

> 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>

Two cosmetic problems: s/\[b43\]/b43: / and remove the tab before the
S-o-b. I can fix them before applying. But most probably I'll apply this
only after the merge window closes, in two weeks or so.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: b43: don't unconditionally fall back to CCK if the rate is 6MB OFDM.
  2016-05-17  3:25 ` [PATCH] [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM Adrian Chadd
  2016-05-17  4:47   ` Kalle Valo
@ 2016-06-04 15:00   ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2016-06-04 15:00 UTC (permalink / raw)
  To: Adrian Chadd; +Cc: linux-wireless, Adrian Chadd, b43-dev

Adrian Chadd <adrian@freebsd.org> wrote:
> 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>

Thanks, 1 patch applied to wireless-drivers-next.git:

d0b03439f784 b43: don't unconditionally fall back to CCK if the rate is 6MB OFDM.

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9108351/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-04 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-17  3:25 [PATCH] b43: don't fall back to CCK rates on 5GHz OFDM for RTS frames Adrian Chadd
2016-05-17  3:25 ` [PATCH] [b43] don't unconditionally fall back to CCK if the rate is 6MB OFDM Adrian Chadd
2016-05-17  4:47   ` Kalle Valo
2016-06-04 15:00   ` b43: " Kalle Valo

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).