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

Adrian Chadd adrian at FreeBSD.org
Wed Aug 3 23:36:04 UTC 2011


Author: adrian
Date: Wed Aug  3 23:36:04 2011
New Revision: 224643
URL: http://svn.freebsd.org/changeset/base/224643

Log:
  Hold the ath_node lock when doing TX completion so the rate control code doesn't trample over itself.

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

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Wed Aug  3 20:21:52 2011	(r224642)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Wed Aug  3 23:36:04 2011	(r224643)
@@ -4205,8 +4205,11 @@ ath_tx_processq(struct ath_softc *sc, st
 			 * Hand the descriptor to the rate control algorithm.
 			 */
 			if ((ts->ts_status & HAL_TXERR_FILT) == 0 &&
-			    (bf->bf_txflags & HAL_TXDESC_NOACK) == 0)
+			    (bf->bf_txflags & HAL_TXDESC_NOACK) == 0) {
+				ATH_NODE_LOCK(an);
 				ath_rate_tx_complete(sc, an, bf);
+				ATH_NODE_UNLOCK(an);
+			}
 		}
 
 		if (bf->bf_comp == NULL)


More information about the svn-src-user mailing list