Re: [PATCH wireless-next 1/3] wifi: nxpwifi: wait for the wakeup timer before the adapter is freed
From: Jeff Chen
Date: Tue Sep 01 2026 - 06:29:30 EST
On Thu, Aug 13, 2026 at 04:23:13 PM +0800, Linmao Li wrote:
> nxpwifi_adapter_cleanup() stops adapter->wakeup_timer with
> timer_delete(), which does not wait for a running callback. The
> callback goes on using the adapter: wakeup_timer_fn() sets
> adapter->hw_status, walks the command queues through
> nxpwifi_cancel_all_pending_cmd() and calls adapter->if_ops.card_reset().
> Both paths that reach nxpwifi_adapter_cleanup() free the adapter right
> afterwards, through nxpwifi_free_adapter() in nxpwifi_remove_card() and
> in the nxpwifi_add_card() error unwind.
>
> Use timer_delete_sync() so the callback has finished before the adapter
> is released.
>
Reviewed-by: Jeff Chen <jeff.chen_1@xxxxxxx>