From ecaacb47b71eacc60df07419213e7bfe1be42962 Mon Sep 17 00:00:00 2001 From: Hu Wang Date: Sat, 22 May 2021 22:00:10 +0800 Subject: [PATCH] OCE: Remove AP from driver disallow list with sufficient AP RSSI When a STA makes an association request that is rejected by an OCE AP due to the RSSI being insufficient, the AP is added to the driver disallow list by wpa_set_driver_tmp_disallow_list(). Once the AP increases TX power which makes the AP RSSI higher than Association Rejection RSSI threshold, the AP is supposed to be removed from the driver disallow list but that was not the case. wpa_is_bss_tmp_disallowed() is called in the scan result handler, so it is the best place to put the logic of removing the AP from the driver disallow list with sufficient AP RSSI. This is needed with drivers that use the temporarily disallowed BSS list (which is currently supported only with a QCA vendor command). The wpa_supplicant internal functionality was already taking care of this with the wpa_is_bss_tmp_disallowed() return value even for cases where the entry remaining in the list. Signed-off-by: Hu Wang --- wpa_supplicant/wpa_supplicant.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 57cbe0647..43e8e9a19 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -8230,8 +8230,14 @@ int wpa_is_bss_tmp_disallowed(struct wpa_supplicant *wpa_s, return 0; if (disallowed->rssi_threshold != 0 && - bss->level > disallowed->rssi_threshold) + bss->level > disallowed->rssi_threshold) { + eloop_cancel_timeout(wpa_bss_tmp_disallow_timeout, + wpa_s, disallowed); + dl_list_del(&disallowed->list); + os_free(disallowed); + wpa_set_driver_tmp_disallow_list(wpa_s); return 0; + } return 1; }