Skip to contentSkip to conversation

b43: fill ctl1 word on all new PHYs, fix PHY errors

PATCH Superseded Rafał Miłecki 2 participants 2 messages Oct 16, 2011 – Oct 17, 2011 Networking drivers (wireless)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b43: fill ctl1 word on all new PHYs, fix PHY errors

This fixes PHY transmission errors reported on some LP-PHY and HT-PHY cards. For LP-PHY they were quite rare and not really noticable. On HT-PHY they were critical, OFDM rates were not available at all.

---
I've this patch since August or earlier, just didn't submit it yet. It was succesfully tested on LP-PHY cards and fixed performance for every tested HT-PHY case.

---
 drivers/net/wireless/b43/xmit.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/b43/xmit.c +3 -2
index c73e860..390c234 100644
@@ -175,6 +175,7 @@ void b43_generate_plcp_hdr(struct b43_plcp_hdr4 *plcp,
 	}
 }
 
+/* TODO: verify for SSLPN and LCN if support is implemented */
 static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate)
 {
 	const struct b43_phy *phy = &dev->phy;
@@ -531,7 +532,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
 			extra_ft |= B43_TXH_EFT_RTSFB_CCK;
 
 		if (rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS &&
-		    phy->type == B43_PHYTYPE_N) {
+		    phy->type >= B43_PHYTYPE_N) {
 			txhdr->phy_ctl1_rts = cpu_to_le16(
 				b43_generate_tx_phy_ctl1(dev, rts_rate));
 			txhdr->phy_ctl1_rts_fb = cpu_to_le16(
@@ -552,7 +553,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
 		break;
 	}
 
-	if (phy->type == B43_PHYTYPE_N) {
+	if (phy->type >= B43_PHYTYPE_N) {
 		txhdr->phy_ctl1 =
 			cpu_to_le16(b43_generate_tx_phy_ctl1(dev, rate));
 		txhdr->phy_ctl1_fb =
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 b43: fill ctl1 word on all new PHYs, fix PHY errors

drivers/net/wireless/b43/xmit.c int b43_generate_txhdr(struct b43_wldev *dev, · line 556

Quoted 1 line · On Sun, 16 Oct 2011 23:23:56 +0200 Rafa? Mi?ecki <[email protected]> wrote:
drivers/net/wireless/b43/xmit.c +1 -0
+	if (phy->type >= B43_PHYTYPE_N) {

I must say that I really dislike this. It's error prone (previous patch got it wrong) and it's hard to read. Just spell out all types or use a switch statement, as appropriate. It also makes grepping the sources a lot harder.
I don't see any real advantage.

Signature · 1 line
Greetings, Michael.