diff options
author | monthadar <monthadar@FreeBSD.org> | 2013-02-07 21:21:05 +0000 |
---|---|---|
committer | monthadar <monthadar@FreeBSD.org> | 2013-02-07 21:21:05 +0000 |
commit | 3f965e686d057f5a9c3230680185415dc3356a1a (patch) | |
tree | 83e9cd57c792879864573957025fe92b986cc953 /sys/net80211 | |
parent | 9c4d8abf339fc25f082518f9095e80990874b782 (diff) | |
download | FreeBSD-src-3f965e686d057f5a9c3230680185415dc3356a1a.zip FreeBSD-src-3f965e686d057f5a9c3230680185415dc3356a1a.tar.gz |
Update in ieee80211_action.c for mesh code handlers.
* Removed meshlm_send_action and hwmp_send_action. Introduced one common
for all Mesh Action frames meshaction_send_action. According to 802.11
standard Link Metric and HWMP are all under Mesh Action category;
* Did similar changes to recv_action part;
* The size of meshaction_*_action is set to 12. This is to make room for
the rest of Mesh Action category subtypes;
Approved by: adrian (mentor)
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_action.c | 65 |
1 files changed, 14 insertions, 51 deletions
diff --git a/sys/net80211/ieee80211_action.c b/sys/net80211/ieee80211_action.c index 44543b6..d28e291 100644 --- a/sys/net80211/ieee80211_action.c +++ b/sys/net80211/ieee80211_action.c @@ -67,10 +67,8 @@ static ieee80211_send_action_func *meshpl_send_action[8] = { send_inval, send_inval, send_inval, send_inval, send_inval, send_inval, send_inval, send_inval, }; -static ieee80211_send_action_func *meshlm_send_action[4] = { +static ieee80211_send_action_func *meshaction_send_action[12] = { send_inval, send_inval, send_inval, send_inval, -}; -static ieee80211_send_action_func *hwmp_send_action[8] = { send_inval, send_inval, send_inval, send_inval, send_inval, send_inval, send_inval, send_inval, }; @@ -100,18 +98,10 @@ ieee80211_send_action_register(int cat, int act, ieee80211_send_action_func *f) meshpl_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; - } + if (act >= N(meshaction_send_action)) + break; + meshaction_send_action[act] = f; + return 0; break; case IEEE80211_ACTION_CAT_VENDOR: if (act >= N(vendor_send_action)) @@ -149,16 +139,8 @@ ieee80211_send_action(struct ieee80211_node *ni, int cat, int act, void *sa) f = meshpl_send_action[act]; break; 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; - } + if (act < N(meshaction_send_action)) + f = meshaction_send_action[act]; break; case IEEE80211_ACTION_CAT_VENDOR: if (act < N(vendor_send_action)) @@ -188,10 +170,8 @@ static ieee80211_recv_action_func *meshpl_recv_action[8] = { recv_inval, recv_inval, recv_inval, recv_inval, recv_inval, recv_inval, recv_inval, recv_inval, }; -static ieee80211_recv_action_func *meshlm_recv_action[4] = { +static ieee80211_recv_action_func *meshaction_recv_action[12] = { recv_inval, recv_inval, recv_inval, recv_inval, -}; -static ieee80211_recv_action_func *hwmp_recv_action[8] = { recv_inval, recv_inval, recv_inval, recv_inval, recv_inval, recv_inval, recv_inval, recv_inval, }; @@ -221,19 +201,10 @@ ieee80211_recv_action_register(int cat, int act, ieee80211_recv_action_func *f) meshpl_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; + if (act >= N(meshaction_recv_action)) + break; + meshaction_recv_action[act] = f; + return 0; case IEEE80211_ACTION_CAT_VENDOR: if (act >= N(vendor_recv_action)) break; @@ -274,16 +245,8 @@ ieee80211_recv_action(struct ieee80211_node *ni, f = meshpl_recv_action[ia->ia_action]; break; 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; - } + if (ia->ia_action < N(meshaction_recv_action)) + f = meshaction_recv_action[ia->ia_action]; break; case IEEE80211_ACTION_CAT_VENDOR: if (ia->ia_action < N(vendor_recv_action)) |