Author: adrian
Date: Sat Dec 31 07:50:14 2016
New Revision: 310891
URL: https://svnweb.freebsd.org/changeset/base/310891

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

Modified:
  head/sys/net80211/ieee80211.h
  head/sys/net80211/ieee80211_action.c

Modified: head/sys/net80211/ieee80211.h
==============================================================================
--- head/sys/net80211/ieee80211.h       Sat Dec 31 06:23:05 2016        
(r310890)
+++ head/sys/net80211/ieee80211.h       Sat Dec 31 07:50:14 2016        
(r310891)
@@ -382,7 +382,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: head/sys/net80211/ieee80211_action.c
==============================================================================
--- head/sys/net80211/ieee80211_action.c        Sat Dec 31 06:23:05 2016        
(r310890)
+++ head/sys/net80211/ieee80211_action.c        Sat Dec 31 07:50:14 2016        
(r310891)
@@ -79,6 +79,10 @@ static ieee80211_send_action_func *vendo
        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, 
                        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_n
                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 *vendo
        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, 
                        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;
 }
@@ -256,6 +278,10 @@ ieee80211_recv_action(struct ieee80211_n
                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);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to