2 This file defines the EFI Wireless MAC Connection II Protocol.
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 @par Revision Reference:
14 This Protocol is introduced in UEFI Specification 2.6
18 #ifndef __EFI_WIFI2_PROTOCOL_H__
19 #define __EFI_WIFI2_PROTOCOL_H__
21 #define EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL_GUID \
23 0x1b0fb9bf, 0x699d, 0x4fdd, { 0xa7, 0xc3, 0x25, 0x46, 0x68, 0x1b, 0xf6, 0x3b } \
26 typedef struct _EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
;
29 /// EFI_80211_BSS_TYPE
32 IeeeInfrastructureBSS
,
39 /// EFI_80211_CONNECT_NETWORK_RESULT_CODE
43 // The connection establishment operation finished successfully.
47 // The connection was refused by the Network.
51 // The connection establishment operation failed (i.e, Network is not
56 // The connection establishment operation was terminated on timeout.
58 ConnectFailureTimeout
,
60 // The connection establishment operation failed on other reason.
62 ConnectFailedReasonUnspecified
63 } EFI_80211_CONNECT_NETWORK_RESULT_CODE
;
66 /// EFI_80211_MAC_ADDRESS
70 } EFI_80211_MAC_ADDRESS
;
72 #define EFI_MAX_SSID_LEN 32
79 // Length in bytes of the SSId. If zero, ignore SSId field.
83 // Specifies the service set identifier.
85 UINT8 SSId
[EFI_MAX_SSID_LEN
];
89 /// EFI_80211_GET_NETWORKS_DATA
93 // The number of EFI_80211_SSID in SSIDList. If zero, SSIDList should be
98 // The SSIDList is a pointer to an array of EFI_80211_SSID instances. The
99 // number of entries is specified by NumOfSSID. The array should only include
100 // SSIDs of hidden networks. It is suggested that the caller inputs less than
101 // 10 elements in the SSIDList. It is the caller's responsibility to free
104 EFI_80211_SSID SSIDList
[1];
105 } EFI_80211_GET_NETWORKS_DATA
;
108 /// EFI_80211_SUITE_SELECTOR
112 // Organization Unique Identifier, as defined in IEEE 802.11 standard,
113 // usually set to 00-0F-AC.
117 // Suites types, as defined in IEEE 802.11 standard.
120 } EFI_80211_SUITE_SELECTOR
;
123 /// EFI_80211_AKM_SUITE_SELECTOR
127 // Indicates the number of AKM suite selectors that are contained in
128 // AKMSuiteList. If zero, the AKMSuiteList is ignored.
130 UINT16 AKMSuiteCount
;
132 // A variable-length array of AKM suites, as defined in IEEE 802.11 standard,
133 // Table 8-101. The number of entries is specified by AKMSuiteCount.
135 EFI_80211_SUITE_SELECTOR AKMSuiteList
[1];
136 } EFI_80211_AKM_SUITE_SELECTOR
;
139 /// EFI_80211_CIPHER_SUITE_SELECTOR
143 // Indicates the number of cipher suites that are contained in
144 // CipherSuiteList. If zero, the CipherSuiteList is ignored.
146 UINT16 CipherSuiteCount
;
148 // A variable-length array of cipher suites, as defined in IEEE 802.11
149 // standard, Table 8-99. The number of entries is specified by
152 EFI_80211_SUITE_SELECTOR CipherSuiteList
[1];
153 } EFI_80211_CIPHER_SUITE_SELECTOR
;
156 /// EFI_80211_NETWORK
160 // Specifies the type of the BSS.
162 EFI_80211_BSS_TYPE BSSType
;
164 // Specifies the SSID of the BSS.
168 // Pointer to the AKM suites supported in the wireless network.
170 EFI_80211_AKM_SUITE_SELECTOR
*AKMSuite
;
172 // Pointer to the cipher suites supported in the wireless network.
174 EFI_80211_CIPHER_SUITE_SELECTOR
*CipherSuite
;
178 /// EFI_80211_NETWORK_DESCRIPTION
182 // Specifies the found wireless network.
184 EFI_80211_NETWORK Network
;
186 // Indicates the network quality as a value between 0 to 100, where 100
187 // indicates the highest network quality.
189 UINT8 NetworkQuality
;
190 } EFI_80211_NETWORK_DESCRIPTION
;
193 /// EFI_80211_GET_NETWORKS_RESULT
197 // The number of EFI_80211_NETWORK_DESCRIPTION in NetworkDesc. If zero,
198 // NetworkDesc should be ignored.
200 UINT8 NumOfNetworkDesc
;
202 // The NetworkDesc is a pointer to an array of EFI_80211_NETWORK_DESCRIPTION
203 // instances. It is caller's responsibility to free this buffer.
205 EFI_80211_NETWORK_DESCRIPTION NetworkDesc
[1];
206 } EFI_80211_GET_NETWORKS_RESULT
;
209 /// EFI_80211_GET_NETWORKS_TOKEN
213 // If the status code returned by GetNetworks() is EFI_SUCCESS, then this
214 // Event will be signaled after the Status field is updated by the EFI
215 // Wireless MAC Connection Protocol II driver. The type of Event must be
216 // EFI_NOTIFY_SIGNAL.
220 // Will be set to one of the following values:
221 // EFI_SUCCESS: The operation completed successfully.
222 // EFI_NOT_FOUND: Failed to find available wireless networks.
223 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
224 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
225 // hardware or software state.
226 // EFI_NOT_READY: The operation is started but not yet completed.
230 // Pointer to the input data for getting networks.
232 EFI_80211_GET_NETWORKS_DATA
*Data
;
234 // Indicates the scan result. It is caller's responsibility to free this
237 EFI_80211_GET_NETWORKS_RESULT
*Result
;
238 } EFI_80211_GET_NETWORKS_TOKEN
;
241 /// EFI_80211_CONNECT_NETWORK_DATA
245 // Specifies the wireless network to connect to.
247 EFI_80211_NETWORK
*Network
;
249 // Specifies a time limit in seconds that is optionally present, after which
250 // the connection establishment procedure is terminated by the UNDI driver.
251 // This is an optional parameter and may be 0. Values of 5 seconds or higher
254 UINT32 FailureTimeout
;
255 } EFI_80211_CONNECT_NETWORK_DATA
;
258 /// EFI_80211_CONNECT_NETWORK_TOKEN
262 // If the status code returned by ConnectNetwork() is EFI_SUCCESS, then this
263 // Event will be signaled after the Status field is updated by the EFI
264 // Wireless MAC Connection Protocol II driver. The type of Event must be
265 // EFI_NOTIFY_SIGNAL.
269 // Will be set to one of the following values:
270 // EFI_SUCCESS: The operation completed successfully.
271 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
272 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
273 // hardware or software state.
274 // EFI_NOT_READY: The operation is started but not yet completed.
278 // Pointer to the connection data.
280 EFI_80211_CONNECT_NETWORK_DATA
*Data
;
282 // Indicates the connection state.
284 EFI_80211_CONNECT_NETWORK_RESULT_CODE ResultCode
;
285 } EFI_80211_CONNECT_NETWORK_TOKEN
;
288 /// EFI_80211_DISCONNECT_NETWORK_TOKEN
292 // If the status code returned by DisconnectNetwork() is EFI_SUCCESS, then
293 // this Event will be signaled after the Status field is updated by the EFI
294 // Wireless MAC Connection Protocol II driver. The type of Event must be
295 // EFI_NOTIFY_SIGNAL.
299 // Will be set to one of the following values:
300 // EFI_SUCCESS: The operation completed successfully
301 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
302 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
303 // hardware or software state.
306 } EFI_80211_DISCONNECT_NETWORK_TOKEN
;
309 Request a survey of potential wireless networks that administrator can later
310 elect to try to join.
312 @param[in] This Pointer to the
313 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
315 @param[in] Token Pointer to the token for getting wireless
318 @retval EFI_SUCCESS The operation started, and an event will
319 eventually be raised for the caller.
320 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
324 @retval EFI_UNSUPPORTED One or more of the input parameters is not
325 supported by this implementation.
326 @retval EFI_ALREADY_STARTED The operation of getting wireless network is
328 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
334 (EFIAPI
*EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS
) (
335 IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
*This
,
336 IN EFI_80211_GET_NETWORKS_TOKEN
*Token
340 Connect a wireless network specified by a particular SSID, BSS type and
343 @param[in] This Pointer to the
344 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
346 @param[in] Token Pointer to the token for connecting wireless
349 @retval EFI_SUCCESS The operation started successfully. Results
350 will be notified eventually.
351 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
355 @retval EFI_UNSUPPORTED One or more of the input parameters are not
356 supported by this implementation.
357 @retval EFI_ALREADY_STARTED The connection process is already started.
358 @retval EFI_NOT_FOUND The specified wireless network is not found.
359 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
365 (EFIAPI
*EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK
) (
366 IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
*This
,
367 IN EFI_80211_CONNECT_NETWORK_TOKEN
*Token
371 Request a disconnection with current connected wireless network.
373 @param[in] This Pointer to the
374 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
376 @param[in] Token Pointer to the token for disconnecting
379 @retval EFI_SUCCESS The operation started successfully. Results
380 will be notified eventually.
381 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
385 @retval EFI_UNSUPPORTED One or more of the input parameters are not
386 supported by this implementation.
387 @retval EFI_NOT_FOUND Not connected to a wireless network.
388 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
394 (EFIAPI
*EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK
) (
395 IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
*This
,
396 IN EFI_80211_DISCONNECT_NETWORK_TOKEN
*Token
400 /// The EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL provides network management
401 /// service interfaces for 802.11 network stack. It is used by network
402 /// applications (and drivers) to establish wireless connection with a wireless
405 struct _EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
{
406 EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS GetNetworks
;
407 EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK ConnectNetwork
;
408 EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK DisconnectNetwork
;
411 extern EFI_GUID gEfiWiFi2ProtocolGuid
;