PERFORCE change 133287 for review

Sam Leffler sam at FreeBSD.org
Mon Jan 14 15:45:27 PST 2008


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

Change 133287 by sam at sam_ebb on 2008/01/14 23:44:51

	use per-vap tx seq# space for beacon+probe respones frames; will
	need this also for buffered mcast frames but those aren't visible
	to net80211 just now

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_output.c#21 edit
.. //depot/projects/vap/sys/net80211/ieee80211_var.h#23 edit

Differences ...

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

@@ -392,11 +392,10 @@
 	const uint8_t bssid[IEEE80211_ADDR_LEN])
 {
 #define	WH4(wh)	((struct ieee80211_frame_addr4 *)wh)
+	struct ieee80211vap *vap = ni->ni_vap;
 
 	wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | type;
 	if ((type & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_DATA) {
-		struct ieee80211vap *vap = ni->ni_vap;
-
 		switch (vap->iv_opmode) {
 		case IEEE80211_M_STA:
 			wh->i_fc[1] = IEEE80211_FC1_DIR_TODS;
@@ -434,11 +433,18 @@
 		IEEE80211_ADDR_COPY(wh->i_addr3, bssid);
 	}
 	*(uint16_t *)&wh->i_dur[0] = 0;
-	/* XXX probe response use per-vap seq#? */
-	/* NB: use non-QoS tid */
-	*(uint16_t *)&wh->i_seq[0] =
-	    htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT);
-	ni->ni_txseqs[IEEE80211_NONQOS_TID]++;
+	if ((type & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PROBE_RESP) {
+		/* NB: use per-vap seq# space */
+		*(uint16_t *)&wh->i_seq[0] =
+		    htole16(vap->iv_txseq << IEEE80211_SEQ_SEQ_SHIFT);
+		vap->iv_txseq++;
+	} else {
+		/* NB: use non-QoS tid */
+		*(uint16_t *)&wh->i_seq[0] =
+		    htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] <<
+			IEEE80211_SEQ_SEQ_SHIFT);
+		ni->ni_txseqs[IEEE80211_NONQOS_TID]++;
+	}
 #undef WH4
 }
 
@@ -2413,6 +2419,9 @@
 	uint16_t capinfo;
 
 	IEEE80211_LOCK(ic);
+	*(uint16_t *)&mtod(m, struct ieee80211_frame *)->i_seq[0] =
+	    htole16(vap->iv_txseq << IEEE80211_SEQ_SEQ_SHIFT);
+	vap->iv_txseq++;
 	/*
 	 * Handle 11h channel change when we've reached the count.
 	 * We must recalculate the beacon frame contents to account

==== //depot/projects/vap/sys/net80211/ieee80211_var.h#23 (text+ko) ====

@@ -331,8 +331,9 @@
 	uint16_t		iv_sta_assoc;	/* stations associated */
 	uint16_t		iv_ps_sta;	/* stations in power save */
 	uint16_t		iv_ps_pending;	/* ps sta's w/ pending frames */
+	uint16_t		iv_txseq;	/* mcast xmit seq# space */
+	uint16_t		iv_tim_len;	/* ic_tim_bitmap size (bytes) */
 	uint8_t			*iv_tim_bitmap;	/* power-save stations w/ data*/
-	uint16_t		iv_tim_len;	/* ic_tim_bitmap size (bytes) */
 	uint8_t			iv_dtim_period;	/* DTIM period */
 	uint8_t			iv_dtim_count;	/* DTIM count from last bcn */
 						/* set/unset aid pwrsav state */


More information about the p4-projects mailing list