Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Sep 2005 20:47:02 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 83757 for review
Message-ID:  <200509162047.j8GKl2CC021947@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=83757

Change 83757 by sam@sam_ebb on 2005/09/16 20:46:28

	reduce the max xmit attempts for mgt/ctl frames to deal
	with probe response backlog caused by low xmit rates (also
	need to bump the tx buffer pool); adjust the logic for
	deciding when a multi-rate retry callback to the rate control
	module is required as we can no longer depend on the #tries
	to decide (need to rev the rate control module api)

Affected files ...

.. //depot/projects/wifi/sys/dev/ath/if_ath.c#104 edit
.. //depot/projects/wifi/sys/dev/ath/if_athvar.h#43 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ath/if_ath.c#104 (text+ko) ====

@@ -3661,7 +3661,8 @@
 	struct ath_hal *ah = sc->sc_ah;
 	struct ifnet *ifp = sc->sc_ifp;
 	const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams;
-	int i, error, iswep, ismcast, isfrag, keyix, hdrlen, pktlen, try0;
+	int i, error, iswep, ismcast, isfrag, ismrr;
+	int keyix, hdrlen, pktlen, try0;
 	u_int8_t rix, txrate, ctsrate;
 	u_int8_t cix = 0xff;		/* NB: silence compiler */
 	struct ath_desc *ds, *ds0;
@@ -3805,6 +3806,7 @@
 
 	an = ATH_NODE(ni);
 	flags = HAL_TXDESC_CLRDMASK;		/* XXX needed for crypto errs */
+	ismrr = 0;				/* default no multi-rate retry*/
 	/*
 	 * Calculate Atheros packet type from IEEE80211 packet header,
 	 * setup for rate calculations, and select h/w transmit queue.
@@ -3824,7 +3826,7 @@
 		txrate = rt->info[rix].rateCode;
 		if (shortPreamble)
 			txrate |= rt->info[rix].shortPreamble;
-		try0 = ATH_TXMAXTRY;
+		try0 = ATH_TXMGTTRY;
 		/* NB: force all management frames to highest queue */
 		if (ni->ni_flags & IEEE80211_NODE_QOS) {
 			/* NB: force all management frames to highest queue */
@@ -3839,7 +3841,7 @@
 		txrate = rt->info[rix].rateCode;
 		if (shortPreamble)
 			txrate |= rt->info[rix].shortPreamble;
-		try0 = ATH_TXMAXTRY;
+		try0 = ATH_TXMGTTRY;
 		/* NB: force all ctl frames to highest queue */
 		if (ni->ni_flags & IEEE80211_NODE_QOS) {
 			/* NB: force all ctl frames to highest queue */
@@ -3869,12 +3871,14 @@
 			txrate = rt->info[rix].rateCode;
 			if (shortPreamble)
 				txrate |= rt->info[rix].shortPreamble;
-			try0 = ATH_TXMAXTRY;
+			try0 = 1;
 		} else {
 			ath_rate_findrate(sc, an, shortPreamble, pktlen,
 				&rix, &try0, &txrate);
 			sc->sc_txrate = txrate;		/* for LED blinking */
 			sc->sc_lastdatarix = rix;	/* for fast frames */
+			if (try0 != ATH_TXMAXTRY)
+				ismrr = 1;
 		}
 		/*
 		 * Default all non-QoS traffic to the best-effort queue.
@@ -3976,7 +3980,8 @@
 			 * fragment by disabling multi-rate retry which updates
 			 * duration based on the multi-rate duration table.
 			 */
-			try0 = ATH_TXMAXTRY;
+			ismrr = 0;
+			try0 = ATH_TXMGTTRY;	/* XXX? */
 		}
 		*(u_int16_t *)wh->i_dur = htole16(dur);
 	}
@@ -4022,7 +4027,8 @@
 		/*
 		 * Must disable multi-rate retry when using RTS/CTS.
 		 */
-		try0 = ATH_TXMAXTRY;
+		ismrr = 0;
+		try0 = ATH_TXMGTTRY;		/* XXX */
 	} else
 		ctsrate = 0;
 
@@ -4099,7 +4105,7 @@
 	 * when the hardware supports multi-rate retry and
 	 * we don't use it.
 	 */
-	if (try0 != ATH_TXMAXTRY)
+	if (ismrr)
 		ath_rate_setupxtxdesc(sc, an, ds, shortPreamble, rix);
 
 	/*

==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#43 (text+ko) ====

@@ -53,6 +53,7 @@
 #define	ATH_TXBUF	100		/* number of TX buffers */
 #define	ATH_TXDESC	10		/* number of descriptors per buffer */
 #define	ATH_TXMAXTRY	11		/* max number of transmit attempts */
+#define	ATH_TXMGTTRY	4		/* xmit attempts for mgt/ctl frames */
 #define	ATH_TXINTR_PERIOD 5		/* max number of batched tx descriptors */
 
 #define	ATH_BEACON_AIFS_DEFAULT	 0	/* default aifs for ap beacon q */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509162047.j8GKl2CC021947>