diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-11-30 12:12:35 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-07 16:51:20 -0500 |
commit | 8e9f33f0ced82a797d285b233e1c956cbd5c7de3 (patch) | |
tree | a982b2e0e3da7336f7476de918cccdb9be7ab8dc /drivers | |
parent | ca00930153c14b323c31b97623ac5c4f7855ed6a (diff) |
mwl8k: properly report rate on received 40MHz packets
On 8366, bit 6 in the rx descriptor rate field indicates whether the
packet was received on a 20MHz or 40MHz channel, and is not part of
the MCS index. Handle this properly, which then prevents hitting the
WARN_ON and being dropped in ieee80211_rx().
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index c1cb20fceaff..f1566f93696e 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -782,6 +782,10 @@ struct mwl8k_rxd_8366 { | |||
782 | __u8 rx_ctrl; | 782 | __u8 rx_ctrl; |
783 | } __attribute__((packed)); | 783 | } __attribute__((packed)); |
784 | 784 | ||
785 | #define MWL8K_8366_RATE_INFO_MCS_FORMAT 0x80 | ||
786 | #define MWL8K_8366_RATE_INFO_40MHZ 0x40 | ||
787 | #define MWL8K_8366_RATE_INFO_RATEID(x) ((x) & 0x3f) | ||
788 | |||
785 | #define MWL8K_8366_RX_CTRL_OWNED_BY_HOST 0x80 | 789 | #define MWL8K_8366_RX_CTRL_OWNED_BY_HOST 0x80 |
786 | 790 | ||
787 | static void mwl8k_rxd_8366_init(void *_rxd, dma_addr_t next_dma_addr) | 791 | static void mwl8k_rxd_8366_init(void *_rxd, dma_addr_t next_dma_addr) |
@@ -817,9 +821,11 @@ mwl8k_rxd_8366_process(void *_rxd, struct ieee80211_rx_status *status, | |||
817 | status->signal = -rxd->rssi; | 821 | status->signal = -rxd->rssi; |
818 | status->noise = -rxd->noise_floor; | 822 | status->noise = -rxd->noise_floor; |
819 | 823 | ||
820 | if (rxd->rate & 0x80) { | 824 | if (rxd->rate & MWL8K_8366_RATE_INFO_MCS_FORMAT) { |
821 | status->flag |= RX_FLAG_HT; | 825 | status->flag |= RX_FLAG_HT; |
822 | status->rate_idx = rxd->rate & 0x7f; | 826 | if (rxd->rate & MWL8K_8366_RATE_INFO_40MHZ) |
827 | status->flag |= RX_FLAG_40MHZ; | ||
828 | status->rate_idx = MWL8K_8366_RATE_INFO_RATEID(rxd->rate); | ||
823 | } else { | 829 | } else { |
824 | int i; | 830 | int i; |
825 | 831 | ||