mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user