Commit 916448e7 authored by Senthil Balasubramanian's avatar Senthil Balasubramanian Committed by John W. Linville

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: default avatarSenthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8e26d5ad
...@@ -703,8 +703,7 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, ...@@ -703,8 +703,7 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
rs->rs_phyerr = phyerr; rs->rs_phyerr = phyerr;
} else if (ads.ds_rxstatus8 & AR_DecryptCRCErr) } else if (ads.ds_rxstatus8 & AR_DecryptCRCErr)
rs->rs_status |= ATH9K_RXERR_DECRYPT; rs->rs_status |= ATH9K_RXERR_DECRYPT;
else if ((ads.ds_rxstatus8 & AR_MichaelErr) && else if (ads.ds_rxstatus8 & AR_MichaelErr)
rs->rs_keyix != ATH9K_RXKEYIX_INVALID)
rs->rs_status |= ATH9K_RXERR_MIC; rs->rs_status |= ATH9K_RXERR_MIC;
else if (ads.ds_rxstatus8 & AR_KeyMiss) else if (ads.ds_rxstatus8 & AR_KeyMiss)
rs->rs_status |= ATH9K_RXERR_DECRYPT; rs->rs_status |= ATH9K_RXERR_DECRYPT;
......
...@@ -1049,9 +1049,11 @@ static void ath9k_rx_skb_postprocess(struct ath_common *common, ...@@ -1049,9 +1049,11 @@ static void ath9k_rx_skb_postprocess(struct ath_common *common,
int hdrlen, padpos, padsize; int hdrlen, padpos, padsize;
u8 keyix; u8 keyix;
__le16 fc; __le16 fc;
bool is_mc;
/* see if any padding is done by the hw and remove it */ /* see if any padding is done by the hw and remove it */
hdr = (struct ieee80211_hdr *) skb->data; hdr = (struct ieee80211_hdr *) skb->data;
is_mc = !!is_multicast_ether_addr(hdr->addr1);
hdrlen = ieee80211_get_hdrlen_from_skb(skb); hdrlen = ieee80211_get_hdrlen_from_skb(skb);
fc = hdr->frame_control; fc = hdr->frame_control;
padpos = ath9k_cmn_padpos(hdr->frame_control); padpos = ath9k_cmn_padpos(hdr->frame_control);
...@@ -1072,7 +1074,7 @@ static void ath9k_rx_skb_postprocess(struct ath_common *common, ...@@ -1072,7 +1074,7 @@ static void ath9k_rx_skb_postprocess(struct ath_common *common,
keyix = rx_stats->rs_keyix; keyix = rx_stats->rs_keyix;
if (!(keyix == ATH9K_RXKEYIX_INVALID) && !decrypt_error && if ((is_mc || !(keyix == ATH9K_RXKEYIX_INVALID)) && !decrypt_error &&
ieee80211_has_protected(fc)) { ieee80211_has_protected(fc)) {
rxs->flag |= RX_FLAG_DECRYPTED; rxs->flag |= RX_FLAG_DECRYPTED;
} else if (ieee80211_has_protected(fc) } else if (ieee80211_has_protected(fc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment