xref: /freebsd/contrib/wpa/src/common/brcm_vendor.h (revision 6ba2210ee039f2f12878c217bcf058e9c8b26b29)
1 /*
2  * Broadcom Corporation OUI and vendor specific assignments
3  * Copyright (c) 2020, Broadcom Corporation.
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef BRCM_VENDOR_H
10 #define BRCM_VENDOR_H
11 
12 /*
13  * This file is a registry of identifier assignments from the Broadcom
14  * OUI 00:10:18 for purposes other than MAC address assignment. New identifiers
15  * can be assigned through normal review process for changes to the upstream
16  * hostap.git repository.
17  */
18 
19 #define OUI_BRCM    0x001018
20 
21 /**
22  * enum brcm_nl80211_vendor_subcmds - BRCM nl80211 vendor command identifiers
23  *
24  * @BRCM_VENDOR_SCMD_UNSPEC: Reserved value 0
25  *
26  * @BRCM_VENDOR_SCMD_PRIV_STR: Provide vendor private cmds to send to FW.
27  *
28  * @BRCM_VENDOR_SCMD_BCM_STR:  Provide vendor cmds to BCMDHD driver.
29  *
30  * @BRCM_VENDOR_SCMD_BCM_PSK: Used to set SAE password.
31  *
32  * @BRCM_VENDOR_SCMD_SET_PMK: Command to check driver support
33  *	for DFS offloading.
34  *
35  * @BRCM_VENDOR_SCMD_GET_FEATURES: Command to get the features
36  *      supported by the driver.
37  *
38  * @BRCM_VENDOR_SCMD_SET_MAC: Set random mac address for P2P interface.
39  *
40  * @BRCM_VENDOR_SCMD_SET_CONNECT_PARAMS: Set some connect parameters.
41  *      Used for the case that FW handle SAE.
42  *
43  * @BRCM_VENDOR_SCMD_SET_START_AP_PARAMS: Set SoftAP paramters.
44  *      Used for the case that FW handle SAE.
45  *
46  * @BRCM_VENDOR_SCMD_ACS: ACS command/event which is used to
47  *	invoke the ACS function in device and pass selected channels to
48  *	hostapd. Uses enum qca_wlan_vendor_attr_acs_offload attributes.
49  *
50  * @BRCM_VENDOR_SCMD_MAX: This acts as a the tail of cmds list.
51  *      Make sure it located at the end of the list.
52  *
53  */
54 enum brcm_nl80211_vendor_subcmds {
55 	BRCM_VENDOR_SCMD_UNSPEC			= 0,
56 	BRCM_VENDOR_SCMD_PRIV_STR		= 1,
57 	BRCM_VENDOR_SCMD_BCM_STR		= 2,
58 	BRCM_VENDOR_SCMD_BCM_PSK		= 3,
59 	BRCM_VENDOR_SCMD_SET_PMK		= 4,
60 	BRCM_VENDOR_SCMD_GET_FEATURES		= 5,
61 	BRCM_VENDOR_SCMD_SET_MAC		= 6,
62 	BRCM_VENDOR_SCMD_SET_CONNECT_PARAMS	= 7,
63 	BRCM_VENDOR_SCMD_SET_START_AP_PARAMS	= 8,
64 	BRCM_VENDOR_SCMD_ACS			= 9,
65 	BRCM_VENDOR_SCMD_MAX			= 10
66 };
67 
68 /**
69  * enum brcm_nl80211_vendor_events - BRCM nl80211 asynchoronous event identifiers
70  *
71  * @BRCM_VENDOR_EVENT_UNSPEC: Reserved value 0
72  *
73  * @BRCM_VENDOR_EVENT_PRIV_STR: String command/event
74  */
75 enum brcm_nl80211_vendor_events {
76 	BRCM_VENDOR_EVENT_UNSPEC		= 0,
77 	BRCM_VENDOR_EVENT_PRIV_STR		= 1,
78 	GOOGLE_GSCAN_SIGNIFICANT_EVENT		= 2,
79 	GOOGLE_GSCAN_GEOFENCE_FOUND_EVENT	= 3,
80 	GOOGLE_GSCAN_BATCH_SCAN_EVENT		= 4,
81 	GOOGLE_SCAN_FULL_RESULTS_EVENT		= 5,
82 	GOOGLE_RTT_COMPLETE_EVENT		= 6,
83 	GOOGLE_SCAN_COMPLETE_EVENT		= 7,
84 	GOOGLE_GSCAN_GEOFENCE_LOST_EVENT	= 8,
85 	GOOGLE_SCAN_EPNO_EVENT			= 9,
86 	GOOGLE_DEBUG_RING_EVENT			= 10,
87 	GOOGLE_FW_DUMP_EVENT			= 11,
88 	GOOGLE_PNO_HOTSPOT_FOUND_EVENT		= 12,
89 	GOOGLE_RSSI_MONITOR_EVENT		= 13,
90 	GOOGLE_MKEEP_ALIVE_EVENT		= 14,
91 
92 	/*
93 	 * BRCM specific events should be placed after
94 	 * the Generic events so that enums don't mismatch
95 	 * between the DHD and HAL
96 	 */
97 	GOOGLE_NAN_EVENT_ENABLED		= 15,
98 	GOOGLE_NAN_EVENT_DISABLED		= 16,
99 	GOOGLE_NAN_EVENT_SUBSCRIBE_MATCH	= 17,
100 	GOOGLE_NAN_EVENT_REPLIED		= 18,
101 	GOOGLE_NAN_EVENT_PUBLISH_TERMINATED	= 19,
102 	GOOGLE_NAN_EVENT_SUBSCRIBE_TERMINATED	= 20,
103 	GOOGLE_NAN_EVENT_DE_EVENT		= 21,
104 	GOOGLE_NAN_EVENT_FOLLOWUP		= 22,
105 	GOOGLE_NAN_EVENT_TRANSMIT_FOLLOWUP_IND	= 23,
106 	GOOGLE_NAN_EVENT_DATA_REQUEST		= 24,
107 	GOOGLE_NAN_EVENT_DATA_CONFIRMATION	= 25,
108 	GOOGLE_NAN_EVENT_DATA_END		= 26,
109 	GOOGLE_NAN_EVENT_BEACON			= 27,
110 	GOOGLE_NAN_EVENT_SDF			= 28,
111 	GOOGLE_NAN_EVENT_TCA			= 29,
112 	GOOGLE_NAN_EVENT_SUBSCRIBE_UNMATCH	= 30,
113 	GOOGLE_NAN_EVENT_UNKNOWN		= 31,
114 	GOOGLE_ROAM_EVENT_START			= 32,
115 	BRCM_VENDOR_EVENT_HANGED                = 33,
116 	BRCM_VENDOR_EVENT_SAE_KEY               = 34,
117 	BRCM_VENDOR_EVENT_BEACON_RECV           = 35,
118 	BRCM_VENDOR_EVENT_PORT_AUTHORIZED       = 36,
119 	GOOGLE_FILE_DUMP_EVENT			= 37,
120 	BRCM_VENDOR_EVENT_CU			= 38,
121 	BRCM_VENDOR_EVENT_WIPS			= 39,
122 	NAN_ASYNC_RESPONSE_DISABLED		= 40,
123 	BRCM_VENDOR_EVENT_RCC_INFO		= 41,
124 	BRCM_VENDOR_EVENT_ACS			= 42,
125 	BRCM_VENDOR_EVENT_LAST
126 
127 };
128 
129 #ifdef CONFIG_BRCM_SAE
130 enum wifi_sae_key_attr {
131 	BRCM_SAE_KEY_ATTR_BSSID,
132 	BRCM_SAE_KEY_ATTR_PMK,
133 	BRCM_SAE_KEY_ATTR_PMKID
134 };
135 #endif /* CONFIG_BRCM_SAE */
136 
137 enum wl_vendor_attr_acs_offload {
138 	BRCM_VENDOR_ATTR_ACS_CHANNEL_INVALID = 0,
139 	BRCM_VENDOR_ATTR_ACS_PRIMARY_FREQ,
140 	BRCM_VENDOR_ATTR_ACS_SECONDARY_FREQ,
141 	BRCM_VENDOR_ATTR_ACS_VHT_SEG0_CENTER_CHANNEL,
142 	BRCM_VENDOR_ATTR_ACS_VHT_SEG1_CENTER_CHANNEL,
143 
144 	BRCM_VENDOR_ATTR_ACS_HW_MODE,
145 	BRCM_VENDOR_ATTR_ACS_HT_ENABLED,
146 	BRCM_VENDOR_ATTR_ACS_HT40_ENABLED,
147 	BRCM_VENDOR_ATTR_ACS_VHT_ENABLED,
148 	BRCM_VENDOR_ATTR_ACS_CHWIDTH,
149 	BRCM_VENDOR_ATTR_ACS_CH_LIST,
150 	BRCM_VENDOR_ATTR_ACS_FREQ_LIST,
151 
152 	BRCM_VENDOR_ATTR_ACS_LAST
153 };
154 
155 
156 #endif /* BRCM_VENDOR_H */
157