wifi: mac80211: validate HE 6 GHz operation when EHT is used

When in strict mode, validate that the HE 6 GHz operation is
valid even when EHT operation is used instead. This checks
that APs are advertising correct information for HE clients,
without testing with such clients.

Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260303150832.74b934163b99.If4d1db3f39c37900cf0d0f4669cd5f8b677daaa0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg
2026-03-03 15:08:33 +01:00
parent e4b993f2bc
commit f2514ff788

View File

@@ -216,6 +216,24 @@ ieee80211_determine_ap_chan(struct ieee80211_sub_if_data *sdata,
return IEEE80211_CONN_MODE_LEGACY;
}
if (eht_oper && ieee80211_hw_check(&sdata->local->hw, STRICT)) {
struct cfg80211_chan_def he_chandef = *chandef;
if (!ieee80211_chandef_he_6ghz_oper(sdata->local,
he_oper, NULL,
&he_chandef)) {
sdata_info(sdata,
"bad HE operation in EHT AP\n");
return IEEE80211_CONN_MODE_LEGACY;
}
if (!cfg80211_chandef_compatible(chandef,
&he_chandef)) {
sdata_info(sdata, "HE/EHT incompatible\n");
return IEEE80211_CONN_MODE_LEGACY;
}
}
if (mode <= IEEE80211_CONN_MODE_EHT)
return mode;
goto check_uhr;