[PATCH 1/1] Fix NAN USD state machine stall seen with listen failure.
Jouni Malinen
j at w1.fi
Tue Sep 30 02:42:15 PDT 2025
On Tue, Jul 22, 2025 at 02:16:38PM +0530, Ajay Davanageri wrote:
> If driver returns -EBUSY for remain_on_channel operation, NAN USD state-machine gets stuck and no further listen is configured from supplicant.
> This patch clears the states and re-triggers the nan_de_timer to restart the listen operation.
Thanks, applied with fixes.
> diff --git a/wpa_supplicant/nan_usd.c b/wpa_supplicant/nan_usd.c
> @@ -208,6 +216,9 @@ static void wpas_nan_usd_start_listen_cb(struct wpa_radio_work *work,
> wpa_printf(MSG_DEBUG,
> "NAN: Failed to request the driver to remain on channel (%u MHz) for listen",
> lwork->freq);
> + eloop_cancel_timeout(wpas_nan_usd_remain_on_channel_timeout, wpa_s, NULL);
That needs to use ELOOP_ALL_CTX..
> + /* restart the listen state after a delay */
> + eloop_register_timeout(0, 500, wpas_nan_usd_remain_on_channel_timeout, wpa_s, lwork)
> wpas_nan_usd_listen_work_done(wpa_s);
And that does not compile..
And the registered timeout needs to be removed on deinit as well.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list