diff options
author | adrian <adrian@FreeBSD.org> | 2012-03-04 05:49:39 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2012-03-04 05:49:39 +0000 |
commit | 8d7335fa92b63c3acd810fb4432ac1d312739f25 (patch) | |
tree | a5fc6ce807c0d87dbd87d4f0b33c75c01fdb8b0d /sys/net80211/ieee80211_action.c | |
parent | 77002eeb6cfd162e6ae4999ec8029a1079f7344f (diff) | |
download | FreeBSD-src-8d7335fa92b63c3acd810fb4432ac1d312739f25.zip FreeBSD-src-8d7335fa92b63c3acd810fb4432ac1d312739f25.tar.gz |
* Added IEEE80211_ACTION_CAT_MESH in ieee80211.h as specified amendment spec;
* Moved old categories as specified by D4.0 to be action fields of MESH category
as specified in amendment spec;
* Modified functions to use MESH category and its action fields:
+ ieee80211_send_action_register
+ ieee80211_send_action
+ ieee80211_recv_action_register
+ieee80211_recv_action;
* Modified ieee80211_hwmp_init and hwmp_send_action so they uses correct
action fields as specified in amendment spec;
* Modified ieee80211_parse_action so that it verifies MESH frames.
* Change Mesh Link Metric to use one information element as amendment spec.
Draft 4.0 defined two different information elements for request and response.
Submitted by: monthadar@gmail.com
Diffstat (limited to 'sys/net80211/ieee80211_action.c')
-rw-r--r-- | sys/net80211/ieee80211_action.c | 84 |
1 files changed, 50 insertions, 34 deletions
diff --git a/sys/net80211/ieee80211_action.c b/sys/net80211/ieee80211_action.c index 8c11471..aa2d9bd 100644 --- a/sys/net80211/ieee80211_action.c +++ b/sys/net80211/ieee80211_action.c @@ -99,16 +99,20 @@ ieee80211_send_action_register(int cat, int act, ieee80211_send_action_func *f) break; meshpl_send_action[act] = f; return 0; - case IEEE80211_ACTION_CAT_MESHLMETRIC: - if (act >= N(meshlm_send_action)) - break; - meshlm_send_action[act] = f; - return 0; - case IEEE80211_ACTION_CAT_MESHPATH: - if (act >= N(hwmp_send_action)) - break; - hwmp_send_action[act] = f; - return 0; + case IEEE80211_ACTION_CAT_MESH: + switch (act) { + case IEEE80211_ACTION_MESH_LMETRIC: + if (act >= N(meshlm_send_action)) + break; + meshlm_send_action[act] = f; + return 0; + case IEEE80211_ACTION_MESH_HWMP: + if (act >= N(hwmp_send_action)) + break; + hwmp_send_action[act] = f; + return 0; + } + break; case IEEE80211_ACTION_CAT_VENDOR: if (act >= N(vendor_send_action)) break; @@ -144,13 +148,17 @@ ieee80211_send_action(struct ieee80211_node *ni, int cat, int act, void *sa) if (act < N(meshpl_send_action)) f = meshpl_send_action[act]; break; - case IEEE80211_ACTION_CAT_MESHLMETRIC: - if (act < N(meshlm_send_action)) - f = meshlm_send_action[act]; - break; - case IEEE80211_ACTION_CAT_MESHPATH: - if (act < N(hwmp_send_action)) - f = hwmp_send_action[act]; + case IEEE80211_ACTION_CAT_MESH: + switch (act) { + case IEEE80211_ACTION_MESH_LMETRIC: + if (act < N(meshlm_send_action)) + f = meshlm_send_action[act]; + break; + case IEEE80211_ACTION_MESH_HWMP: + if (act < N(hwmp_send_action)) + f = hwmp_send_action[act]; + break; + } break; case IEEE80211_ACTION_CAT_VENDOR: if (act < N(vendor_send_action)) @@ -212,16 +220,20 @@ ieee80211_recv_action_register(int cat, int act, ieee80211_recv_action_func *f) break; meshpl_recv_action[act] = f; return 0; - case IEEE80211_ACTION_CAT_MESHLMETRIC: - if (act >= N(meshlm_recv_action)) - break; - meshlm_recv_action[act] = f; - return 0; - case IEEE80211_ACTION_CAT_MESHPATH: - if (act >= N(hwmp_recv_action)) - break; - hwmp_recv_action[act] = f; - return 0; + case IEEE80211_ACTION_CAT_MESH: + switch (act) { + case IEEE80211_ACTION_MESH_LMETRIC: + if (act >= N(meshlm_recv_action)) + break; + meshlm_recv_action[act] = f; + return 0; + case IEEE80211_ACTION_MESH_HWMP: + if (act >= N(hwmp_recv_action)) + break; + hwmp_recv_action[act] = f; + return 0; + } + break; case IEEE80211_ACTION_CAT_VENDOR: if (act >= N(vendor_recv_action)) break; @@ -261,13 +273,17 @@ ieee80211_recv_action(struct ieee80211_node *ni, if (ia->ia_action < N(meshpl_recv_action)) f = meshpl_recv_action[ia->ia_action]; break; - case IEEE80211_ACTION_CAT_MESHLMETRIC: - if (ia->ia_action < N(meshlm_recv_action)) - f = meshlm_recv_action[ia->ia_action]; - break; - case IEEE80211_ACTION_CAT_MESHPATH: - if (ia->ia_action < N(hwmp_recv_action)) - f = hwmp_recv_action[ia->ia_action]; + case IEEE80211_ACTION_CAT_MESH: + switch (ia->ia_action) { + case IEEE80211_ACTION_MESH_LMETRIC: + if (ia->ia_action < N(meshlm_recv_action)) + f = meshlm_recv_action[ia->ia_action]; + break; + case IEEE80211_ACTION_MESH_HWMP: + if (ia->ia_action < N(hwmp_recv_action)) + f = hwmp_recv_action[ia->ia_action]; + break; + } break; case IEEE80211_ACTION_CAT_VENDOR: if (ia->ia_action < N(vendor_recv_action)) |