Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2013 21:21:05 +0000 (UTC)
From:      Monthadar Al Jaberi <monthadar@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r246502 - head/sys/net80211
Message-ID:  <201302072121.r17LL5Sk010594@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: monthadar
Date: Thu Feb  7 21:21:05 2013
New Revision: 246502
URL: http://svnweb.freebsd.org/changeset/base/246502

Log:
  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)

Modified:
  head/sys/net80211/ieee80211_action.c

Modified: head/sys/net80211/ieee80211_action.c
==============================================================================
--- head/sys/net80211/ieee80211_action.c	Thu Feb  7 21:20:28 2013	(r246501)
+++ head/sys/net80211/ieee80211_action.c	Thu Feb  7 21:21:05 2013	(r246502)
@@ -67,10 +67,8 @@ static ieee80211_send_action_func *meshp
 	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, 
 		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_n
 			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 *meshp
 	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, 
 		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_n
 			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))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302072121.r17LL5Sk010594>