Skip to contentSkip to conversation

ath9k: Do not indicate RX_FLAG_DECRYPTED for unprotected frames

PATCH New Jouni Malinen 1 participant 1 message Mar 30, 2010 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Do not indicate RX_FLAG_DECRYPTED for unprotected frames

mac80211 skips drop_unencrypted checks if the driver/firmware has already taken care of this. In case of ath9k, we must not indicate that the frame was decrypted if no decryption was actually done.

---
 drivers/net/wireless/ath/ath9k/common.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/common.c +2 -1
@@ -255,7 +255,8 @@ void ath9k_cmn_rx_skb_postprocess(struct
 
 	keyix = rx_stats->rs_keyix;
 
-	if (!(keyix == ATH9K_RXKEYIX_INVALID) && !decrypt_error) {
+	if (!(keyix == ATH9K_RXKEYIX_INVALID) && !decrypt_error &&
+	    ieee80211_has_protected(fc)) {
 		rxs->flag |= RX_FLAG_DECRYPTED;
 	} else if (ieee80211_has_protected(fc)
 		   && !decrypt_error && skb->len >= hdrlen + 4) {
Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA