Introduce a new lock debug which is specifically for making sure the
_TID_ lock is held. For now the TID lock is also the TXQ lock. This is just to make sure that the right TXQ lock is held for the given TID.
This commit is contained in:
parent
0760025f8f
commit
97dfa39fc4
@ -2030,6 +2030,7 @@ ath_tx_addto_baw(struct ath_softc *sc, struct ath_node *an,
|
||||
struct ieee80211_tx_ampdu *tap;
|
||||
|
||||
ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]);
|
||||
ATH_TID_LOCK_ASSERT(sc, tid);
|
||||
|
||||
if (bf->bf_state.bfs_isretried)
|
||||
return;
|
||||
@ -2102,6 +2103,7 @@ ath_tx_switch_baw_buf(struct ath_softc *sc, struct ath_node *an,
|
||||
int seqno = SEQNO(old_bf->bf_state.bfs_seqno);
|
||||
|
||||
ATH_TXQ_LOCK_ASSERT(sc->sc_ac2q[tid->ac]);
|
||||
ATH_TID_LOCK_ASSERT(sc, tid);
|
||||
|
||||
tap = ath_tx_get_tx_tid(an, tid->tid);
|
||||
index = ATH_BA_INDEX(tap->txa_start, seqno);
|
||||
@ -2304,6 +2306,7 @@ ath_tx_xmit_aggr(struct ath_softc *sc, struct ath_node *an, struct ath_buf *bf)
|
||||
struct ieee80211_tx_ampdu *tap;
|
||||
|
||||
ATH_TXQ_LOCK_ASSERT(txq);
|
||||
ATH_TID_LOCK_ASSERT(sc, tid);
|
||||
|
||||
tap = ath_tx_get_tx_tid(an, tid->tid);
|
||||
|
||||
@ -2374,6 +2377,8 @@ ath_tx_swq(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_txq *txq,
|
||||
tid = ath_tx_gettid(sc, m0);
|
||||
atid = &an->an_tid[tid];
|
||||
|
||||
ATH_TID_LOCK_ASSERT(sc, atid);
|
||||
|
||||
DPRINTF(sc, ATH_DEBUG_SW_TX, "%s: bf=%p, pri=%d, tid=%d, qos=%d\n",
|
||||
__func__, bf, pri, tid, IEEE80211_QOS_HAS_SEQ(wh));
|
||||
|
||||
|
@ -302,6 +302,9 @@ struct ath_txq {
|
||||
#define ATH_TXQ_LOCK_ASSERT(_tq) mtx_assert(&(_tq)->axq_lock, MA_OWNED)
|
||||
#define ATH_TXQ_IS_LOCKED(_tq) mtx_owned(&(_tq)->axq_lock)
|
||||
|
||||
#define ATH_TID_LOCK_ASSERT(_sc, _tid) \
|
||||
ATH_TXQ_LOCK_ASSERT((_sc)->sc_ac2q[(_tid)->ac])
|
||||
|
||||
#define ATH_TXQ_INSERT_HEAD(_tq, _elm, _field) do { \
|
||||
TAILQ_INSERT_HEAD(&(_tq)->axq_q, (_elm), _field); \
|
||||
(_tq)->axq_depth++; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user