Search Linux Wireless

[PATCH] Fix breakage on WEP for cards that rely on software decoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The test to drop out of ieee80211_rx_h_load_key if we don't know the IV should
check if the packet has already been decrypted, otherwise we need to load
the key to be able to decrypt it

Signed-off-by: Adam Baker <linux@xxxxxxxxxxxxxxxx>
---

When using rt2x00 with WEP we get continuous reports of "RX WEP frame, but
no key set" without this patch. As the rt2x00 driver currently relies on
mac80211 to perform the decryption I believe it would be incorrect for the driver
to set IEEE80211_HW_WEP_INCLUDE_IV. Also reading some of the code
comments it appears that even for a card that does HW decryption there are
circumstances where the SW decryption will get used and in those cases
we need to set the key.

The patch was generated against the rt2x00 git but looks like it applies to
the current wireless-dev everything.

---
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 9c02dff..5bf7185 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -363,7 +363,8 @@ ieee80211_rx_h_load_key(struct ieee80211
 		 * we somehow allow the driver to tell us which key
 		 * the hardware used if this flag is set?
 		 */
-		if (!(rx->local->hw.flags & IEEE80211_HW_WEP_INCLUDE_IV))
+		if ((rx->u.rx.status->flag & RX_FLAG_DECRYPTED) &&
+		    (!(rx->local->hw.flags & IEEE80211_HW_WEP_INCLUDE_IV)))
 			return TXRX_CONTINUE;
 
 		hdrlen = ieee80211_get_hdrlen(rx->fc);
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux