svn commit: r202178 - head/sys/net80211

Rui Paulo rpaulo at FreeBSD.org
Tue Jan 12 22:22:27 UTC 2010


Author: rpaulo
Date: Tue Jan 12 22:22:27 2010
New Revision: 202178
URL: http://svn.freebsd.org/changeset/base/202178

Log:
  Update mesh code to to D4.0.

Modified:
  head/sys/net80211/ieee80211_mesh.c
  head/sys/net80211/ieee80211_mesh.h

Modified: head/sys/net80211/ieee80211_mesh.c
==============================================================================
--- head/sys/net80211/ieee80211_mesh.c	Tue Jan 12 22:06:53 2010	(r202177)
+++ head/sys/net80211/ieee80211_mesh.c	Tue Jan 12 22:22:27 2010	(r202178)
@@ -2381,6 +2381,7 @@ uint8_t *
 ieee80211_add_meshconf(uint8_t *frm, struct ieee80211vap *vap)
 {
 	const struct ieee80211_mesh_state *ms = vap->iv_mesh;
+	uint16_t caps;
 
 	KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a MBSS vap"));
 
@@ -2396,11 +2397,12 @@ ieee80211_add_meshconf(uint8_t *frm, str
 	if (ms->ms_flags & IEEE80211_MESHFLAGS_PORTAL)
 		*frm |= IEEE80211_MESHCONF_FORM_MP;
 	frm += 1;
-	*frm = 0;
+	caps = 0;
 	if (ms->ms_flags & IEEE80211_MESHFLAGS_AP)
-		*frm |= IEEE80211_MESHCONF_CAP_AP;
+		caps |= IEEE80211_MESHCONF_CAP_AP;
 	if (ms->ms_flags & IEEE80211_MESHFLAGS_FWD)
-		*frm |= IEEE80211_MESHCONF_CAP_FWRD;
+		caps |= IEEE80211_MESHCONF_CAP_FWRD;
+	ADDSHORT(frm, caps);
 	frm += 1;
 	return frm;
 }

Modified: head/sys/net80211/ieee80211_mesh.h
==============================================================================
--- head/sys/net80211/ieee80211_mesh.h	Tue Jan 12 22:06:53 2010	(r202177)
+++ head/sys/net80211/ieee80211_mesh.h	Tue Jan 12 22:22:27 2010	(r202178)
@@ -49,7 +49,7 @@ struct ieee80211_meshconf_ie {
 	uint8_t		conf_syncid;	/* Sync. Protocol ID */
 	uint8_t		conf_authid;	/* Auth. Protocol ID */
 	uint8_t		conf_form;	/* Formation Information */
-	uint8_t		conf_cap;
+	uint16_t	conf_cap;
 } __packed;
 
 /* Hybrid Wireless Mesh Protocol */
@@ -72,7 +72,8 @@ struct ieee80211_meshconf_ie {
 #define	IEEE80211_MESHCONF_CAP_FWRD 	0x08	/* forwarding enabled */
 #define	IEEE80211_MESHCONF_CAP_BTR	0x10	/* Beacon Timing Report Enab */
 #define	IEEE80211_MESHCONF_CAP_TBTTA	0x20	/* TBTT Adj. Enabled */
-#define	IEEE80211_MESHCONF_CAP_PSL	0x40	/* Power Save Level */
+#define	IEEE80211_MESHCONF_CAP_TBTT	0x40	/* TBTT Adjusting  */
+#define	IEEE80211_MESHCONF_CAP_PSL	0x80	/* Power Save Level */
 
 /* Mesh Identifier */
 struct ieee80211_meshid_ie {


More information about the svn-src-head mailing list