Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2018 08:37:09 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330470 - stable/11/sys/net80211
Message-ID:  <201803050837.w258b9O4023021@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Mon Mar  5 08:37:08 2018
New Revision: 330470
URL: https://svnweb.freebsd.org/changeset/base/330470

Log:
  MFC r310891:
  
  [net80211] add placeholders for the VHT action frame handling.
  
  Upcoming vht support will register send/receive action handlers.

Modified:
  stable/11/sys/net80211/ieee80211.h
  stable/11/sys/net80211/ieee80211_action.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net80211/ieee80211.h
==============================================================================
--- stable/11/sys/net80211/ieee80211.h	Mon Mar  5 08:33:29 2018	(r330469)
+++ stable/11/sys/net80211/ieee80211.h	Mon Mar  5 08:37:08 2018	(r330470)
@@ -367,7 +367,7 @@ struct ieee80211_action {
 #define	IEEE80211_ACTION_CAT_MESH	13	/* Mesh */
 #define	IEEE80211_ACTION_CAT_SELF_PROT	15	/* Self-protected */
 /* 16 - 125 reserved */
-#define	IEEE80211_ACTION_VHT		21
+#define	IEEE80211_ACTION_CAT_VHT	21
 #define	IEEE80211_ACTION_CAT_VENDOR	127	/* Vendor Specific */
 
 #define	IEEE80211_ACTION_HT_TXCHWIDTH	0	/* recommended xmit chan width*/

Modified: stable/11/sys/net80211/ieee80211_action.c
==============================================================================
--- stable/11/sys/net80211/ieee80211_action.c	Mon Mar  5 08:33:29 2018	(r330469)
+++ stable/11/sys/net80211/ieee80211_action.c	Mon Mar  5 08:37:08 2018	(r330470)
@@ -79,6 +79,10 @@ static ieee80211_send_action_func *vendor_send_action[
 	send_inval, send_inval, send_inval, send_inval,
 };
 
+static ieee80211_send_action_func *vht_send_action[3] = {
+	send_inval, send_inval, send_inval,
+};
+
 int
 ieee80211_send_action_register(int cat, int act, ieee80211_send_action_func *f)
 {
@@ -108,6 +112,11 @@ ieee80211_send_action_register(int cat, int act, ieee8
 			break;
 		vendor_send_action[act] = f;
 		return 0;
+	case IEEE80211_ACTION_CAT_VHT:
+		if (act >= nitems(vht_send_action))
+			break;
+		vht_send_action[act] = f;
+		return 0;
 	}
 	return EINVAL;
 }
@@ -144,6 +153,10 @@ ieee80211_send_action(struct ieee80211_node *ni, int c
 		if (act < nitems(vendor_send_action))
 			f = vendor_send_action[act];
 		break;
+	case IEEE80211_ACTION_CAT_VHT:
+		if (act < nitems(vht_send_action))
+			f = vht_send_action[act];
+		break;
 	}
 	return f(ni, cat, act, sa);
 }
@@ -177,6 +190,10 @@ static ieee80211_recv_action_func *vendor_recv_action[
 	recv_inval, recv_inval, recv_inval, recv_inval,
 };
 
+static ieee80211_recv_action_func *vht_recv_action[3] = {
+	recv_inval, recv_inval, recv_inval
+};
+
 int
 ieee80211_recv_action_register(int cat, int act, ieee80211_recv_action_func *f)
 {
@@ -206,6 +223,11 @@ ieee80211_recv_action_register(int cat, int act, ieee8
 			break;
 		vendor_recv_action[act] = f;
 		return 0;
+	case IEEE80211_ACTION_CAT_VHT:
+		if (act >= nitems(vht_recv_action))
+			break;
+		vht_recv_action[act] = f;
+		return 0;
 	}
 	return EINVAL;
 }
@@ -255,6 +277,10 @@ ieee80211_recv_action(struct ieee80211_node *ni,
 	case IEEE80211_ACTION_CAT_VENDOR:
 		if (ia->ia_action < nitems(vendor_recv_action))
 			f = vendor_recv_action[ia->ia_action];
+		break;
+	case IEEE80211_ACTION_CAT_VHT:
+		if (ia->ia_action < nitems(vht_recv_action))
+			f = vht_recv_action[ia->ia_action];
 		break;
 	}
 	return f(ni, wh, frm, efrm);



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