xref: /OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/include/brcm_nl80211.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Definitions for nl80211 vendor command/event access to host driver
3  *
4  * Copyright (C) 2020, Broadcom.
5  *
6  *      Unless you and Broadcom execute a separate written software license
7  * agreement governing use of this software, this software is licensed to you
8  * under the terms of the GNU General Public License version 2 (the "GPL"),
9  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10  * following added to such license:
11  *
12  *      As a special exception, the copyright holders of this software give you
13  * permission to link this software with independent modules, and to copy and
14  * distribute the resulting executable under terms of your choice, provided that
15  * you also meet, for each linked independent module, the terms and conditions of
16  * the license of that module.  An independent module is a module which is not
17  * derived from this software.  The special exception does not apply to any
18  * modifications of the software.
19  *
20  *
21  * <<Broadcom-WL-IPTag/Dual:>>
22  *
23  */
24 
25 #ifndef _brcm_nl80211_h_
26 #define _brcm_nl80211_h_
27 
28 //#ifdef OEM_ANDROID Need proper #ifdef in the referencing code as well
29 #define OUI_BRCM  0x001018
30 #define OUI_GOOGLE  0x001A11
31 
32 enum wl_vendor_subcmd {
33 	BRCM_VENDOR_SCMD_UNSPEC			= 0,
34 	BRCM_VENDOR_SCMD_PRIV_STR		= 1,
35 	BRCM_VENDOR_SCMD_BCM_STR		= 2,
36 	BRCM_VENDOR_SCMD_BCM_PSK		= 3,
37 	BRCM_VENDOR_SCMD_SET_PMK		= 4,
38 	BRCM_VENDOR_SCMD_GET_FEATURES		= 5,
39 	BRCM_VENDOR_SCMD_SET_MAC		= 6,
40 	BRCM_VENDOR_SCMD_SET_CONNECT_PARAMS	= 7,
41 	BRCM_VENDOR_SCMD_SET_START_AP_PARAMS	= 8,
42 	BRCM_VENDOR_SCMD_MAX			= 9
43 };
44 
45 struct bcm_nlmsg_hdr {
46 	uint cmd;	/* common ioctl definition */
47 	int len;	/* expected return buffer length */
48 	uint offset;	/* user buffer offset */
49 	uint set;	/* get or set request optional */
50 	uint magic;	/* magic number for verification */
51 };
52 
53 enum bcmnl_attrs {
54 	BCM_NLATTR_UNSPEC,
55 
56 	BCM_NLATTR_LEN,
57 	BCM_NLATTR_DATA,
58 
59 	__BCM_NLATTR_AFTER_LAST,
60 	BCM_NLATTR_MAX = __BCM_NLATTR_AFTER_LAST - 1
61 };
62 
63 struct nl_prv_data {
64 	int err;			/* return result */
65 	void *data;			/* ioctl return buffer pointer */
66 	uint len;			/* ioctl return buffer length */
67 	struct bcm_nlmsg_hdr *nlioc;	/* bcm_nlmsg_hdr header pointer */
68 };
69 //#endif /* OEM_ANDROID */
70 
71 /* Keep common BCM netlink macros here */
72 #define BCM_NL_USER	31
73 #define BCM_NL_OXYGEN	30
74 #define BCM_NL_TS	29
75 /* ====== !! ADD NEW NL socket related defines here !! ====== */
76 
77 #endif /* _brcm_nl80211_h_ */
78