aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2010-01-12 07:48:56 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-12 14:21:15 -0500
commit854783444bab0024556c0aefdb0a860f2f1da286 (patch)
treeab03e580902c04e6d0b69a7cffedc1cf14399eb4 /drivers/net/wireless
parent4eae9edd38c0a9ce34e39100ccc69ff520bc1224 (diff)
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/mwl8k.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 13dded49323e..cc2ce61b7992 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -759,7 +759,13 @@ mwl8k_rxd_8366_ap_process(void *_rxd, struct ieee80211_rx_status *status,
759 } 759 }
760 } 760 }
761 761
762 status->band = IEEE80211_BAND_2GHZ; 762 if (rxd->channel > 14) {
763 status->band = IEEE80211_BAND_5GHZ;
764 if (!(status->flag & RX_FLAG_HT))
765 status->rate_idx -= 5;
766 } else {
767 status->band = IEEE80211_BAND_2GHZ;
768 }
763 status->freq = ieee80211_channel_to_frequency(rxd->channel); 769 status->freq = ieee80211_channel_to_frequency(rxd->channel);
764 770
765 *qos = rxd->qos_control; 771 *qos = rxd->qos_control;
@@ -850,7 +856,13 @@ mwl8k_rxd_sta_process(void *_rxd, struct ieee80211_rx_status *status,
850 if (rate_info & MWL8K_STA_RATE_INFO_MCS_FORMAT) 856 if (rate_info & MWL8K_STA_RATE_INFO_MCS_FORMAT)
851 status->flag |= RX_FLAG_HT; 857 status->flag |= RX_FLAG_HT;
852 858
853 status->band = IEEE80211_BAND_2GHZ; 859 if (rxd->channel > 14) {
860 status->band = IEEE80211_BAND_5GHZ;
861 if (!(status->flag & RX_FLAG_HT))
862 status->rate_idx -= 5;
863 } else {
864 status->band = IEEE80211_BAND_2GHZ;
865 }
854 status->freq = ieee80211_channel_to_frequency(rxd->channel); 866 status->freq = ieee80211_channel_to_frequency(rxd->channel);
855 867
856 *qos = rxd->qos_control; 868 *qos = rxd->qos_control;