blob: e9cc85097456af6b5cc5e196fbfb342c9df96f68 [file] [log] [blame]
developerd243af02023-12-21 14:49:33 +08001From e2a94c3ec7aa8f578b1b81b1f5225a631bf6a53f Mon Sep 17 00:00:00 2001
2From: "Allen.Ye" <allen.ye@mediatek.com>
3Date: Thu, 30 Nov 2023 14:01:29 +0800
4Subject: [PATCH 36/37] mtk: mac80211: Fix SMPS action frame cap check
5
6Fix SMPS action frame cap check.
7Due to 6G band doesn't have HT cap, we change cap check into each action
8frame section.
9
10Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
11---
12 net/mac80211/rx.c | 8 +++++---
13 1 file changed, 5 insertions(+), 3 deletions(-)
14
15diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
16index 07dddcd..d431f57 100644
17--- a/net/mac80211/rx.c
18+++ b/net/mac80211/rx.c
19@@ -3494,9 +3494,6 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
20
21 switch (mgmt->u.action.category) {
22 case WLAN_CATEGORY_HT:
23- /* reject HT action frames from stations not supporting HT */
24- if (!rx->link_sta->pub->ht_cap.ht_supported)
25- goto invalid;
26
27 if (sdata->vif.type != NL80211_IFTYPE_STATION &&
28 sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
29@@ -3515,6 +3512,11 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
30 enum ieee80211_smps_mode smps_mode;
31 struct sta_opmode_info sta_opmode = {};
32
33+ if (rx->link_sta->pub->he_cap.has_he &&
34+ !(rx->link_sta->pub->he_cap.he_cap_elem.mac_cap_info[5] &
35+ IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS))
36+ goto invalid;
37+
38 if (sdata->vif.type != NL80211_IFTYPE_AP &&
39 sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
40 goto handled;
41--
422.18.0
43