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

Adrian Chadd adrian at FreeBSD.org
Tue Oct 18 12:13:21 UTC 2011


Author: adrian
Date: Tue Oct 18 12:13:20 2011
New Revision: 226508
URL: http://svn.freebsd.org/changeset/base/226508

Log:
  Lock ath_raw_xmit() for now, matching how ath_start() is currently
  locked.

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

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	Tue Oct 18 11:29:10 2011	(r226507)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c	Tue Oct 18 12:13:20 2011	(r226508)
@@ -1663,6 +1663,8 @@ ath_raw_xmit(struct ieee80211_node *ni, 
 	struct ath_buf *bf;
 	int error;
 
+	ATH_LOCK(sc);
+
 	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) {
 		DPRINTF(sc, ATH_DEBUG_XMIT, "%s: discard frame, %s", __func__,
 		    (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ?
@@ -1705,6 +1707,8 @@ ath_raw_xmit(struct ieee80211_node *ni, 
 	ifp->if_opackets++;
 	sc->sc_stats.ast_tx_raw++;
 
+	ATH_UNLOCK(sc);
+
 	return 0;
 bad2:
 	ATH_TXBUF_LOCK(sc);
@@ -1713,6 +1717,7 @@ bad2:
 bad:
 	ifp->if_oerrors++;
 	sc->sc_stats.ast_tx_raw_fail++;
+	ATH_UNLOCK(sc);
 	ieee80211_free_node(ni);
 	return error;
 }


More information about the svn-src-user mailing list