From b26f5c0fe35cd0472ea43f533b981ac2d91cdf1f Mon Sep 17 00:00:00 2001 From: Chenming Huang Date: Mon, 13 Dec 2021 15:57:58 +0800 Subject: [PATCH] DPP: Remove dpp-listen radio work when stopping The radio work starting may be delayed. If the DPP listen operation is stopped before the radio work starts, the pending dpp-listen radio work won't get cleaned up, which might lead to failing to start the next DPP listen operation. Issue scenario: DPP start -> dpp-listen radio work added but not started -> DPP stop, pending radio work not cleaned up -> radio work start -> trying to start DPP but failing because a dpp-listen work already exists. This commit removes the potential pending dpp-listen radio work when DPP stops. Signed-off-by: Jouni Malinen --- wpa_supplicant/dpp_supplicant.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c index 4378546d0..584654a6c 100644 --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -1021,6 +1021,7 @@ void wpas_dpp_listen_stop(struct wpa_supplicant *wpa_s) wpa_drv_dpp_listen(wpa_s, false); wpa_s->dpp_listen_freq = 0; wpas_dpp_listen_work_done(wpa_s); + radio_remove_works(wpa_s, "dpp-listen", 0); }