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;