svn commit: r223006 - user/adrian/if_ath_tx/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Sun Jun 12 10:14:35 UTC 2011


Author: adrian
Date: Sun Jun 12 10:14:35 2011
New Revision: 223006
URL: http://svn.freebsd.org/changeset/base/223006

Log:
  * don't worry about logging the lack of comlock for now; I'll dig deeper
    soon
  * Don't hold the txq lock whilst freeing buffers; mirror what's done
    elsewhere when manipulating the txq.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sun Jun 12 10:13:48 2011	(r223005)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Sun Jun 12 10:14:35 2011	(r223006)
@@ -5771,12 +5771,14 @@ ath_sc_flushtxq(struct ath_softc *sc)
 {
 	struct ieee80211com *ic = sc->sc_ifp->if_l2com;
 
+#if 0
 	//IEEE80211_LOCK_ASSERT(ic);
 	/* Debug if we don't own the lock! */
 	if (! mtx_owned(IEEE80211_LOCK_OBJ(ic))) {
 		device_printf(sc->sc_dev, "%s: comlock not owned?\n",
 		    __func__);
 	}
+#endif
 
 	ieee80211_iterate_nodes(&ic->ic_sta, ath_vap_flush_node, sc);
 }

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sun Jun 12 10:13:48 2011	(r223005)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Sun Jun 12 10:14:35 2011	(r223006)
@@ -1385,15 +1385,17 @@ ath_tx_tid_free_pkts(struct ath_softc *s
 
 
 	/* Walk the queue, free frames */
-	ATH_TXQ_LOCK(atid);
 	for (;;) {
-	bf = STAILQ_FIRST(&atid->axq_q);
-		if (bf == NULL)
+		ATH_TXQ_LOCK(atid);
+		bf = STAILQ_FIRST(&atid->axq_q);
+		if (bf == NULL) {
+			ATH_TXQ_UNLOCK(atid);
 			break;
+		}
 		ATH_TXQ_REMOVE_HEAD(atid, bf_list);
+		ATH_TXQ_UNLOCK(atid);
 		ath_tx_buf_drainone(sc, bf);
 	}
-	ATH_TXQ_UNLOCK(atid);
 }
 
 /*


More information about the svn-src-user mailing list