summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.h
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2009-07-11 15:02:45 +0000
committerrpaulo <rpaulo@FreeBSD.org>2009-07-11 15:02:45 +0000
commit8424d740209fc6cee8a8bc4deba2a40cdc77d1fd (patch)
tree7dd4e6a8c026ec13b70ca0a34e625684d79ec055 /sys/net80211/ieee80211_node.h
parentba5583d31888cb78136b114790fce49c792c14d0 (diff)
downloadFreeBSD-src-8424d740209fc6cee8a8bc4deba2a40cdc77d1fd.zip
FreeBSD-src-8424d740209fc6cee8a8bc4deba2a40cdc77d1fd.tar.gz
Implementation of the upcoming Wireless Mesh standard, 802.11s, on the
net80211 wireless stack. This work is based on the March 2009 D3.0 draft standard. This standard is expected to become final next year. This includes two main net80211 modules, ieee80211_mesh.c which deals with peer link management, link metric calculation, routing table control and mesh configuration and ieee80211_hwmp.c which deals with the actually routing process on the mesh network. HWMP is the mandatory routing protocol on by the mesh standard, but others, such as RA-OLSR, can be implemented. Authentication and encryption are not implemented. There are several scripts under tools/tools/net80211/scripts that can be used to test different mesh network topologies and they also teach you how to setup a mesh vap (for the impatient: ifconfig wlan0 create wlandev ... wlanmode mesh). A new build option is available: IEEE80211_SUPPORT_MESH and it's enabled by default on GENERIC kernels for i386, amd64, sparc64 and pc98. Drivers that support mesh networks right now are: ath, ral and mwl. More information at: http://wiki.freebsd.org/WifiMesh Please note that this work is experimental. Also, please note that bridging a mesh vap with another network interface is not yet supported. Many thanks to the FreeBSD Foundation for sponsoring this project and to Sam Leffler for his support. Also, I would like to thank Gateworks Corporation for sending me a Cambria board which was used during the development of this project. Reviewed by: sam Approved by: re (kensmith) Obtained from: projects/mesh11s
Diffstat (limited to 'sys/net80211/ieee80211_node.h')
-rw-r--r--sys/net80211/ieee80211_node.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h
index 6d26759..63b2355 100644
--- a/sys/net80211/ieee80211_node.h
+++ b/sys/net80211/ieee80211_node.h
@@ -35,7 +35,7 @@
* Each ieee80211com instance has a single timer that fires every
* IEEE80211_INACT_WAIT seconds to handle "inactivity processing".
* This is used to do node inactivity processing when operating
- * as an AP or in adhoc mode. For inactivity processing each node
+ * as an AP, adhoc or mesh mode. For inactivity processing each node
* has a timeout set in it's ni_inact field that is decremented
* on each timeout and the node is reclaimed when the counter goes
* to zero. We use different inactivity timeout values depending
@@ -56,9 +56,9 @@
/* threshold for aging overlapping non-ERP bss */
#define IEEE80211_NONERP_PRESENT_AGE msecs_to_ticks(60*1000)
-#define IEEE80211_NODE_HASHSIZE 32
+#define IEEE80211_NODE_HASHSIZE 32 /* NB: hash size must be pow2 */
/* simple hash is enough for variation of macaddr */
-#define IEEE80211_NODE_HASH(addr) \
+#define IEEE80211_NODE_HASH(ic, addr) \
(((const uint8_t *)(addr))[IEEE80211_ADDR_LEN - 1] % \
IEEE80211_NODE_HASHSIZE)
@@ -81,6 +81,7 @@ struct ieee80211_ies {
uint8_t *htcap_ie; /* captured HTCAP ie */
uint8_t *htinfo_ie; /* captured HTINFO ie */
uint8_t *tdma_ie; /* captured TDMA ie */
+ uint8_t *meshid_ie; /* captured MESH ID ie */
uint8_t *spare[4];
/* NB: these must be the last members of this structure */
uint8_t *data; /* frame data > 802.11 header */
@@ -88,6 +89,20 @@ struct ieee80211_ies {
};
/*
+ * 802.11s (Mesh) Peer Link FSM state.
+ */
+enum ieee80211_mesh_mlstate {
+ IEEE80211_NODE_MESH_IDLE = 0,
+ IEEE80211_NODE_MESH_OPENSNT = 1, /* open frame sent */
+ IEEE80211_NODE_MESH_OPENRCV = 2, /* open frame received */
+ IEEE80211_NODE_MESH_CONFIRMRCV = 3, /* confirm frame received */
+ IEEE80211_NODE_MESH_ESTABLISHED = 4, /* link established */
+ IEEE80211_NODE_MESH_HOLDING = 5, /* link closing */
+};
+#define IEEE80211_MESH_MLSTATE_BITS \
+ "\20\1IDLE\2OPENSNT\2OPENRCV\3CONFIRMRCV\4ESTABLISHED\5HOLDING"
+
+/*
* Node specific information. Note that drivers are expected
* to derive from this structure to add device-specific per-node
* state. This is done by overriding the ic_node_* methods in
@@ -173,6 +188,16 @@ struct ieee80211_node {
uint8_t ni_dtim_period; /* DTIM period */
uint8_t ni_dtim_count; /* DTIM count for last bcn */
+ /* 11s state */
+ uint8_t ni_meshidlen;
+ uint8_t ni_meshid[IEEE80211_MESHID_LEN];
+ enum ieee80211_mesh_mlstate ni_mlstate; /* peering management state */
+ uint16_t ni_mllid; /* link local ID */
+ uint16_t ni_mlpid; /* link peer ID */
+ struct callout ni_mltimer; /* link mesh timer */
+ uint8_t ni_mlrcnt; /* link mesh retry counter */
+ uint8_t ni_mltval; /* link mesh timer value */
+
/* 11n state */
uint16_t ni_htcap; /* HT capabilities */
uint8_t ni_htparam; /* HT params */
OpenPOWER on IntegriCloud