ath9k: fix MGMT packets when using TKIP
authorBill Jordan <bjordan@rajant.com>
Fri, 19 Aug 2011 15:10:22 +0000 (11:10 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 24 Aug 2011 18:41:43 +0000 (14:41 -0400)
Prevent 8 bytes from being truncated from MGMT packets
when using TKIP.

Signed-off-by: Bill Jordan <bjordan@rajant.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/recv.c

index a9d8f96be5a7820efd58a53cea3898bf5d64b547..ad5f9bd2f0b9a5fd9cd55267a7cbb74ea2ecb8ca 100644 (file)
@@ -824,7 +824,8 @@ static bool ath9k_rx_accept(struct ath_common *common,
        is_mc = !!is_multicast_ether_addr(hdr->addr1);
        is_valid_tkip = rx_stats->rs_keyix != ATH9K_RXKEYIX_INVALID &&
                test_bit(rx_stats->rs_keyix, common->tkip_keymap);
-       strip_mic = is_valid_tkip && !(rx_stats->rs_status &
+       strip_mic = is_valid_tkip && ieee80211_is_data(fc) &&
+               !(rx_stats->rs_status &
                (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC));
 
        if (!rx_stats->rs_datalen)