developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 1 | From 8a8535abf02e5cb6f0dcaf924e33183a1a1fa410 Mon Sep 17 00:00:00 2001 |
| 2 | From: "Allen.Ye" <allen.ye@mediatek.com> |
| 3 | Date: Thu, 30 Nov 2023 14:01:29 +0800 |
| 4 | Subject: [PATCH 38/61] mtk: mac80211: Fix SMPS action frame cap check |
| 5 | |
| 6 | Fix SMPS action frame cap check. |
| 7 | Due to 6G band doesn't have HT cap, we change cap check into each action |
| 8 | frame section. |
| 9 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 10 | Signed-off-by: Allen.Ye <allen.ye@mediatek.com> |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 11 | --- |
| 12 | net/mac80211/rx.c | 8 +++++--- |
| 13 | 1 file changed, 5 insertions(+), 3 deletions(-) |
| 14 | |
| 15 | diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c |
| 16 | index 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 | -- |
| 42 | 2.39.2 |
| 43 | |