| From 8b48d9cd47d92a99b296f187aa0aa53a39af4179 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 45/89] 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 78e9c6e..237ab52 100644 |
| --- a/net/mac80211/rx.c |
| +++ b/net/mac80211/rx.c |
| @@ -3531,9 +3531,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 && |
| @@ -3552,6 +3549,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 |
| |