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