Skip to content
Commit f0325e38 authored by Tony Lindgren's avatar Tony Lindgren Committed by Kalle Valo
Browse files

wlcore: Use spin_trylock in wlcore_irq_locked() for running the queue



We currently have a collection of flags and locking between the
threaded irq and tx work:

- wl->flags bitops
- wl->mutex
- wl->wl_lock spinlock

The bitops flags do not need a spinlock around them, and
wlcore_irq() already holds the mutex calling wlcore_irq_locked().
And we only need the spinlock to see if we need to run the queue
or not.

To simplify the locking, we can use spin_trylock and always run the
tx queue unless we know there's nothing to do.

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200702162951.45392-3-tony@atomide.com
parent eb215c33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment