]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OCE: Remove AP from driver disallow list with sufficient AP RSSI
authorHu Wang <huw@codeaurora.org>
Sat, 22 May 2021 14:00:10 +0000 (22:00 +0800)
committerJouni Malinen <j@w1.fi>
Wed, 2 Jun 2021 21:06:00 +0000 (00:06 +0300)
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 <huw@codeaurora.org>
wpa_supplicant/wpa_supplicant.c

index 57cbe0647c83e1c4e557144ef3cc2224044f1d7b..43e8e9a192379cb3991adffdf568b3755b192702 100644 (file)
@@ -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;
 }