From owner-svn-src-all@freebsd.org Sat Dec 31 07:50:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D10F0C98E05; Sat, 31 Dec 2016 07:50:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91DA0183A; Sat, 31 Dec 2016 07:50:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBV7oE1u058861; Sat, 31 Dec 2016 07:50:14 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBV7oEG6058859; Sat, 31 Dec 2016 07:50:14 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201612310750.uBV7oEG6058859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 31 Dec 2016 07:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310891 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2016 07:50:15 -0000 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); }