mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
mwl8k: properly set receive status rate index on 5 GHz receive
The mwl8k firmware uses indices into the 2.4 GHz band rate table for the receive descriptor channel field even if the packet was received on a 5 GHz channel, while mac80211 expects an index into the 5 GHz band rate table when packets are received on the 5 GHz band, which presents a mismatch as the 5 GHz band rate table lacks the five non-OFDM rates that the 2.4 GHz rate table starts with. To handle this properly, we need to substract 5 from the rate index field if the packet was received on a 5 GHz channel (and was not received at an MCS rate). Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
4eae9edd38
commit
854783444b
1 changed files with 14 additions and 2 deletions
|
@ -759,7 +759,13 @@ mwl8k_rxd_8366_ap_process(void *_rxd, struct ieee80211_rx_status *status,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
status->band = IEEE80211_BAND_2GHZ;
|
if (rxd->channel > 14) {
|
||||||
|
status->band = IEEE80211_BAND_5GHZ;
|
||||||
|
if (!(status->flag & RX_FLAG_HT))
|
||||||
|
status->rate_idx -= 5;
|
||||||
|
} else {
|
||||||
|
status->band = IEEE80211_BAND_2GHZ;
|
||||||
|
}
|
||||||
status->freq = ieee80211_channel_to_frequency(rxd->channel);
|
status->freq = ieee80211_channel_to_frequency(rxd->channel);
|
||||||
|
|
||||||
*qos = rxd->qos_control;
|
*qos = rxd->qos_control;
|
||||||
|
@ -850,7 +856,13 @@ mwl8k_rxd_sta_process(void *_rxd, struct ieee80211_rx_status *status,
|
||||||
if (rate_info & MWL8K_STA_RATE_INFO_MCS_FORMAT)
|
if (rate_info & MWL8K_STA_RATE_INFO_MCS_FORMAT)
|
||||||
status->flag |= RX_FLAG_HT;
|
status->flag |= RX_FLAG_HT;
|
||||||
|
|
||||||
status->band = IEEE80211_BAND_2GHZ;
|
if (rxd->channel > 14) {
|
||||||
|
status->band = IEEE80211_BAND_5GHZ;
|
||||||
|
if (!(status->flag & RX_FLAG_HT))
|
||||||
|
status->rate_idx -= 5;
|
||||||
|
} else {
|
||||||
|
status->band = IEEE80211_BAND_2GHZ;
|
||||||
|
}
|
||||||
status->freq = ieee80211_channel_to_frequency(rxd->channel);
|
status->freq = ieee80211_channel_to_frequency(rxd->channel);
|
||||||
|
|
||||||
*qos = rxd->qos_control;
|
*qos = rxd->qos_control;
|
||||||
|
|
Loading…
Reference in a new issue