@@ -213,6 +213,7 @@ struct eht_capabilities {
#define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
#define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN BIT(1)
#define HOSTAPD_MODE_FLAG_HE_INFO_KNOWN BIT(2)
+#define HOSTAPD_MODE_FLAG_EHT_INFO_KNOWN BIT(3)
enum ieee80211_op_mode {
@@ -6565,6 +6566,8 @@ int ht_supported(const struct hostapd_hw_modes *mode);
int vht_supported(const struct hostapd_hw_modes *mode);
int he_supported(const struct hostapd_hw_modes *hw_mode,
enum ieee80211_op_mode op_mode);
+int eht_supported(const struct hostapd_hw_modes *hw_mode,
+ enum ieee80211_op_mode op_mode);
struct wowlan_triggers *
wpa_get_wowlan_triggers(const char *wowlan_triggers,
@@ -200,6 +200,21 @@ int he_supported(const struct hostapd_hw_modes *hw_mode,
}
+int eht_supported(const struct hostapd_hw_modes *hw_mode,
+ enum ieee80211_op_mode op_mode)
+{
+ if (!(hw_mode->flags & HOSTAPD_MODE_FLAG_EHT_INFO_KNOWN)) {
+ /*
+ * The driver did not indicate whether it supports EHT. Assume
+ * it does to avoid connection issues.
+ */
+ return 1;
+ }
+
+ return hw_mode->eht_capab[op_mode].eht_supported;
+}
+
+
static int wpa_check_wowlan_trigger(const char *start, const char *trigger,
int capa_trigger, u8 *param_trigger)
{
@@ -2025,7 +2025,8 @@ static int phy_info_band(struct phy_info_arg *phy_info, struct nlattr *nl_band)
mode->mode = NUM_HOSTAPD_MODES;
mode->flags = HOSTAPD_MODE_FLAG_HT_INFO_KNOWN |
HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN |
- HOSTAPD_MODE_FLAG_HE_INFO_KNOWN;
+ HOSTAPD_MODE_FLAG_HE_INFO_KNOWN |
+ HOSTAPD_MODE_FLAG_EHT_INFO_KNOWN;
/*
* Unsupported VHT MCS stream is defined as value 3, so the VHT
@@ -975,6 +975,17 @@ static int rate_match(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
continue;
}
+ if (flagged && ((rate_ie[j] & 0x7f) ==
+ BSS_MEMBERSHIP_SELECTOR_EHT_PHY)) {
+ if (!eht_supported(mode, IEEE80211_MODE_INFRA)) {
+ if (debug_print)
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ " hardware does not support EHT PHY");
+ return 0;
+ }
+ continue;
+ }
+
#ifdef CONFIG_SAE
if (flagged && ((rate_ie[j] & 0x7f) ==
BSS_MEMBERSHIP_SELECTOR_SAE_H2E_ONLY)) {