diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2026-04-28 12:25:42 +0300 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-05-05 15:49:04 +0300 |
| commit | d2ffdadd4aca41d120e25f6a675dd6a4d77ce360 (patch) | |
| tree | 4072e8eb324489b834ee8126e762d844259fe350 | |
| parent | 0a621df46d5544f1b4f1c0572f07e1286b68c66a (diff) | |
| download | linux-d2ffdadd4aca41d120e25f6a675dd6a4d77ce360.tar.xz | |
wifi: mac80211: check AP using NPCA has NPCA capability
If an AP advertises NPCA, it should also advertise NPCA
capability. Validate this.
Link: https://patch.msgid.link/20260428112708.5c354a838ba5.I8e957767cdbc1b224a22dde0a9c343c3a5851783@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| -rw-r--r-- | net/mac80211/mlme.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b09c82082d30..2b2ab3d458ad 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -397,8 +397,19 @@ check_uhr: const struct ieee80211_sta_uhr_cap *uhr_cap; const struct ieee80211_uhr_npca_info *npca; + /* frames other than beacons carry UHR capability too */ + if (!elems->uhr_cap) + return IEEE80211_CONN_MODE_EHT; + npca = ieee80211_uhr_npca_info(uhr_oper); + if (npca && !(elems->uhr_cap->mac.mac_cap[0] & + IEEE80211_UHR_MAC_CAP0_NPCA_SUPP)) { + sdata_info(sdata, + "AP without UHR NPCA capability uses it, disabling UHR\n"); + return IEEE80211_CONN_MODE_EHT; + } + /* DBE is not considered yet, so this works */ if (!cfg80211_chandef_npca_valid(sdata->local->hw.wiphy, &npca_chandef, npca) || |
