diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-10-17 10:59:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-07 13:19:12 -0500 |
commit | 694718d8ad2f0b11d7376f8aa32b1befff6e5966 (patch) | |
tree | 5153705c9c5933c572e4a78827bcd1a63692ad9d /drivers | |
parent | 54d5026e7c173edae8a27c293c286f1783d21ae8 (diff) |
b43: fill ctl1 word on all newer 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.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/xmit.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index 58ea0e5fabfd..b62d4a15c534 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c | |||
@@ -175,6 +175,7 @@ void b43_generate_plcp_hdr(struct b43_plcp_hdr4 *plcp, | |||
175 | } | 175 | } |
176 | } | 176 | } |
177 | 177 | ||
178 | /* TODO: verify if needed for SSLPN or LCN */ | ||
178 | static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate) | 179 | static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate) |
179 | { | 180 | { |
180 | const struct b43_phy *phy = &dev->phy; | 181 | const struct b43_phy *phy = &dev->phy; |
@@ -256,6 +257,9 @@ int b43_generate_txhdr(struct b43_wldev *dev, | |||
256 | unsigned int plcp_fragment_len; | 257 | unsigned int plcp_fragment_len; |
257 | u32 mac_ctl = 0; | 258 | u32 mac_ctl = 0; |
258 | u16 phy_ctl = 0; | 259 | u16 phy_ctl = 0; |
260 | bool fill_phy_ctl1 = (phy->type == B43_PHYTYPE_LP || | ||
261 | phy->type == B43_PHYTYPE_N || | ||
262 | phy->type == B43_PHYTYPE_HT); | ||
259 | u8 extra_ft = 0; | 263 | u8 extra_ft = 0; |
260 | struct ieee80211_rate *txrate; | 264 | struct ieee80211_rate *txrate; |
261 | struct ieee80211_tx_rate *rates; | 265 | struct ieee80211_tx_rate *rates; |
@@ -531,7 +535,7 @@ int b43_generate_txhdr(struct b43_wldev *dev, | |||
531 | extra_ft |= B43_TXH_EFT_RTSFB_CCK; | 535 | extra_ft |= B43_TXH_EFT_RTSFB_CCK; |
532 | 536 | ||
533 | if (rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS && | 537 | if (rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS && |
534 | phy->type == B43_PHYTYPE_N) { | 538 | fill_phy_ctl1) { |
535 | txhdr->phy_ctl1_rts = cpu_to_le16( | 539 | txhdr->phy_ctl1_rts = cpu_to_le16( |
536 | b43_generate_tx_phy_ctl1(dev, rts_rate)); | 540 | b43_generate_tx_phy_ctl1(dev, rts_rate)); |
537 | txhdr->phy_ctl1_rts_fb = cpu_to_le16( | 541 | txhdr->phy_ctl1_rts_fb = cpu_to_le16( |
@@ -552,7 +556,7 @@ int b43_generate_txhdr(struct b43_wldev *dev, | |||
552 | break; | 556 | break; |
553 | } | 557 | } |
554 | 558 | ||
555 | if (phy->type == B43_PHYTYPE_N) { | 559 | if (fill_phy_ctl1) { |
556 | txhdr->phy_ctl1 = | 560 | txhdr->phy_ctl1 = |
557 | cpu_to_le16(b43_generate_tx_phy_ctl1(dev, rate)); | 561 | cpu_to_le16(b43_generate_tx_phy_ctl1(dev, rate)); |
558 | txhdr->phy_ctl1_fb = | 562 | txhdr->phy_ctl1_fb = |