• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Definitions for nl80211 vendor command/event access to host driver
4  *
5  * Copyright (C) 1999-2019, Broadcom.
6  *
7  *      Unless you and Broadcom execute a separate written software license
8  * agreement governing use of this software, this software is licensed to you
9  * under the terms of the GNU General Public License version 2 (the "GPL"),
10  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
11  * following added to such license:
12  *
13  *      As a special exception, the copyright holders of this software give you
14  * permission to link this software with independent modules, and to copy and
15  * distribute the resulting executable under terms of your choice, provided that
16  * you also meet, for each linked independent module, the terms and conditions of
17  * the license of that module.  An independent module is a module which is not
18  * derived from this software.  The special exception does not apply to any
19  * modifications of the software.
20  *
21  *      Notwithstanding the above, under no circumstances may you combine this
22  * software in any way with any other Broadcom software provided under a license
23  * other than the GPL, without Broadcom's express prior written consent.
24  *
25  *
26  * <<Broadcom-WL-IPTag/Open:>>
27  *
28  * $Id: brcm_nl80211.h 787269 2018-11-01 11:46:31Z $
29  *
30  */
31 
32 #ifndef _brcm_nl80211_h_
33 #define _brcm_nl80211_h_
34 
35 #define OUI_BRCM  0x001018
36 #define OUI_GOOGLE  0x001A11
37 
38 enum wl_vendor_subcmd {
39 	BRCM_VENDOR_SCMD_UNSPEC		= 0,
40 	BRCM_VENDOR_SCMD_PRIV_STR	= 1,
41 	BRCM_VENDOR_SCMD_BCM_STR	= 2,
42 	BRCM_VENDOR_SCMD_BCM_PSK	= 3,
43 	BRCM_VENDOR_SCMD_SET_PMK	= 4,
44 	BRCM_VENDOR_SCMD_GET_FEATURES	= 5,
45 	BRCM_VENDOR_SCMD_MAX		= 6
46 };
47 
48 struct bcm_nlmsg_hdr {
49 	uint cmd;	/* common ioctl definition */
50 	int len;	/* expected return buffer length */
51 	uint offset;	/* user buffer offset */
52 	uint set;	/* get or set request optional */
53 	uint magic;	/* magic number for verification */
54 };
55 
56 enum bcmnl_attrs {
57 	BCM_NLATTR_UNSPEC,
58 
59 	BCM_NLATTR_LEN,
60 	BCM_NLATTR_DATA,
61 
62 	__BCM_NLATTR_AFTER_LAST,
63 	BCM_NLATTR_MAX = __BCM_NLATTR_AFTER_LAST - 1
64 };
65 
66 struct nl_prv_data {
67 	int err;			/* return result */
68 	void *data;			/* ioctl return buffer pointer */
69 	uint len;			/* ioctl return buffer length */
70 	struct bcm_nlmsg_hdr *nlioc;	/* bcm_nlmsg_hdr header pointer */
71 };
72 
73 #endif /* _brcm_nl80211_h_ */
74