Author: adrian
Date: Sun Mar 24 04:09:54 2013
New Revision: 248676
URL: http://svnweb.freebsd.org/changeset/base/248676

Log:
  Move the TXQ lock earlier in this routine - so to correctly protect the
  link pointer check.

Modified:
  head/sys/dev/ath/if_ath_tx.c

Modified: head/sys/dev/ath/if_ath_tx.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx.c        Sun Mar 24 04:09:29 2013        
(r248675)
+++ head/sys/dev/ath/if_ath_tx.c        Sun Mar 24 04:09:54 2013        
(r248676)
@@ -702,6 +702,8 @@ ath_tx_handoff_mcast(struct ath_softc *s
 
        KASSERT((bf->bf_flags & ATH_BUF_BUSY) == 0,
             ("%s: busy status 0x%x", __func__, bf->bf_flags));
+
+       ATH_TXQ_LOCK(txq);
        if (txq->axq_link != NULL) {
                struct ath_buf *last = ATH_TXQ_LAST(txq, axq_q_s);
                struct ieee80211_frame *wh;
@@ -715,7 +717,6 @@ ath_tx_handoff_mcast(struct ath_softc *s
                /* link descriptor */
                *txq->axq_link = bf->bf_daddr;
        }
-       ATH_TXQ_LOCK(txq);
        ATH_TXQ_INSERT_TAIL(txq, bf, bf_list);
        ath_hal_gettxdesclinkptr(sc->sc_ah, bf->bf_lastds, &txq->axq_link);
        ATH_TXQ_UNLOCK(txq);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to