svn commit: r240721 - head/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Thu Sep 20 03:03:02 UTC 2012


Author: adrian
Date: Thu Sep 20 03:03:01 2012
New Revision: 240721
URL: http://svn.freebsd.org/changeset/base/240721

Log:
  Add a work-around for some strange net80211 BAR races in the wireless
  stack.
  
  There are unfortunately quite a few odd cases in BAR TX and BAR TX
  retransmission that I haven't yet fully diagnosed.  So for now, add
  this work-around so the resume() function isn't called too often,
  decrementing pause to -1 (and causing things to stay paused.)

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	Thu Sep 20 02:49:25 2012	(r240720)
+++ head/sys/dev/ath/if_ath_tx.c	Thu Sep 20 03:03:01 2012	(r240721)
@@ -5043,10 +5043,19 @@ ath_bar_response(struct ieee80211_node *
 	 * XXX if this is attempt=50, the TID will be downgraded
 	 * XXX to a non-aggregate session. So we must unpause the
 	 * XXX TID here or it'll never be done.
+	 *
+	 * Also, don't call it if bar_tx/bar_wait are 0; something
+	 * has beaten us to the punch? (XXX figure out what?)
 	 */
 	if (status == 0 || attempts == 50) {
 		ATH_TXQ_LOCK(sc->sc_ac2q[atid->ac]);
-		ath_tx_tid_bar_unsuspend(sc, atid);
+		if (atid->bar_tx == 0 || atid->bar_wait == 0)
+			device_printf(sc->sc_dev,
+			    "%s: huh? bar_tx=%d, bar_wait=%d\n",
+			    __func__,
+			    atid->bar_tx, atid->bar_wait);
+		else
+			ath_tx_tid_bar_unsuspend(sc, atid);
 		ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]);
 	}
 }


More information about the svn-src-all mailing list