mirror of
https://github.com/opnsense/src.git
synced 2026-02-19 02:30:08 -05:00
net80211: add IEEE80211_IS_LOCKED()
When trying to sort out a teardown locking problem (downcall in the driver can sleep) I found that the fan-out tree was getting too big to fix net80211 locking per-se for this while working on entirely different problems. Add IEEE80211_IS_LOCKED() so the driver can check and un-/re-lock as necessary (as we do in other cases already) to avoid panics on debug kernels left and right. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D48475 (cherry picked from commit 054c5ddf587a7a0c430cf64dbf100b718eafdcc5)
This commit is contained in:
parent
4d027e53be
commit
4eaf978df5
1 changed files with 2 additions and 0 deletions
|
|
@ -73,6 +73,8 @@ typedef struct {
|
|||
mtx_assert(IEEE80211_LOCK_OBJ(_ic), MA_OWNED)
|
||||
#define IEEE80211_UNLOCK_ASSERT(_ic) \
|
||||
mtx_assert(IEEE80211_LOCK_OBJ(_ic), MA_NOTOWNED)
|
||||
#define IEEE80211_IS_LOCKED(_ic) \
|
||||
mtx_owned(IEEE80211_LOCK_OBJ(_ic))
|
||||
|
||||
/*
|
||||
* Transmit lock.
|
||||
|
|
|
|||
Loading…
Reference in a new issue