blob: 794407f38e1de452ceb8358e39f89a3fde09d9da [file] [log] [blame]
From 9ff05c938d2a2b82d022aa8f671d2333cd8a992a Mon Sep 17 00:00:00 2001
From: "Allen.Ye" <allen.ye@mediatek.com>
Date: Thu, 30 Nov 2023 14:01:29 +0800
Subject: [PATCH 35/37] mtk: mac80211: Fix SMPS action frame cap check
Fix SMPS action frame cap check.
Due to 6G band doesn't have HT cap, we change cap check into each action
frame section.
Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
---
net/mac80211/rx.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 0cf8c59..fe3a538 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3493,9 +3493,6 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
switch (mgmt->u.action.category) {
case WLAN_CATEGORY_HT:
- /* reject HT action frames from stations not supporting HT */
- if (!rx->link_sta->pub->ht_cap.ht_supported)
- goto invalid;
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
@@ -3514,6 +3511,11 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
enum ieee80211_smps_mode smps_mode;
struct sta_opmode_info sta_opmode = {};
+ if (rx->link_sta->pub->he_cap.has_he &&
+ !(rx->link_sta->pub->he_cap.he_cap_elem.mac_cap_info[5] &
+ IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS))
+ goto invalid;
+
if (sdata->vif.type != NL80211_IFTYPE_AP &&
sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
goto handled;
--
2.18.0