if (mode && is_6ghz_freq(ssid->frequency) &&
conf->hw_mode == HOSTAPD_MODE_IEEE80211A) {
+ if (mode->eht_capab[wpas_mode_to_ieee80211_mode(
+ ssid->mode)].eht_supported &&
+ ssid->eht)
+ conf->ieee80211be = 1;
+
+ if (mode->he_capab[wpas_mode_to_ieee80211_mode(
+ ssid->mode)].he_supported &&
+ ssid->he)
+ conf->ieee80211ax = 1;
+
#ifdef CONFIG_P2P
wpas_conf_ap_he_6ghz(wpa_s, mode, ssid, conf);
#endif /* CONFIG_P2P */
/* check this before VHT, because setting oper chan
* width and friends is the same call for HE and VHT
* and checks if conf->ieee8021ax == 1 */
+ if (mode->eht_capab[wpas_mode_to_ieee80211_mode(
+ ssid->mode)].eht_supported &&
+ ssid->eht)
+ conf->ieee80211be = 1;
+
if (mode->he_capab[wpas_mode_to_ieee80211_mode(
ssid->mode)].he_supported &&
ssid->he)
int he;
+ int eht;
+
enum oper_chan_width max_oper_chwidth;
unsigned int vht_center_freq1;
ifmsh->conf->ieee80211n,
ifmsh->conf->ieee80211ac,
ifmsh->conf->ieee80211ax,
- false,
+ ifmsh->conf->ieee80211be,
ifmsh->conf->secondary_channel,
hostapd_get_oper_chwidth(ifmsh->conf),
hostapd_get_oper_centr_freq_seg0_idx(ifmsh->conf),
wpa_s->mesh_ht_enabled = !!params->freq.ht_enabled;
wpa_s->mesh_vht_enabled = !!params->freq.vht_enabled;
wpa_s->mesh_he_enabled = !!params->freq.he_enabled;
+ wpa_s->mesh_eht_enabled = !!params->freq.eht_enabled;
if (params->freq.ht_enabled && params->freq.sec_channel_offset)
ssid->ht40 = params->freq.sec_channel_offset;
}
if (wpa_s->mesh_he_enabled)
ssid->he = 1;
+ if (wpa_s->mesh_eht_enabled)
+ ssid->eht = 1;
if (ssid->beacon_int > 0)
params->beacon_int = ssid->beacon_int;
else if (wpa_s->conf->beacon_int > 0)
if (type != PLINK_CLOSE && conf->ocv)
buf_len += OCV_OCI_EXTENDED_LEN;
#endif /* CONFIG_OCV */
+#ifdef CONFIG_IEEE80211BE
+ if (type != PLINK_CLOSE && wpa_s->mesh_eht_enabled) {
+ buf_len += 3 + 2 + EHT_PHY_CAPAB_LEN + EHT_MCS_NSS_CAPAB_LEN +
+ EHT_PPE_THRESH_CAPAB_LEN;
+ buf_len += 3 + sizeof(struct ieee80211_eht_operation);
+}
+#endif /* CONFIG_IEEE80211BE */
buf = wpabuf_alloc(buf_len);
if (!buf)
wpabuf_put_data(buf, he_capa_oper, pos - he_capa_oper);
}
#endif /* CONFIG_IEEE80211AX */
-
#ifdef CONFIG_OCV
if (type != PLINK_CLOSE && conf->ocv) {
struct wpa_channel_info ci;
}
#endif /* CONFIG_OCV */
+#ifdef CONFIG_IEEE80211BE
+ if (type != PLINK_CLOSE && wpa_s->mesh_eht_enabled) {
+ u8 eht_capa_oper[3 +
+ 2 +
+ EHT_PHY_CAPAB_LEN +
+ EHT_MCS_NSS_CAPAB_LEN +
+ EHT_PPE_THRESH_CAPAB_LEN +
+ 3 + sizeof(struct ieee80211_eht_operation)];
+ pos = hostapd_eid_eht_capab(bss, eht_capa_oper,
+ IEEE80211_MODE_MESH);
+ pos = hostapd_eid_eht_operation(bss, pos);
+ wpabuf_put_data(buf, eht_capa_oper, pos - eht_capa_oper);
+ }
+#endif /* CONFIG_IEEE80211BE */
+
if (ampe && mesh_rsn_protect_frame(wpa_s->mesh_rsn, sta, cat, buf)) {
wpa_msg(wpa_s, MSG_INFO,
"Mesh MPM: failed to add AMPE and MIC IE");
elems->he_capabilities, elems->he_capabilities_len);
copy_sta_he_6ghz_capab(data, sta, elems->he_6ghz_band_cap);
#endif /* CONFIG_IEEE80211AX */
+#ifdef CONFIG_IEEE80211BE
+ copy_sta_eht_capab(data, sta, IEEE80211_MODE_MESH,
+ elems->he_capabilities,
+ elems->he_capabilities_len,
+ elems->eht_capabilities,
+ elems->eht_capabilities_len);
+#endif /*CONFIG_IEEE80211BE */
if (hostapd_get_aid(data, sta) < 0) {
wpa_msg(wpa_s, MSG_ERROR, "No AIDs available");
params.he_capab = sta->he_capab;
params.he_capab_len = sta->he_capab_len;
params.he_6ghz_capab = sta->he_6ghz_capab;
+ params.eht_capab = sta->eht_capab;
+ params.eht_capab_len = sta->eht_capab_len;
params.flags |= WPA_STA_WMM;
params.flags_mask |= WPA_STA_AUTHENTICATED;
if (conf->security == MESH_CONF_SEC_NONE) {
}
+static bool ibss_mesh_can_use_eht(struct wpa_supplicant *wpa_s,
+ const struct wpa_ssid *ssid,
+ const struct hostapd_hw_modes *mode,
+ int ieee80211_mode)
+{
+ if (ssid->disable_eht)
+ return false;
+
+ switch(mode->mode) {
+ case HOSTAPD_MODE_IEEE80211G:
+ case HOSTAPD_MODE_IEEE80211B:
+ case HOSTAPD_MODE_IEEE80211A:
+ return mode->eht_capab[ieee80211_mode].eht_supported;
+ default:
+ return false;
+ }
+}
+
+
static void ibss_mesh_select_40mhz(struct wpa_supplicant *wpa_s,
const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode,
freq->channel, ssid->enable_edmg,
ssid->edmg_channel, freq->ht_enabled,
freq->vht_enabled, freq->he_enabled,
- false,
+ freq->eht_enabled,
freq->sec_channel_offset,
chwidth, seg0, seg1, vht_caps,
&mode->he_capab[ieee80211_mode],
- NULL) != 0)
+ &mode->eht_capab[ieee80211_mode]) != 0)
return false;
*freq = vht_freq;
freq->ht_enabled = 0;
freq->vht_enabled = 0;
freq->he_enabled = 0;
+ freq->eht_enabled = 0;
if (!is_6ghz)
freq->ht_enabled = ibss_mesh_can_use_ht(wpa_s, ssid, mode);
ieee80211_mode, is_6ghz))
freq->he_enabled = freq->vht_enabled = false;
}
+
+ if (freq->he_enabled)
+ freq->eht_enabled = ibss_mesh_can_use_eht(wpa_s, ssid, mode,
+ ieee80211_mode);
}
unsigned int mesh_ht_enabled:1;
unsigned int mesh_vht_enabled:1;
unsigned int mesh_he_enabled:1;
+ unsigned int mesh_eht_enabled:1;
struct wpa_driver_mesh_join_params *mesh_params;
#ifdef CONFIG_PMKSA_CACHE_EXTERNAL
/* struct external_pmksa_cache::list */