aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSenthil Balasubramanian <senthilkumar@atheros.com>2010-11-30 09:45:39 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-30 13:45:02 -0500
commit916448e77f6bcaaa7f13c3de0c3851783ae2bfd0 (patch)
tree8c58a26a5a02eb44260b4fbcda4a697f6981bbe0 /drivers/net
parent8e26d5ad2f9c038609d42eebc676cd1107709eef (diff)
ath9k: Fix STA disconnect issue due to received MIC failed bcast frames
AR_RxKeyIdxValid will not be set for bcast/mcast frames and so relying this status for MIC failed frames is buggy. Due to this, MIC failure events for broadcast frames are not sent to supplicant resulted in AP disconnecting the STA. Able to pass Wifi Test case 5.2.18 with this fix. Cc: Stable <stable@kernel.org> (2.6.36+) Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 8c13479b17cd..c996963ab339 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -703,8 +703,7 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
703 rs->rs_phyerr = phyerr; 703 rs->rs_phyerr = phyerr;
704 } else if (ads.ds_rxstatus8 & AR_DecryptCRCErr) 704 } else if (ads.ds_rxstatus8 & AR_DecryptCRCErr)
705 rs->rs_status |= ATH9K_RXERR_DECRYPT; 705 rs->rs_status |= ATH9K_RXERR_DECRYPT;
706 else if ((ads.ds_rxstatus8 & AR_MichaelErr) && 706 else if (ads.ds_rxstatus8 & AR_MichaelErr)
707 rs->rs_keyix != ATH9K_RXKEYIX_INVALID)
708 rs->rs_status |= ATH9K_RXERR_MIC; 707 rs->rs_status |= ATH9K_RXERR_MIC;
709 else if (ads.ds_rxstatus8 & AR_KeyMiss) 708 else if (ads.ds_rxstatus8 & AR_KeyMiss)
710 rs->rs_status |= ATH9K_RXERR_DECRYPT; 709 rs->rs_status |= ATH9K_RXERR_DECRYPT;
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 1a62e351ec77..14d479f8d8ac 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1049,9 +1049,11 @@ static void ath9k_rx_skb_postprocess(struct ath_common *common,
1049 int hdrlen, padpos, padsize; 1049 int hdrlen, padpos, padsize;
1050 u8 keyix; 1050 u8 keyix;
1051 __le16 fc; 1051 __le16 fc;
1052 bool is_mc;
1052 1053
1053 /* see if any padding is done by the hw and remove it */ 1054 /* see if any padding is done by the hw and remove it */
1054 hdr = (struct ieee80211_hdr *) skb->data; 1055 hdr = (struct ieee80211_hdr *) skb->data;
1056 is_mc = !!is_multicast_ether_addr(hdr->addr1);
1055 hdrlen = ieee80211_get_hdrlen_from_skb(skb); 1057 hdrlen = ieee80211_get_hdrlen_from_skb(skb);
1056 fc = hdr->frame_control; 1058 fc = hdr->frame_control;
1057 padpos = ath9k_cmn_padpos(hdr->frame_control); 1059 padpos = ath9k_cmn_padpos(hdr->frame_control);
@@ -1072,7 +1074,7 @@ static void ath9k_rx_skb_postprocess(struct ath_common *common,
1072 1074
1073 keyix = rx_stats->rs_keyix; 1075 keyix = rx_stats->rs_keyix;
1074 1076
1075 if (!(keyix == ATH9K_RXKEYIX_INVALID) && !decrypt_error && 1077 if ((is_mc || !(keyix == ATH9K_RXKEYIX_INVALID)) && !decrypt_error &&
1076 ieee80211_has_protected(fc)) { 1078 ieee80211_has_protected(fc)) {
1077 rxs->flag |= RX_FLAG_DECRYPTED; 1079 rxs->flag |= RX_FLAG_DECRYPTED;
1078 } else if (ieee80211_has_protected(fc) 1080 } else if (ieee80211_has_protected(fc)