Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Feb 2004 14:49:31 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 46380 for review
Message-ID:  <200402022249.i12MnVv3089378@repoman.freebsd.org>

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

Change 46380 by sam@sam_ebb on 2004/02/02 14:48:53

	beacons may have dtim or atim dependiny on whether they are
	for ibss or ap operation; change various names to be agnostic

Affected files ...

.. //depot/projects/netperf+sockets/sys/net80211/ieee80211_output.c#14 edit
.. //depot/projects/netperf+sockets/sys/net80211/ieee80211_proto.h#6 edit
.. //depot/projects/netperf+sockets/sys/net80211/ieee80211_var.h#9 edit

Differences ...

==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_output.c#14 (text+ko) ====

@@ -687,6 +687,7 @@
 		 pktlen += 3;		/* ERP information element */
 	if (rs->rs_nrates > IEEE80211_RATE_SIZE)
 		pktlen += 2;		/* extended rate set */
+	/* XXX may be better to just allocate a max-sized buffer */
 	m = ieee80211_getmgtframe(&frm, pktlen);
 	if (m == NULL) {
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_ANY,
@@ -733,14 +734,13 @@
 		*frm++ = 1;
 		*frm++ = ieee80211_chan2ieee(ic, ni->ni_chan);
 	}
+	bo->bo_tim = frm;
 	if (ic->ic_opmode == IEEE80211_M_IBSS) {
 		*frm++ = IEEE80211_ELEMID_IBSSPARMS;
 		*frm++ = 2;
 		*frm++ = 0; *frm++ = 0;		/* TODO: ATIM window */
-		bo->bo_dtim = NULL;
-		bo->bo_dtim_len = 0;
+		bo->bo_tim_len = 4;
 	} else {
-		bo->bo_dtim = frm;
 		/* TODO: TIM */
 		*frm++ = IEEE80211_ELEMID_TIM;
 		*frm++ = 4;	/* length */
@@ -748,7 +748,7 @@
 		*frm++ = 1;	/* DTIM period */
 		*frm++ = 0;	/* bitmap control */
 		*frm++ = 0;	/* Partial Virtual Bitmap (variable length) */
-		bo->bo_dtim_len = 6;
+		bo->bo_tim_len = 6;
 	}
 	if (ic->ic_curmode == IEEE80211_MODE_11G)
 		frm = ieee80211_add_erp(frm, ic);
@@ -787,16 +787,18 @@
 		capinfo |= IEEE80211_CAPINFO_SHORT_SLOTTIME;
 	*bo->bo_caps = htole16(capinfo);
 
-	if (ic->ic_flags & IEEE80211_F_DTIMUPDATE) {
+	if (ic->ic_flags & IEEE80211_F_TIMUPDATE) {
 		/* 
-		 * DTIM needs updating.  If it fits in the current
-		 * space allocated then just copy in the new bits.
-		 * Otherwise we need to move any extended rate set
-		 * the follows and, possibly, allocate a new mbuf
-		 * if the this current mbuf isn't large enough.
+		 * ATIM/DTIM needs updating.  If it fits in the
+		 * current space allocated then just copy in the
+		 * new bits.  Otherwise we need to move any extended
+		 * rate set the follows and, possibly, allocate a
+		 * new buffer if the this current one isn't large
+		 * enough.  XXX It may be better to just allocate
+		 * a max-sized buffer so we don't re-allocate.
 		 */
 		/* XXX fillin */
-		ic->ic_flags &= ~IEEE80211_F_DTIMUPDATE;
+		ic->ic_flags &= ~IEEE80211_F_TIMUPDATE;
 	}
 	return 0;
 }

==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_proto.h#6 (text+ko) ====

@@ -87,12 +87,12 @@
  */
 struct ieee80211_beacon_offsets {
 	u_int16_t	*bo_caps;	/* capabilities */
-	u_int8_t	*bo_dtim;	/* start of dtim */
+	u_int8_t	*bo_tim;	/* start of atim/dtim */
 	u_int8_t	*bo_xrates;	/* start of extended rates */
-	u_int16_t	bo_dtim_len;	/* dtim length in bytes */
+	u_int16_t	bo_tim_len;	/* atim/dtim length in bytes */
 	u_int16_t	bo_xrates_len;	/* xrates length in bytes */
 };
-extern	struct mbuf * ieee80211_beacon_alloc(struct ieee80211com *,
+extern	struct mbuf *ieee80211_beacon_alloc(struct ieee80211com *,
 		struct ieee80211_node *, struct ieee80211_beacon_offsets *);
 extern	int ieee80211_beacon_update(struct ieee80211com *,
 		struct ieee80211_node *, struct ieee80211_beacon_offsets *,

==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_var.h#9 (text+ko) ====

@@ -263,7 +263,7 @@
 #define	IEEE80211_F_DATAPAD	0x00080000	/* CONF: do alignment pad */
 #define	IEEE80211_F_USEPROT	0x00100000	/* STATUS: protection enabled */
 #define	IEEE80211_F_USEBARKER	0x00200000	/* STATUS: use barker preamble*/
-#define	IEEE80211_F_DTIMUPDATE	0x00400000	/* STATUS: update beacon dtim */
+#define	IEEE80211_F_TIMUPDATE	0x00400000	/* STATUS: update beacon tim */
 
 /* ic_caps */
 #define	IEEE80211_C_WEP		0x00000001	/* CAPABILITY: WEP available */



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