2 This file defines the EFI Wireless MAC Connection II Protocol.
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
7 @par Revision Reference:
8 This Protocol is introduced in UEFI Specification 2.6
12 #ifndef __EFI_WIFI2_PROTOCOL_H__
13 #define __EFI_WIFI2_PROTOCOL_H__
15 #define EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL_GUID \
17 0x1b0fb9bf, 0x699d, 0x4fdd, { 0xa7, 0xc3, 0x25, 0x46, 0x68, 0x1b, 0xf6, 0x3b } \
20 typedef struct _EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
;
23 /// EFI_80211_BSS_TYPE
26 IeeeInfrastructureBSS
,
33 /// EFI_80211_CONNECT_NETWORK_RESULT_CODE
37 // The connection establishment operation finished successfully.
41 // The connection was refused by the Network.
45 // The connection establishment operation failed (i.e, Network is not
50 // The connection establishment operation was terminated on timeout.
52 ConnectFailureTimeout
,
54 // The connection establishment operation failed on other reason.
56 ConnectFailedReasonUnspecified
57 } EFI_80211_CONNECT_NETWORK_RESULT_CODE
;
60 /// EFI_80211_MAC_ADDRESS
64 } EFI_80211_MAC_ADDRESS
;
66 #define EFI_MAX_SSID_LEN 32
73 // Length in bytes of the SSId. If zero, ignore SSId field.
77 // Specifies the service set identifier.
79 UINT8 SSId
[EFI_MAX_SSID_LEN
];
83 /// EFI_80211_GET_NETWORKS_DATA
87 // The number of EFI_80211_SSID in SSIDList. If zero, SSIDList should be
92 // The SSIDList is a pointer to an array of EFI_80211_SSID instances. The
93 // number of entries is specified by NumOfSSID. The array should only include
94 // SSIDs of hidden networks. It is suggested that the caller inputs less than
95 // 10 elements in the SSIDList. It is the caller's responsibility to free
98 EFI_80211_SSID SSIDList
[1];
99 } EFI_80211_GET_NETWORKS_DATA
;
102 /// EFI_80211_SUITE_SELECTOR
106 // Organization Unique Identifier, as defined in IEEE 802.11 standard,
107 // usually set to 00-0F-AC.
111 // Suites types, as defined in IEEE 802.11 standard.
114 } EFI_80211_SUITE_SELECTOR
;
117 /// EFI_80211_AKM_SUITE_SELECTOR
121 // Indicates the number of AKM suite selectors that are contained in
122 // AKMSuiteList. If zero, the AKMSuiteList is ignored.
124 UINT16 AKMSuiteCount
;
126 // A variable-length array of AKM suites, as defined in IEEE 802.11 standard,
127 // Table 8-101. The number of entries is specified by AKMSuiteCount.
129 EFI_80211_SUITE_SELECTOR AKMSuiteList
[1];
130 } EFI_80211_AKM_SUITE_SELECTOR
;
133 /// EFI_80211_CIPHER_SUITE_SELECTOR
137 // Indicates the number of cipher suites that are contained in
138 // CipherSuiteList. If zero, the CipherSuiteList is ignored.
140 UINT16 CipherSuiteCount
;
142 // A variable-length array of cipher suites, as defined in IEEE 802.11
143 // standard, Table 8-99. The number of entries is specified by
146 EFI_80211_SUITE_SELECTOR CipherSuiteList
[1];
147 } EFI_80211_CIPHER_SUITE_SELECTOR
;
150 /// EFI_80211_NETWORK
154 // Specifies the type of the BSS.
156 EFI_80211_BSS_TYPE BSSType
;
158 // Specifies the SSID of the BSS.
162 // Pointer to the AKM suites supported in the wireless network.
164 EFI_80211_AKM_SUITE_SELECTOR
*AKMSuite
;
166 // Pointer to the cipher suites supported in the wireless network.
168 EFI_80211_CIPHER_SUITE_SELECTOR
*CipherSuite
;
172 /// EFI_80211_NETWORK_DESCRIPTION
176 // Specifies the found wireless network.
178 EFI_80211_NETWORK Network
;
180 // Indicates the network quality as a value between 0 to 100, where 100
181 // indicates the highest network quality.
183 UINT8 NetworkQuality
;
184 } EFI_80211_NETWORK_DESCRIPTION
;
187 /// EFI_80211_GET_NETWORKS_RESULT
191 // The number of EFI_80211_NETWORK_DESCRIPTION in NetworkDesc. If zero,
192 // NetworkDesc should be ignored.
194 UINT8 NumOfNetworkDesc
;
196 // The NetworkDesc is a pointer to an array of EFI_80211_NETWORK_DESCRIPTION
197 // instances. It is caller's responsibility to free this buffer.
199 EFI_80211_NETWORK_DESCRIPTION NetworkDesc
[1];
200 } EFI_80211_GET_NETWORKS_RESULT
;
203 /// EFI_80211_GET_NETWORKS_TOKEN
207 // If the status code returned by GetNetworks() is EFI_SUCCESS, then this
208 // Event will be signaled after the Status field is updated by the EFI
209 // Wireless MAC Connection Protocol II driver. The type of Event must be
210 // EFI_NOTIFY_SIGNAL.
214 // Will be set to one of the following values:
215 // EFI_SUCCESS: The operation completed successfully.
216 // EFI_NOT_FOUND: Failed to find available wireless networks.
217 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
218 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
219 // hardware or software state.
220 // EFI_NOT_READY: The operation is started but not yet completed.
224 // Pointer to the input data for getting networks.
226 EFI_80211_GET_NETWORKS_DATA
*Data
;
228 // Indicates the scan result. It is caller's responsibility to free this
231 EFI_80211_GET_NETWORKS_RESULT
*Result
;
232 } EFI_80211_GET_NETWORKS_TOKEN
;
235 /// EFI_80211_CONNECT_NETWORK_DATA
239 // Specifies the wireless network to connect to.
241 EFI_80211_NETWORK
*Network
;
243 // Specifies a time limit in seconds that is optionally present, after which
244 // the connection establishment procedure is terminated by the UNDI driver.
245 // This is an optional parameter and may be 0. Values of 5 seconds or higher
248 UINT32 FailureTimeout
;
249 } EFI_80211_CONNECT_NETWORK_DATA
;
252 /// EFI_80211_CONNECT_NETWORK_TOKEN
256 // If the status code returned by ConnectNetwork() is EFI_SUCCESS, then this
257 // Event will be signaled after the Status field is updated by the EFI
258 // Wireless MAC Connection Protocol II driver. The type of Event must be
259 // EFI_NOTIFY_SIGNAL.
263 // Will be set to one of the following values:
264 // EFI_SUCCESS: The operation completed successfully.
265 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
266 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
267 // hardware or software state.
268 // EFI_NOT_READY: The operation is started but not yet completed.
272 // Pointer to the connection data.
274 EFI_80211_CONNECT_NETWORK_DATA
*Data
;
276 // Indicates the connection state.
278 EFI_80211_CONNECT_NETWORK_RESULT_CODE ResultCode
;
279 } EFI_80211_CONNECT_NETWORK_TOKEN
;
282 /// EFI_80211_DISCONNECT_NETWORK_TOKEN
286 // If the status code returned by DisconnectNetwork() is EFI_SUCCESS, then
287 // this Event will be signaled after the Status field is updated by the EFI
288 // Wireless MAC Connection Protocol II driver. The type of Event must be
289 // EFI_NOTIFY_SIGNAL.
293 // Will be set to one of the following values:
294 // EFI_SUCCESS: The operation completed successfully
295 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
296 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
297 // hardware or software state.
300 } EFI_80211_DISCONNECT_NETWORK_TOKEN
;
303 Request a survey of potential wireless networks that administrator can later
304 elect to try to join.
306 @param[in] This Pointer to the
307 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
309 @param[in] Token Pointer to the token for getting wireless
312 @retval EFI_SUCCESS The operation started, and an event will
313 eventually be raised for the caller.
314 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
318 @retval EFI_UNSUPPORTED One or more of the input parameters is not
319 supported by this implementation.
320 @retval EFI_ALREADY_STARTED The operation of getting wireless network is
322 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
328 (EFIAPI
*EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS
)(
329 IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
*This
,
330 IN EFI_80211_GET_NETWORKS_TOKEN
*Token
334 Connect a wireless network specified by a particular SSID, BSS type and
337 @param[in] This Pointer to the
338 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
340 @param[in] Token Pointer to the token for connecting wireless
343 @retval EFI_SUCCESS The operation started successfully. Results
344 will be notified eventually.
345 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
349 @retval EFI_UNSUPPORTED One or more of the input parameters are not
350 supported by this implementation.
351 @retval EFI_ALREADY_STARTED The connection process is already started.
352 @retval EFI_NOT_FOUND The specified wireless network is not found.
353 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
359 (EFIAPI
*EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK
)(
360 IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
*This
,
361 IN EFI_80211_CONNECT_NETWORK_TOKEN
*Token
365 Request a disconnection with current connected wireless network.
367 @param[in] This Pointer to the
368 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
370 @param[in] Token Pointer to the token for disconnecting
373 @retval EFI_SUCCESS The operation started successfully. Results
374 will be notified eventually.
375 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
379 @retval EFI_UNSUPPORTED One or more of the input parameters are not
380 supported by this implementation.
381 @retval EFI_NOT_FOUND Not connected to a wireless network.
382 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
388 (EFIAPI
*EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK
)(
389 IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
*This
,
390 IN EFI_80211_DISCONNECT_NETWORK_TOKEN
*Token
394 /// The EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL provides network management
395 /// service interfaces for 802.11 network stack. It is used by network
396 /// applications (and drivers) to establish wireless connection with a wireless
399 struct _EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
{
400 EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS GetNetworks
;
401 EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK ConnectNetwork
;
402 EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK DisconnectNetwork
;
405 extern EFI_GUID gEfiWiFi2ProtocolGuid
;