]> git.ipfire.org Git - thirdparty/hostap.git/commit
HE: Disable HE in hostapd_set_freq_params() if driver does not support
authorHu Wang <huw@codeaurora.org>
Thu, 30 Sep 2021 06:37:24 +0000 (12:07 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 7 Oct 2021 20:43:16 +0000 (23:43 +0300)
commitbcaa1ea0848d7f2f48a29294b4427f99ced62832
treed6eef6c30e4ccfd573bb6007349ff9badbb5e33b
parentfe1d743a1367f84b6ede2020bc72e0847571e611
HE: Disable HE in hostapd_set_freq_params() if driver does not support

Existing logic to disable HE in hostapd_set_freq_params() is to check
he_cap != NULL, but this is not correct as he_cap is defined as a stack
member of hostapd_hw_modes which can't be NULL. Add one more check
!he_cap->he_supported to make sure HE can be disabled if the driver not
support it.

This fixes a case where a driver does not support HE, but hostapd.conf
enables HE/HT40 on the 2.4 GHz band and hostapd failed to start with
error '40 MHz channel width is not supported in 2.4 GHz'.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/hw_features_common.c