summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_mesh.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-03-06 21:20:16 +0000
committeradrian <adrian@FreeBSD.org>2012-03-06 21:20:16 +0000
commit2960bf1153624ff5f817f866e4b2a91c057a7bf4 (patch)
treeb5ca85b3a41a01dd6dac50ebcff29e4fd5988f9f /sys/net80211/ieee80211_mesh.c
parent13aacec1f8c622aee729b991194b07b3ab64b7e9 (diff)
downloadFreeBSD-src-2960bf1153624ff5f817f866e4b2a91c057a7bf4.zip
FreeBSD-src-2960bf1153624ff5f817f866e4b2a91c057a7bf4.tar.gz
Modify HWMP to be able to allocate memory for PREQ/PREP/PERR for all scenarios.
* Added verify_mesh_*_len functions that verify the length according to the amendment spec and return number of destination addresses for allocation of appropriate struct size in memory; * Modified hwmp_recv_action_meshpath to allocate HWMP ie instead of storing them on the stack and store all available field according the flags; * Modify hwmp_add_mesh* to work with all cases of HWMP according to amendment. * Modify hwmp_send_* to calculate correct len of bytes for the HWMP ie. * Added new M_80211_MESH_* malloc defines. * Added macros with magic numbers for HWMP ie sizes according to amendment. * Added the external address to all HWMP ie structs. Submitted by: monthadar@gmail.com
Diffstat (limited to 'sys/net80211/ieee80211_mesh.c')
-rw-r--r--sys/net80211/ieee80211_mesh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index 576e20b..53addfb 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -142,6 +142,10 @@ static struct ieee80211_mesh_proto_metric mesh_proto_metrics[4];
#define MESH_RT_LOCK_ASSERT(ms) mtx_assert(&(ms)->ms_rt_lock, MA_OWNED)
#define MESH_RT_UNLOCK(ms) mtx_unlock(&(ms)->ms_rt_lock)
+MALLOC_DEFINE(M_80211_MESH_PREQ, "80211preq", "802.11 MESH Path Request frame");
+MALLOC_DEFINE(M_80211_MESH_PREP, "80211prep", "802.11 MESH Path Reply frame");
+MALLOC_DEFINE(M_80211_MESH_PERR, "80211perr", "802.11 MESH Path Error frame");
+
MALLOC_DEFINE(M_80211_MESH_RT, "80211mesh", "802.11s routing table");
/*
OpenPOWER on IntegriCloud