From: Aloka Dixit Date: Wed, 7 Aug 2024 18:34:52 +0000 (-0700) Subject: hostapd: Enable HE when EHT is set for channel switch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd8a1f5ff53c4977ed695ba5d7c2859481fd19ad;p=thirdparty%2Fhostap.git hostapd: Enable HE when EHT is set for channel switch Channel switch operation fails if 'eht' option is given without 'he' as hostapd_config_check() returns following error: "Cannot set ieee80211be without ieee80211ax" The issue is seen only when switching within/to DFS channels because hostapd_switch_channel_fallback() does not set 'ieee80211ax' in hostapd configuration unless 'he_enabled' is set for the new channel. Set 'he_enabled' in struct hostapd_freq_params for channel switch when EHT is enabled. Signed-off-by: Aloka Dixit --- diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c index 27792c87e..b93a5d215 100644 --- a/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c @@ -1143,8 +1143,9 @@ int hostapd_parse_csa_settings(const char *pos, SET_CSA_SETTING_EXT(punct_bitmap); settings->freq_params.ht_enabled = !!os_strstr(pos, " ht"); settings->freq_params.vht_enabled = !!os_strstr(pos, " vht"); - settings->freq_params.he_enabled = !!os_strstr(pos, " he"); settings->freq_params.eht_enabled = !!os_strstr(pos, " eht"); + settings->freq_params.he_enabled = !!os_strstr(pos, " he") || + settings->freq_params.eht_enabled; settings->block_tx = !!os_strstr(pos, " blocktx"); #undef SET_CSA_SETTING #undef SET_CSA_SETTING_EXT