PERFORCE change 76730 for review

Sam Leffler sam at FreeBSD.org
Sun May 8 21:37:04 PDT 2005


http://perforce.freebsd.org/chv.cgi?CH=76730

Change 76730 by sam at sam_ebb on 2005/05/09 04:36:50

	o get correct rate table for turboA
	o check for ff usage properly
	o more tx fragmentation stuff

Affected files ...

.. //depot/projects/vap/sys/dev/ath/if_ath.c#9 edit

Differences ...

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

@@ -1663,7 +1663,7 @@
 
 			pri = M_WME_GETAC(m);
 			txq = sc->sc_ac2q[pri];
-			if (ni->ni_flags & IEEE80211_NODE_FF) {
+			if (IEEE80211_ATH_CAP(ni->ni_vap, ni, FF)) {
 				/*
 				 * Check queue length; if too deep drop this
 				 * frame (tail drop considered good).
@@ -4032,7 +4032,8 @@
 		cip = k->wk_cipher;
 		hdrlen += cip->ic_header;
 		pktlen += cip->ic_header + cip->ic_trailer;
-		if ((k->wk_flags & IEEE80211_KEY_SWMIC) == 0)
+		if ((k->wk_flags & IEEE80211_KEY_SWMIC) == 0 &&
+		    (m0->m_flags & M_FRAG) == 0)
 			pktlen += cip->ic_miclen;
 		keyix = k->wk_keyix;
 
@@ -4192,8 +4193,7 @@
 	if (ismcast) {
 		flags |= HAL_TXDESC_NOACK;	/* no ack on broad/multicast */
 		sc->sc_stats.ast_tx_noack++;
-	} else if (pktlen > vap->iv_rtsthreshold &&
-	    !IEEE80211_ATH_CAP(vap, ni, FF)) {
+	} else if (pktlen > vap->iv_rtsthreshold && (m0->m_flags & M_FF) == 0) {
 		flags |= HAL_TXDESC_RTSENA;	/* RTS based on frame length */
 		cix = rt->info[rix].controlRate;
 		sc->sc_stats.ast_tx_rts++;
@@ -4230,6 +4230,13 @@
 			dur = rt->info[rix].spAckDuration;
 		else
 			dur = rt->info[rix].lpAckDuration;
+		if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) {
+			KASSERT(m0->m_nextpkt != NULL,
+			    ("next fragment missing, fc[1] 0x%x", wh->i_fc[1]));
+			/* SIFS+ACK+time for next fragment */
+			dur += dur + ath_hal_computetxtime(ah, rt,
+				m0->m_nextpkt->m_len, rix, shortPreamble);
+		}
 		*(u_int16_t *)wh->i_dur = htole16(dur);
 	}
 
@@ -5323,7 +5330,7 @@
 		sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_11G);
 		break;
 	case IEEE80211_MODE_TURBO_A:
-		sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108A);
+		sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_TURBO);
 		break;
 	case IEEE80211_MODE_TURBO_G:
 		sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108G);


More information about the p4-projects mailing list