]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Stop scheduled scans from blocking the PB discovery scan
authorAdam Baumann <adam.baumann@morsemicro.com>
Thu, 27 Mar 2025 02:57:27 +0000 (13:57 +1100)
committerJouni Malinen <j@w1.fi>
Fri, 28 Mar 2025 08:31:23 +0000 (10:31 +0200)
DPP PB interactions cannot start during a scheduled scan as the initial
discovery scan will be blocked indefinitely. This can be fixed by
canceling an ongoing scheduled scan before performing the DPP PB
discovery scan.

Signed-off-by: Adam Baumann <adam.baumann@morsemicro.com>
wpa_supplicant/dpp_supplicant.c

index 3feb4ccb62c565beb1be42e8f4e4161e8d15e875..bdb3e2b9a12879ac80bf769cb577d110deb8f34b 100644 (file)
@@ -5767,6 +5767,7 @@ int wpas_dpp_push_button(struct wpa_supplicant *wpa_s, const char *cmd)
                   "DPP: Scan to create channel list for PB discovery");
        wpa_s->scan_req = MANUAL_SCAN_REQ;
        wpa_s->scan_res_handler = wpas_dpp_pb_scan_res_handler;
+       wpa_supplicant_cancel_sched_scan(wpa_s);
        wpa_supplicant_req_scan(wpa_s, 0, 0);
        wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_PB_STATUS "started");
        return 0;