diff options
| author | Adrian Chadd <adrian@FreeBSD.org> | 2025-09-21 04:55:45 +0000 |
|---|---|---|
| committer | Adrian Chadd <adrian@FreeBSD.org> | 2025-10-04 02:55:14 +0000 |
| commit | 262172de955ff09f5029039f0d823996a63ff3d1 (patch) | |
| tree | f733d9b5475e02c15416193d3f41edf8e30fc1f1 | |
| parent | f53137556059764f5c028880d09d3c234877d37f (diff) | |
iwx: add some lock assertions in the TX start path
The locking paths into these routines LOOK correct, but I figured
it'd be good to at least enforce we're not doing concurrent entry
into iwx_start() / iwx_tx() without the lock held.
Differential Revision: https://reviews.freebsd.org/D52655
Reviewed by: thj
| -rw-r--r-- | sys/dev/iwx/if_iwx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 5be7f2755598..557b5a7a1ca2 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -4805,6 +4805,8 @@ iwx_rx_tx_cmd(struct iwx_softc *sc, struct iwx_rx_packet *pkt, static void iwx_clear_oactive(struct iwx_softc *sc, struct iwx_tx_ring *ring) { + IWX_ASSERT_LOCKED(sc); + if (ring->queued < iwx_lomark) { sc->qfullmsk &= ~(1 << ring->qid); if (sc->qfullmsk == 0 /* && ifq_is_oactive(&ifp->if_snd) */) { @@ -5630,6 +5632,8 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni) struct mbuf *m1; size_t txcmd_size; + IWX_ASSERT_LOCKED(sc); + wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; @@ -8534,6 +8538,8 @@ iwx_start(struct iwx_softc *sc) struct ieee80211_node *ni; struct mbuf *m; + IWX_ASSERT_LOCKED(sc); + while (sc->qfullmsk == 0 && (m = mbufq_dequeue(&sc->sc_snd)) != NULL) { ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (iwx_tx(sc, m, ni) != 0) { |
