svn commit: r191157 - projects/mesh11s/sys/net80211
Rui Paulo
rpaulo at FreeBSD.org
Thu Apr 16 15:23:34 PDT 2009
Author: rpaulo
Date: Thu Apr 16 22:23:32 2009
New Revision: 191157
URL: http://svn.freebsd.org/changeset/base/191157
Log:
Initial handling of MBSS capability/mode bits.
Sponsored by: The FreeBSD Foundation
Modified:
projects/mesh11s/sys/net80211/ieee80211.c
projects/mesh11s/sys/net80211/ieee80211_mesh.c
projects/mesh11s/sys/net80211/ieee80211_output.c
projects/mesh11s/sys/net80211/ieee80211_var.h
Modified: projects/mesh11s/sys/net80211/ieee80211.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211.c Thu Apr 16 22:22:31 2009 (r191156)
+++ projects/mesh11s/sys/net80211/ieee80211.c Thu Apr 16 22:23:32 2009 (r191157)
@@ -74,6 +74,7 @@ const int ieee80211_opcap[IEEE80211_OPMO
[IEEE80211_M_AHDEMO] = IEEE80211_C_AHDEMO,
[IEEE80211_M_HOSTAP] = IEEE80211_C_HOSTAP,
[IEEE80211_M_MONITOR] = IEEE80211_C_MONITOR,
+ [IEEE80211_M_MBSS] = IEEE80211_C_MBSS,
};
static const uint8_t ieee80211broadcastaddr[IEEE80211_ADDR_LEN] =
@@ -912,6 +913,8 @@ addmedia(struct ifmedia *media, int caps
ADD(media, mword, mopt | IFM_IEEE80211_MONITOR);
if (caps & IEEE80211_C_WDS)
ADD(media, mword, mopt | IFM_IEEE80211_WDS);
+ if (caps & IEEE80211_C_MBSS)
+ ADD(media, mword, mopt | IFM_IEEE80211_MBSS);
#undef ADD
}
@@ -1216,6 +1219,9 @@ media_status(enum ieee80211_opmode opmod
case IEEE80211_M_WDS:
status |= IFM_IEEE80211_WDS;
break;
+ case IEEE80211_M_MBSS:
+ status |= IFM_IEEE80211_MBSS;
+ break;
}
if (IEEE80211_IS_CHAN_HTA(chan)) {
status |= IFM_IEEE80211_11NA;
Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_mesh.c Thu Apr 16 22:22:31 2009 (r191156)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.c Thu Apr 16 22:23:32 2009 (r191157)
@@ -75,6 +75,11 @@ ieee80211_mesh_detach(struct ieee80211co
}
static void
+mesh_vdetach(struct ieee80211vap *vap)
+{
+}
+
+static void
mesh_vattach(struct ieee80211vap *vap)
{
vap->iv_newstate = mesh_newstate;
@@ -98,6 +103,25 @@ mesh_newstate(struct ieee80211vap *vap,
if (ostate != IEEE80211_S_SCAN)
ieee80211_cancel_scan(vap); /* background scan */
switch (nstate) {
+ case IEEE80211_S_INIT:
+ case IEEE80211_S_SCAN:
+ case IEEE80211_S_AUTH:
+ case IEEE80211_S_ASSOC:
+ case IEEE80211_S_CAC:
+ case IEEE80211_S_RUN:
+ case IEEE80211_S_CSA:
+ case IEEE80211_S_SLEEP:
+ default:
+ break;
}
+
+ return 0;
}
+static int
+mesh_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int noise,
+ uint32_t rstamp)
+{
+
+ return 0;
+}
Modified: projects/mesh11s/sys/net80211/ieee80211_output.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_output.c Thu Apr 16 22:22:31 2009 (r191156)
+++ projects/mesh11s/sys/net80211/ieee80211_output.c Thu Apr 16 22:23:32 2009 (r191157)
@@ -453,6 +453,9 @@ ieee80211_send_setup(
break;
case IEEE80211_M_MONITOR: /* NB: to quiet compiler */
break;
+ case IEEE80211_M_MBSS:
+ /* XXXRP TBD */
+ break;
}
} else {
wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
@@ -1009,6 +1012,7 @@ ieee80211_encap(struct ieee80211vap *vap
break;
case IEEE80211_M_MONITOR:
case IEEE80211_M_WDS: /* NB: is4addr should always be true */
+ case IEEE80211_M_MBSS:
goto bad;
}
if (m->m_flags & M_MORE_DATA)
Modified: projects/mesh11s/sys/net80211/ieee80211_var.h
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_var.h Thu Apr 16 22:22:31 2009 (r191156)
+++ projects/mesh11s/sys/net80211/ieee80211_var.h Thu Apr 16 22:23:32 2009 (r191157)
@@ -547,6 +547,7 @@ MALLOC_DECLARE(M_80211_VAP);
#define IEEE80211_C_SHPREAMBLE 0x00008000 /* CAPABILITY: short preamble */
#define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */
#define IEEE80211_C_DFS 0x00020000 /* CAPABILITY: DFS/radar avail*/
+#define IEEE80211_C_MBSS 0x00040000 /* CAPABILITY: MBSS available */
/* 0x7c0000 available */
#define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */
#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */
@@ -563,12 +564,12 @@ MALLOC_DECLARE(M_80211_VAP);
#define IEEE80211_C_OPMODE \
(IEEE80211_C_STA | IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | \
IEEE80211_C_AHDEMO | IEEE80211_C_MONITOR | IEEE80211_C_WDS | \
- IEEE80211_C_TDMA)
+ IEEE80211_C_TDMA | IEEE80211_C_MBSS)
#define IEEE80211_C_BITS \
"\20\1STA\002803ENCAP\7FF\10TURBOP\11IBSS\12PMGT" \
"\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \
- "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \
+ "\21MONITOR\22DFS\23MBSS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \
"\37TXFRAG\40TDMA"
/*
More information about the svn-src-projects
mailing list