Fix HE enabling for IBSS and mesh

Earlier refactoring of ibss_mesh_setup_freq() ended up dropping the case
where HE would be enabled without VHT on the 2.4 GHz band. Add that back
to allow HE to be used on 2.4 GHz with IBSS and mesh.

Fixes: 64043e6156 ("Split ibss_mesh_setup_freq() into multiple functions")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2023-12-14 20:59:42 +02:00 committed by Jouni Malinen
parent b283de094b
commit 07525cd5e2

View file

@ -3072,7 +3072,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
struct hostapd_hw_modes *mode = NULL;
int i, obss_scan = 1;
u8 channel;
bool is_6ghz;
bool is_6ghz, is_24ghz;
freq->freq = ssid->frequency;
@ -3101,6 +3101,9 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
if (!mode)
return;
is_24ghz = hw_mode == HOSTAPD_MODE_IEEE80211G ||
hw_mode == HOSTAPD_MODE_IEEE80211B;
is_6ghz = is_6ghz_freq(freq->freq);
freq->ht_enabled = 0;
@ -3112,7 +3115,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
freq->ht_enabled = ibss_mesh_can_use_ht(wpa_s, ssid, mode);
if (freq->ht_enabled)
freq->vht_enabled = ibss_mesh_can_use_vht(wpa_s, ssid, mode);
if (freq->vht_enabled || is_6ghz)
if (freq->vht_enabled || (freq->ht_enabled && is_24ghz) || is_6ghz)
freq->he_enabled = ibss_mesh_can_use_he(wpa_s, ssid, mode,
ieee80211_mode);
freq->channel = channel;