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>
This commit is contained in:
parent
54d5026e7c
commit
694718d8ad
1 changed files with 6 additions and 2 deletions
|
@ -175,6 +175,7 @@ void b43_generate_plcp_hdr(struct b43_plcp_hdr4 *plcp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: verify if needed for SSLPN or LCN */
|
||||||
static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate)
|
static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate)
|
||||||
{
|
{
|
||||||
const struct b43_phy *phy = &dev->phy;
|
const struct b43_phy *phy = &dev->phy;
|
||||||
|
@ -256,6 +257,9 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||||
unsigned int plcp_fragment_len;
|
unsigned int plcp_fragment_len;
|
||||||
u32 mac_ctl = 0;
|
u32 mac_ctl = 0;
|
||||||
u16 phy_ctl = 0;
|
u16 phy_ctl = 0;
|
||||||
|
bool fill_phy_ctl1 = (phy->type == B43_PHYTYPE_LP ||
|
||||||
|
phy->type == B43_PHYTYPE_N ||
|
||||||
|
phy->type == B43_PHYTYPE_HT);
|
||||||
u8 extra_ft = 0;
|
u8 extra_ft = 0;
|
||||||
struct ieee80211_rate *txrate;
|
struct ieee80211_rate *txrate;
|
||||||
struct ieee80211_tx_rate *rates;
|
struct ieee80211_tx_rate *rates;
|
||||||
|
@ -531,7 +535,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||||
extra_ft |= B43_TXH_EFT_RTSFB_CCK;
|
extra_ft |= B43_TXH_EFT_RTSFB_CCK;
|
||||||
|
|
||||||
if (rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS &&
|
if (rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS &&
|
||||||
phy->type == B43_PHYTYPE_N) {
|
fill_phy_ctl1) {
|
||||||
txhdr->phy_ctl1_rts = cpu_to_le16(
|
txhdr->phy_ctl1_rts = cpu_to_le16(
|
||||||
b43_generate_tx_phy_ctl1(dev, rts_rate));
|
b43_generate_tx_phy_ctl1(dev, rts_rate));
|
||||||
txhdr->phy_ctl1_rts_fb = cpu_to_le16(
|
txhdr->phy_ctl1_rts_fb = cpu_to_le16(
|
||||||
|
@ -552,7 +556,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phy->type == B43_PHYTYPE_N) {
|
if (fill_phy_ctl1) {
|
||||||
txhdr->phy_ctl1 =
|
txhdr->phy_ctl1 =
|
||||||
cpu_to_le16(b43_generate_tx_phy_ctl1(dev, rate));
|
cpu_to_le16(b43_generate_tx_phy_ctl1(dev, rate));
|
||||||
txhdr->phy_ctl1_fb =
|
txhdr->phy_ctl1_fb =
|
||||||
|
|
Loading…
Add table
Reference in a new issue