| From 8a8535abf02e5cb6f0dcaf924e33183a1a1fa410 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 38/61] 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 06725f3..1d273ef 100644 |
| --- a/net/mac80211/rx.c |
| +++ b/net/mac80211/rx.c |
| @@ -3528,9 +3528,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 && |
| @@ -3549,6 +3546,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.39.2 |
| |