summaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/550-mac80211_action_frame_fix.patch
blob: 9283af64a77ae9a5e6e068ede4ee39ae80fda830 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1451,7 +1451,9 @@ static void ieee80211_sta_rx_queued_mgmt
 			rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len);
 			break;
 		case IEEE80211_STYPE_ACTION:
-			/* XXX: differentiate, can only happen for CSA now! */
+			if (mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT)
+				break;
+
 			ieee80211_sta_process_chanswitch(sdata,
 					&mgmt->u.action.u.chan_switch.sw_elem,
 					(void *)ifmgd->associated->priv);
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1934,6 +1934,10 @@ ieee80211_rx_h_action(struct ieee80211_r
 		}
 		break;
 	default:
+		/* do not process rejected action frames */
+		if (mgmt->u.action.category & 0x80)
+			return RX_DROP_MONITOR;
+
 		return RX_CONTINUE;
 	}