Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 2009 11:49:20 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r191560 - projects/mesh11s/sys/net80211
Message-ID:  <200904271149.n3RBnKNE014338@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rpaulo
Date: Mon Apr 27 11:49:20 2009
New Revision: 191560
URL: http://svn.freebsd.org/changeset/base/191560

Log:
  Add mesh IEs to probe response construction routines.
  While there, sync the way we construct beacons with probe responses.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/mesh11s/sys/net80211/ieee80211_output.c

Modified: projects/mesh11s/sys/net80211/ieee80211_output.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_output.c	Mon Apr 27 11:14:55 2009	(r191559)
+++ projects/mesh11s/sys/net80211/ieee80211_output.c	Mon Apr 27 11:49:20 2009	(r191560)
@@ -2031,6 +2031,8 @@ ieee80211_alloc_proberesp(struct ieee802
 	 *	[tlv] Vendor OUI HT information (optional)
 	 *	[tlv] Atheros capabilities
 	 *	[tlv] AppIE's (optional)
+	 *	[tlv] Mesh ID (MBSS)
+	 *	[tlv] Mesh Conf (MBSS)
 	 */
 	m = ieee80211_getmgtframe(&frm,
 		 ic->ic_headroom + sizeof(struct ieee80211_frame),
@@ -2055,6 +2057,8 @@ ieee80211_alloc_proberesp(struct ieee802
 #ifdef IEEE80211_SUPPORT_SUPERG
 	       + sizeof(struct ieee80211_ath_ie)
 #endif
+	       + 2 + IEEE80211_MESHID_LEN
+	       /* + sizeof(struct ieee80211_meshconf_ie) */
 	       + (vap->iv_appie_proberesp != NULL ?
 			vap->iv_appie_proberesp->ie_len : 0)
 	);
@@ -2144,6 +2148,10 @@ ieee80211_alloc_proberesp(struct ieee802
 #endif
 	if (vap->iv_appie_proberesp != NULL)
 		frm = add_appie(frm, vap->iv_appie_proberesp);
+	if (vap->iv_opmode == IEEE80211_M_MBSS) {
+		frm = ieee80211_add_meshid(frm, vap);
+		/* frm = ieee80211_add_mesconf(frm, vap); */
+	}
 	m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
 
 	return m;
@@ -2332,12 +2340,12 @@ ieee80211_beacon_construct(struct mbuf *
 	 * XXX Vendor-specific OIDs (e.g. Atheros)
 	 *	[tlv] WPA parameters
 	 *	[tlv] WME parameters
-	 *	[tlv] MESH ID
-	 *	[tlv] MESH configuration
 	 *	[tlv] Vendor OUI HT capabilities (optional)
 	 *	[tlv] Vendor OUI HT information (optional)
 	 *	[tlv] Atheros capabilities (optional)
 	 *	[tlv] TDMA parameters (optional)
+	 *	[tlv] Mesh ID (MBSS)
+	 *	[tlv] Mesh Conf (MBSS)
 	 *	[tlv] application data (optional)
 	 */
 
@@ -2500,6 +2508,8 @@ ieee80211_beacon_alloc(struct ieee80211_
 	 *	[tlv] WPA parameters
 	 *	[tlv] WME parameters
 	 *	[tlv] TDMA parameters (optional)
+	 *	[tlv] Mesh ID (MBSS)
+	 *	[tlv] Mesh Conf (MBSS)
 	 *	[tlv] application data (optional)
 	 * NB: we allocate the max space required for the TIM bitmap.
 	 * XXX how big is this?
@@ -2531,6 +2541,10 @@ ieee80211_beacon_alloc(struct ieee80211_
 		 + (vap->iv_caps & IEEE80211_C_TDMA ?	/* TDMA */
 			sizeof(struct ieee80211_tdma_param) : 0)
 #endif
+		 + (vap->iv_opmode == IEEE80211_M_MBSS ?
+			2 + ni->ni_meshidlen) : 0
+		 /* + (vap->iv_opmode == IEEE80211_M_MBSS ?
+			sizeof(struct ieee80211_meshconf_ie) : 0 */
 		 + IEEE80211_MAX_APPIE
 		 ;
 	m = ieee80211_getmgtframe(&frm,



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