blob: 93a9f799152eba1dc8610708b1633e6782701c00 [file] [log] [blame]
developer66e89bc2024-04-23 14:50:01 +08001From 8a8535abf02e5cb6f0dcaf924e33183a1a1fa410 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 38/61] 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
developer66e89bc2024-04-23 14:50:01 +080010Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
developer66e89bc2024-04-23 14:50:01 +080011---
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 06725f3..1d273ef 100644
17--- a/net/mac80211/rx.c
18+++ b/net/mac80211/rx.c
19@@ -3528,9 +3528,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@@ -3549,6 +3546,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.39.2
43