[PATCH] wifi: mac80211: drain TXQ wake tasklet before freeing hardware
Johannes Berg
johannes at sipsolutions.net
Tue Nov 3 01:29:47 PST 2026
On Tue, 2026-11-03 at 17:09 +0800, JB Tsai wrote:
> From: Yin-Ming Li <evan-ym.li at mediatek.com>
>
> Driver queue wakeups schedule wake_txqs_tasklet asynchronously. Stopping
> the driver work that issued a wakeup does not wait for this tasklet, and
> ieee80211_unregister_hw() does not drain it.
>
> Drain the tasklet in ieee80211_free_hw(), before destroying the local
> mutex and releasing the hardware allocation. Drivers must stop their
> asynchronous producers before calling ieee80211_free_hw(); this drain
> waits for a tasklet those producers have already scheduled. Using the
> final free boundary also covers deferred wakeups scheduled while the
> driver finishes bus teardown after ieee80211_unregister_hw() returns.
This isn't really making sense, how would the *driver* possibly schedule
something on this tasklet after unregister_hw() and get past
tasklet_kill() too??
johannes
More information about the Linux-mediatek
mailing list