From c2bc773b28297ae3290e6dd235fa8f11a8d4dc0a Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Mon, 8 Nov 2021 20:59:32 +0530 Subject: [PATCH] wpa_supplicant: 11KV bug fixes --- components/wpa_supplicant/src/common/rrm.c | 6 ++++++ components/wpa_supplicant/src/common/wnm_sta.c | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/wpa_supplicant/src/common/rrm.c b/components/wpa_supplicant/src/common/rrm.c index ca1c21c17a..d5121fa27d 100644 --- a/components/wpa_supplicant/src/common/rrm.c +++ b/components/wpa_supplicant/src/common/rrm.c @@ -849,6 +849,12 @@ wpas_rm_handle_beacon_req(struct wpa_supplicant *wpa_s, goto out; } params->channel = req->channel; +#ifdef ESP_SUPPLICANT + if (params->channel == 0xff) { + /* set it to zero */ + params->channel = 0; + } +#endif params->duration = le_to_host16(req->duration); params->duration_mandatory = duration_mandatory; if (!params->duration) { diff --git a/components/wpa_supplicant/src/common/wnm_sta.c b/components/wpa_supplicant/src/common/wnm_sta.c index 6f130a98b2..284712f8b0 100644 --- a/components/wpa_supplicant/src/common/wnm_sta.c +++ b/components/wpa_supplicant/src/common/wnm_sta.c @@ -883,9 +883,8 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s, } if (scan_required) { wpa_printf(MSG_DEBUG, "Trying to find another BSS"); -#else - wpa_supplicant_req_scan(wpa_s, 0, 0); #endif + wpa_supplicant_req_scan(wpa_s, 0, 0); } else if (reply) { enum bss_trans_mgmt_status_code status; if (wpa_s->wnm_mode & WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT) @@ -975,7 +974,7 @@ void ieee802_11_rx_wnm_action(struct wpa_supplicant *wpa_s, switch (act) { case WNM_BSS_TRANS_MGMT_REQ: ieee802_11_rx_bss_trans_mgmt_req(wpa_s, pos, end, - !(sender[0] & 0x01)); + 0x01); break; default: wpa_printf(MSG_ERROR, "WNM: Unknown request");