Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Aug 2008 01:03:37 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 148144 for review
Message-ID:  <200808230103.m7N13bF4092011@repoman.freebsd.org>

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

Change 148144 by sam@sam_ebb on 2008/08/23 01:02:48

	o mark potential ampdu aggregates on the tx path
	o don't assign seq#'s to potential aggregates; right now these
	  must be assigned by the driver as it's the one that decides
	  when to release frames from it's aggregation q(s); this will
	  change when tx aggregation is moved up to net80211

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_output.c#53 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_output.c#53 (text+ko) ====

@@ -1052,6 +1052,7 @@
 				 * Operational, mark frame for aggregation.
 				 */
 				qos[0] |= IEEE80211_QOS_ACKPOLICY_BA;
+				m->m_flags |= M_AMPDU_MPDU;
 			} else if (!IEEE80211_AMPDU_REQUESTED(tap) &&
 			    ic->ic_ampdu_enable(ni, tap)) {
 				/*
@@ -1066,9 +1067,23 @@
 		qos[1] = 0;
 		wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS;
 
-		*(uint16_t *)wh->i_seq =
-		    htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT);
-		ni->ni_txseqs[tid]++;
+		if ((m->m_flags & M_AMPDU_MPDU) == 0) {
+			/*
+			 * NB: don't assign a sequence # to potential
+			 * aggregates; we expect this happens at the
+			 * point the frame comes off any aggregation q
+			 * as otherwise we may introduce holes in the
+			 * BA sequence space and/or make window accouting
+			 * more difficult.
+			 *
+			 * XXX may want to control this with a driver
+			 * capability; this may also change when we pull
+			 * aggregation up into net80211
+			 */
+			*(uint16_t *)wh->i_seq =
+			    htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT);
+			ni->ni_txseqs[tid]++;
+		}
 	} else {
 		*(uint16_t *)wh->i_seq =
 		    htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT);



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