1 /*
2  * Qualcomm Atheros OUI and vendor specific assignments
3  * Copyright (c) 2014-2015, Qualcomm Atheros, Inc.
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef QCA_VENDOR_H
10 #define QCA_VENDOR_H
11 
12 /*
13  * This file is a registry of identifier assignments from the Qualcomm Atheros
14  * OUI 00:13:74 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_QCA 0x001374
20 
21 /**
22  * enum qca_radiotap_vendor_ids - QCA radiotap vendor namespace IDs
23  */
24 enum qca_radiotap_vendor_ids {
25 	QCA_RADIOTAP_VID_WLANTEST = 0,
26 };
27 
28 /**
29  * enum qca_nl80211_vendor_subcmds - QCA nl80211 vendor command identifiers
30  *
31  * @QCA_NL80211_VENDOR_SUBCMD_UNSPEC: Reserved value 0
32  *
33  * @QCA_NL80211_VENDOR_SUBCMD_TEST: Test command/event
34  *
35  * @QCA_NL80211_VENDOR_SUBCMD_ROAMING: Set roaming policy for drivers that use
36  *	internal BSS-selection. This command uses
37  *	@QCA_WLAN_VENDOR_ATTR_ROAMING_POLICY to specify the new roaming policy
38  *	for the current connection (i.e., changes policy set by the nl80211
39  *	Connect command). @QCA_WLAN_VENDOR_ATTR_MAC_ADDR may optionally be
40  *	included to indicate which BSS to use in case roaming is disabled.
41  *
42  * @QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY: Recommendation of frequency
43  *	ranges to avoid to reduce issues due to interference or internal
44  *	co-existence information in the driver. The event data structure is
45  *	defined in struct qca_avoid_freq_list.
46  *
47  * @QCA_NL80211_VENDOR_SUBCMD_DFS_CAPABILITY: Command to check driver support
48  *	for DFS offloading.
49  *
50  * @QCA_NL80211_VENDOR_SUBCMD_NAN: NAN command/event which is used to pass
51  *	NAN Request/Response and NAN Indication messages. These messages are
52  *	interpreted between the framework and the firmware component.
53  *
54  * @QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_SET_KEY: Set key operation that can be
55  *	used to configure PMK to the driver even when not connected. This can
56  *	be used to request offloading of key management operations. Only used
57  *	if device supports QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD.
58  *
59  * @QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH: An extended version of
60  *	NL80211_CMD_ROAM event with optional attributes including information
61  *	from offloaded key management operation. Uses
62  *	enum qca_wlan_vendor_attr_roam_auth attributes. Only used
63  *	if device supports QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD.
64  *
65  * @QCA_NL80211_VENDOR_SUBCMD_DO_ACS: ACS command/event which is used to
66  *	invoke the ACS function in device and pass selected channels to
67  *	hostapd.
68  *
69  * @QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES: Command to get the features
70  *	supported by the driver. enum qca_wlan_vendor_features defines
71  *	the possible features.
72  *
73  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_STARTED: Event used by driver,
74  *	which supports DFS offloading, to indicate a channel availability check
75  *	start.
76  *
77  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_FINISHED: Event used by driver,
78  *	which supports DFS offloading, to indicate a channel availability check
79  *	completion.
80  *
81  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_ABORTED: Event used by driver,
82  *	which supports DFS offloading, to indicate that the channel availability
83  *	check aborted, no change to the channel status.
84  *
85  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_NOP_FINISHED: Event used by
86  *	driver, which supports DFS offloading, to indicate that the
87  *	Non-Occupancy Period for this channel is over, channel becomes usable.
88  *
89  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_RADAR_DETECTED: Event used by driver,
90  *	which supports DFS offloading, to indicate a radar pattern has been
91  *	detected. The channel is now unusable.
92  */
93 enum qca_nl80211_vendor_subcmds {
94 	QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
95 	QCA_NL80211_VENDOR_SUBCMD_TEST = 1,
96 	/* subcmds 2..8 not yet allocated */
97 	QCA_NL80211_VENDOR_SUBCMD_ROAMING = 9,
98 	QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY = 10,
99 	QCA_NL80211_VENDOR_SUBCMD_DFS_CAPABILITY =  11,
100 	QCA_NL80211_VENDOR_SUBCMD_NAN =  12,
101 	QCA_NL80211_VENDOR_SUBMCD_STATS_EXT = 13,
102 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_SET = 14,
103 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_GET = 15,
104 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_CLR = 16,
105 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_RADIO_RESULTS = 17,
106 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_IFACE_RESULTS = 18,
107 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_PEERS_RESULTS = 19,
108 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_START = 20,
109 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_STOP = 21,
110 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_VALID_CHANNELS = 22,
111 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_CAPABILITIES = 23,
112 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_CACHED_RESULTS = 24,
113 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_RESULTS_AVAILABLE = 25,
114 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_FULL_SCAN_RESULT = 26,
115 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_EVENT = 27,
116 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_HOTLIST_AP_FOUND = 28,
117 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SET_BSSID_HOTLIST = 29,
118 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_RESET_BSSID_HOTLIST = 30,
119 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SIGNIFICANT_CHANGE = 31,
120 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SET_SIGNIFICANT_CHANGE = 32,
121 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_RESET_SIGNIFICANT_CHANGE = 33,
122 	QCA_NL80211_VENDOR_SUBCMD_TDLS_ENABLE = 34,
123 	QCA_NL80211_VENDOR_SUBCMD_TDLS_DISABLE = 35,
124 	QCA_NL80211_VENDOR_SUBCMD_TDLS_GET_STATUS = 36,
125 	QCA_NL80211_VENDOR_SUBCMD_TDLS_STATE = 37,
126 	QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES = 38,
127 	QCA_NL80211_VENDOR_SUBCMD_SCANNING_MAC_OUI = 39,
128 	QCA_NL80211_VENDOR_SUBCMD_NO_DFS_FLAG = 40,
129 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_HOTLIST_AP_LOST = 41,
130 	QCA_NL80211_VENDOR_SUBCMD_GET_CONCURRENCY_MATRIX = 42,
131 	/* 43..49 - reserved for QCA */
132 	QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_SET_KEY = 50,
133 	QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH = 51,
134 	QCA_NL80211_VENDOR_SUBCMD_APFIND = 52,
135 	/* 53 - reserved - was used by QCA, but not in use anymore */
136 	QCA_NL80211_VENDOR_SUBCMD_DO_ACS = 54,
137 	QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES = 55,
138 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_STARTED = 56,
139 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_FINISHED = 57,
140 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_ABORTED = 58,
141 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_NOP_FINISHED = 59,
142 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_RADAR_DETECTED = 60,
143 	/* 61-90 - reserved for QCA */
144 	QCA_NL80211_VENDOR_SUBCMD_DATA_OFFLOAD = 91,
145 	QCA_NL80211_VENDOR_SUBCMD_OCB_SET_CONFIG = 92,
146 	QCA_NL80211_VENDOR_SUBCMD_OCB_SET_UTC_TIME = 93,
147 	QCA_NL80211_VENDOR_SUBCMD_OCB_START_TIMING_ADVERT = 94,
148 	QCA_NL80211_VENDOR_SUBCMD_OCB_STOP_TIMING_ADVERT = 95,
149 	QCA_NL80211_VENDOR_SUBCMD_OCB_GET_TSF_TIMER = 96,
150 	QCA_NL80211_VENDOR_SUBCMD_DCC_GET_STATS = 97,
151 	QCA_NL80211_VENDOR_SUBCMD_DCC_CLEAR_STATS = 98,
152 	QCA_NL80211_VENDOR_SUBCMD_DCC_UPDATE_NDL = 99,
153 	QCA_NL80211_VENDOR_SUBCMD_DCC_STATS_EVENT = 100,
154 	QCA_NL80211_VENDOR_SUBCMD_LINK_PROPERTIES = 101,
155 };
156 
157 
158 enum qca_wlan_vendor_attr {
159 	QCA_WLAN_VENDOR_ATTR_INVALID = 0,
160 	/* used by QCA_NL80211_VENDOR_SUBCMD_DFS_CAPABILITY */
161 	QCA_WLAN_VENDOR_ATTR_DFS     = 1,
162 	/* used by QCA_NL80211_VENDOR_SUBCMD_NAN */
163 	QCA_WLAN_VENDOR_ATTR_NAN     = 2,
164 	/* used by QCA_NL80211_VENDOR_SUBCMD_STATS_EXT */
165 	QCA_WLAN_VENDOR_ATTR_STATS_EXT     = 3,
166 	/* used by QCA_NL80211_VENDOR_SUBCMD_STATS_EXT */
167 	QCA_WLAN_VENDOR_ATTR_IFINDEX     = 4,
168 	/* used by QCA_NL80211_VENDOR_SUBCMD_ROAMING, u32 with values defined
169 	 * by enum qca_roaming_policy. */
170 	QCA_WLAN_VENDOR_ATTR_ROAMING_POLICY = 5,
171 	QCA_WLAN_VENDOR_ATTR_MAC_ADDR = 6,
172 	/* used by QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES */
173 	QCA_WLAN_VENDOR_ATTR_FEATURE_FLAGS = 7,
174 	QCA_WLAN_VENDOR_ATTR_TEST = 8,
175 	/* keep last */
176 	QCA_WLAN_VENDOR_ATTR_AFTER_LAST,
177 	QCA_WLAN_VENDOR_ATTR_MAX	= QCA_WLAN_VENDOR_ATTR_AFTER_LAST - 1,
178 };
179 
180 
181 enum qca_roaming_policy {
182 	QCA_ROAMING_NOT_ALLOWED,
183 	QCA_ROAMING_ALLOWED_WITHIN_ESS,
184 };
185 
186 enum qca_wlan_vendor_attr_roam_auth {
187 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_INVALID = 0,
188 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_BSSID,
189 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REQ_IE,
190 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_RESP_IE,
191 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AUTHORIZED,
192 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR,
193 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KCK,
194 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KEK,
195 	/* keep last */
196 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST,
197 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MAX =
198 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST - 1
199 };
200 
201 enum qca_wlan_vendor_attr_acs_offload {
202 	QCA_WLAN_VENDOR_ATTR_ACS_CHANNEL_INVALID = 0,
203 	QCA_WLAN_VENDOR_ATTR_ACS_PRIMARY_CHANNEL,
204 	QCA_WLAN_VENDOR_ATTR_ACS_SECONDARY_CHANNEL,
205 	QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE,
206 	QCA_WLAN_VENDOR_ATTR_ACS_HT_ENABLED,
207 	QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED,
208 	QCA_WLAN_VENDOR_ATTR_ACS_VHT_ENABLED,
209 	QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH,
210 	QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST,
211 	QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG0_CENTER_CHANNEL,
212 	QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG1_CENTER_CHANNEL,
213 	/* keep last */
214 	QCA_WLAN_VENDOR_ATTR_ACS_AFTER_LAST,
215 	QCA_WLAN_VENDOR_ATTR_ACS_MAX =
216 	QCA_WLAN_VENDOR_ATTR_ACS_AFTER_LAST - 1
217 };
218 
219 enum qca_wlan_vendor_acs_hw_mode {
220 	QCA_ACS_MODE_IEEE80211B,
221 	QCA_ACS_MODE_IEEE80211G,
222 	QCA_ACS_MODE_IEEE80211A,
223 	QCA_ACS_MODE_IEEE80211AD,
224 	QCA_ACS_MODE_IEEE80211ANY,
225 };
226 
227 /**
228  * enum qca_wlan_vendor_features - Vendor device/driver feature flags
229  *
230  * @QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD: Device supports key
231  *	management offload, a mechanism where the station's firmware
232  *	does the exchange with the AP to establish the temporal keys
233  *	after roaming, rather than having the user space wpa_supplicant do it.
234  * @QCA_WLAN_VENDOR_FEATURE_SUPPORT_HW_MODE_ANY: Device supports automatic
235  *	band selection based on channel selection results.
236  * @NUM_QCA_WLAN_VENDOR_FEATURES: Number of assigned feature bits
237  */
238 enum qca_wlan_vendor_features {
239 	QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD	= 0,
240 	QCA_WLAN_VENDOR_FEATURE_SUPPORT_HW_MODE_ANY     = 1,
241 	NUM_QCA_WLAN_VENDOR_FEATURES /* keep last */
242 };
243 
244 /**
245  * enum qca_wlan_vendor_attr_data_offload_ind - Vendor Data Offload Indication
246  *
247  * @QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_SESSION: Session corresponding to
248  *	the offloaded data.
249  * @QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_PROTOCOL: Protocol of the offloaded
250  *	data.
251  * @QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_EVENT: Event type for the data offload
252  *	indication.
253  */
254 enum qca_wlan_vendor_attr_data_offload_ind {
255 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_INVALID = 0,
256 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_SESSION,
257 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_PROTOCOL,
258 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_EVENT,
259 
260 	/* keep last */
261 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_AFTER_LAST,
262 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_MAX =
263 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_AFTER_LAST - 1
264 };
265 #endif /* QCA_VENDOR_H */
266