Date: Sun, 12 Jun 2011 10:14:35 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r223006 - user/adrian/if_ath_tx/sys/dev/ath Message-ID: <201106121014.p5CAEZOm018307@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106121014.p5CAEZOm018307>