Re: [PATCH] wifi: mac80211: drain TXQ wake tasklet before freeing hardware

From
Johannes Berg <johannes@sipsolutions.net>
Date
2026-11-03 09:30:00
Also in
linux-mediatek
Reply to
JB Tsai, 2026-11-03
On Tue, 2026-11-03 at 17:09 +0800, JB Tsai wrote:
From: Yin-Ming Li <redacted>

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
Thread (2 messages) 2 messages, 2 authors, last reply 6d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help