| From e2a94c3ec7aa8f578b1b81b1f5225a631bf6a53f 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 36/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 07dddcd..d431f57 100644 |
| --- a/net/mac80211/rx.c |
| +++ b/net/mac80211/rx.c |
| @@ -3494,9 +3494,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 && |
| @@ -3515,6 +3512,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 |
| |