diff mbox

ath9k: Do not indicate RX_FLAG_DECRYPTED for unprotected frames

Message ID 20100330063736.GE4953@jm.kir.nu (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jouni Malinen March 30, 2010, 6:37 a.m. UTC
None
diff mbox

Patch

--- wireless-testing.orig/drivers/net/wireless/ath/ath9k/common.c	2010-03-29 23:32:13.000000000 -0700
+++ wireless-testing/drivers/net/wireless/ath/ath9k/common.c	2010-03-29 23:36:52.000000000 -0700
@@ -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) {