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>
This commit is contained in:
parent
fe1d743a13
commit
bcaa1ea084
1 changed files with 1 additions and 1 deletions
|
@ -405,7 +405,7 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
|
|||
int center_segment1, u32 vht_caps,
|
||||
struct he_capabilities *he_cap)
|
||||
{
|
||||
if (!he_cap)
|
||||
if (!he_cap || !he_cap->he_supported)
|
||||
he_enabled = 0;
|
||||
os_memset(data, 0, sizeof(*data));
|
||||
data->mode = mode;
|
||||
|
|
Loading…
Add table
Reference in a new issue