diff mbox

mac80211: Fix drop_unencrypted for MFP with hwaccel

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

Commit Message

Jouni Malinen March 29, 2010, 5:31 a.m. UTC
None
diff mbox

Patch

--- wireless-testing.orig/net/mac80211/rx.c	2010-03-28 22:26:33.000000000 -0700
+++ wireless-testing/net/mac80211/rx.c	2010-03-28 22:26:42.000000000 -0700
@@ -1396,12 +1396,15 @@  static int
 ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
+	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
 	__le16 fc = hdr->frame_control;
-	int res;
 
-	res = ieee80211_drop_unencrypted(rx, fc);
-	if (unlikely(res))
-		return res;
+	/*
+	 * Pass through unencrypted frames if the hardware has
+	 * decrypted them already.
+	 */
+	if (status->flag & RX_FLAG_DECRYPTED)
+		return 0;
 
 	if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) {
 		if (unlikely(!ieee80211_has_protected(fc) &&