iPXE
WiFi2.h
Go to the documentation of this file.
1/** @file
2 This file defines the EFI Wireless MAC Connection II Protocol.
3
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 @par Revision Reference:
8 This Protocol is introduced in UEFI Specification 2.6
9
10**/
11
12#ifndef __EFI_WIFI2_PROTOCOL_H__
13#define __EFI_WIFI2_PROTOCOL_H__
14
15FILE_LICENCE ( BSD2_PATENT );
16FILE_SECBOOT ( PERMITTED );
17
18#define EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL_GUID \
19 { \
20 0x1b0fb9bf, 0x699d, 0x4fdd, { 0xa7, 0xc3, 0x25, 0x46, 0x68, 0x1b, 0xf6, 0x3b } \
21 }
22
24
25///
26/// EFI_80211_BSS_TYPE
27///
34
35///
36/// EFI_80211_CONNECT_NETWORK_RESULT_CODE
37///
38typedef enum {
39 //
40 // The connection establishment operation finished successfully.
41 //
43 //
44 // The connection was refused by the Network.
45 //
47 //
48 // The connection establishment operation failed (i.e, Network is not
49 // detected).
50 //
52 //
53 // The connection establishment operation was terminated on timeout.
54 //
56 //
57 // The connection establishment operation failed on other reason.
58 //
61
62///
63/// EFI_80211_MAC_ADDRESS
64///
65typedef struct {
68
69#define EFI_MAX_SSID_LEN 32
70
71///
72/// EFI_80211_SSID
73///
74typedef struct {
75 //
76 // Length in bytes of the SSId. If zero, ignore SSId field.
77 //
79 //
80 // Specifies the service set identifier.
81 //
84
85///
86/// EFI_80211_GET_NETWORKS_DATA
87///
88typedef struct {
89 //
90 // The number of EFI_80211_SSID in SSIDList. If zero, SSIDList should be
91 // ignored.
92 //
94 //
95 // The SSIDList is a pointer to an array of EFI_80211_SSID instances. The
96 // number of entries is specified by NumOfSSID. The array should only include
97 // SSIDs of hidden networks. It is suggested that the caller inputs less than
98 // 10 elements in the SSIDList. It is the caller's responsibility to free
99 // this buffer.
100 //
103
104///
105/// EFI_80211_SUITE_SELECTOR
106///
107typedef struct {
108 //
109 // Organization Unique Identifier, as defined in IEEE 802.11 standard,
110 // usually set to 00-0F-AC.
111 //
113 //
114 // Suites types, as defined in IEEE 802.11 standard.
115 //
118
119///
120/// EFI_80211_AKM_SUITE_SELECTOR
121///
122typedef struct {
123 //
124 // Indicates the number of AKM suite selectors that are contained in
125 // AKMSuiteList. If zero, the AKMSuiteList is ignored.
126 //
128 //
129 // A variable-length array of AKM suites, as defined in IEEE 802.11 standard,
130 // Table 8-101. The number of entries is specified by AKMSuiteCount.
131 //
134
135///
136/// EFI_80211_CIPHER_SUITE_SELECTOR
137///
138typedef struct {
139 //
140 // Indicates the number of cipher suites that are contained in
141 // CipherSuiteList. If zero, the CipherSuiteList is ignored.
142 //
144 //
145 // A variable-length array of cipher suites, as defined in IEEE 802.11
146 // standard, Table 8-99. The number of entries is specified by
147 // CipherSuiteCount.
148 //
151
152///
153/// EFI_80211_NETWORK
154///
155typedef struct {
156 //
157 // Specifies the type of the BSS.
158 //
160 //
161 // Specifies the SSID of the BSS.
162 //
164 //
165 // Pointer to the AKM suites supported in the wireless network.
166 //
168 //
169 // Pointer to the cipher suites supported in the wireless network.
170 //
173
174///
175/// EFI_80211_NETWORK_DESCRIPTION
176///
177typedef struct {
178 //
179 // Specifies the found wireless network.
180 //
182 //
183 // Indicates the network quality as a value between 0 to 100, where 100
184 // indicates the highest network quality.
185 //
188
189///
190/// EFI_80211_GET_NETWORKS_RESULT
191///
192typedef struct {
193 //
194 // The number of EFI_80211_NETWORK_DESCRIPTION in NetworkDesc. If zero,
195 // NetworkDesc should be ignored.
196 //
198 //
199 // The NetworkDesc is a pointer to an array of EFI_80211_NETWORK_DESCRIPTION
200 // instances. It is caller's responsibility to free this buffer.
201 //
204
205///
206/// EFI_80211_GET_NETWORKS_TOKEN
207///
208typedef struct {
209 //
210 // If the status code returned by GetNetworks() is EFI_SUCCESS, then this
211 // Event will be signaled after the Status field is updated by the EFI
212 // Wireless MAC Connection Protocol II driver. The type of Event must be
213 // EFI_NOTIFY_SIGNAL.
214 //
216 //
217 // Will be set to one of the following values:
218 // EFI_SUCCESS: The operation completed successfully.
219 // EFI_NOT_FOUND: Failed to find available wireless networks.
220 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
221 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
222 // hardware or software state.
223 // EFI_NOT_READY: The operation is started but not yet completed.
224 //
226 //
227 // Pointer to the input data for getting networks.
228 //
230 //
231 // Indicates the scan result. It is caller's responsibility to free this
232 // buffer.
233 //
236
237///
238/// EFI_80211_CONNECT_NETWORK_DATA
239///
240typedef struct {
241 //
242 // Specifies the wireless network to connect to.
243 //
245 //
246 // Specifies a time limit in seconds that is optionally present, after which
247 // the connection establishment procedure is terminated by the UNDI driver.
248 // This is an optional parameter and may be 0. Values of 5 seconds or higher
249 // are recommended.
250 //
253
254///
255/// EFI_80211_CONNECT_NETWORK_TOKEN
256///
257typedef struct {
258 //
259 // If the status code returned by ConnectNetwork() is EFI_SUCCESS, then this
260 // Event will be signaled after the Status field is updated by the EFI
261 // Wireless MAC Connection Protocol II driver. The type of Event must be
262 // EFI_NOTIFY_SIGNAL.
263 //
265 //
266 // Will be set to one of the following values:
267 // EFI_SUCCESS: The operation completed successfully.
268 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
269 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
270 // hardware or software state.
271 // EFI_NOT_READY: The operation is started but not yet completed.
272 //
274 //
275 // Pointer to the connection data.
276 //
278 //
279 // Indicates the connection state.
280 //
283
284///
285/// EFI_80211_DISCONNECT_NETWORK_TOKEN
286///
287typedef struct {
288 //
289 // If the status code returned by DisconnectNetwork() is EFI_SUCCESS, then
290 // this Event will be signaled after the Status field is updated by the EFI
291 // Wireless MAC Connection Protocol II driver. The type of Event must be
292 // EFI_NOTIFY_SIGNAL.
293 //
295 //
296 // Will be set to one of the following values:
297 // EFI_SUCCESS: The operation completed successfully
298 // EFI_DEVICE_ERROR: An unexpected network or system error occurred.
299 // EFI_ACCESS_DENIED: The operation is not completed due to some underlying
300 // hardware or software state.
301 //
304
305/**
306 Request a survey of potential wireless networks that administrator can later
307 elect to try to join.
308
309 @param[in] This Pointer to the
310 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
311 instance.
312 @param[in] Token Pointer to the token for getting wireless
313 network.
314
315 @retval EFI_SUCCESS The operation started, and an event will
316 eventually be raised for the caller.
317 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
318 TRUE:
319 This is NULL.
320 Token is NULL.
321 @retval EFI_UNSUPPORTED One or more of the input parameters is not
322 supported by this implementation.
323 @retval EFI_ALREADY_STARTED The operation of getting wireless network is
324 already started.
325 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
326 allocated.
327
328**/
329typedef
334 );
335
336/**
337 Connect a wireless network specified by a particular SSID, BSS type and
338 Security type.
339
340 @param[in] This Pointer to the
341 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
342 instance.
343 @param[in] Token Pointer to the token for connecting wireless
344 network.
345
346 @retval EFI_SUCCESS The operation started successfully. Results
347 will be notified eventually.
348 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
349 TRUE:
350 This is NULL.
351 Token is NULL.
352 @retval EFI_UNSUPPORTED One or more of the input parameters are not
353 supported by this implementation.
354 @retval EFI_ALREADY_STARTED The connection process is already started.
355 @retval EFI_NOT_FOUND The specified wireless network is not found.
356 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
357 allocated.
358
359**/
360typedef
365 );
366
367/**
368 Request a disconnection with current connected wireless network.
369
370 @param[in] This Pointer to the
371 EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
372 instance.
373 @param[in] Token Pointer to the token for disconnecting
374 wireless network.
375
376 @retval EFI_SUCCESS The operation started successfully. Results
377 will be notified eventually.
378 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
379 TRUE:
380 This is NULL.
381 Token is NULL.
382 @retval EFI_UNSUPPORTED One or more of the input parameters are not
383 supported by this implementation.
384 @retval EFI_NOT_FOUND Not connected to a wireless network.
385 @retval EFI_OUT_OF_RESOURCES Required system resources could not be
386 allocated.
387
388**/
389typedef
394 );
395
396///
397/// The EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL provides network management
398/// service interfaces for 802.11 network stack. It is used by network
399/// applications (and drivers) to establish wireless connection with a wireless
400/// network.
401///
407
409
410#endif
unsigned short UINT16
2-byte unsigned value.
#define EFIAPI
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
EFI_STATUS(EFIAPI * EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK)(IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL *This, IN EFI_80211_DISCONNECT_NETWORK_TOKEN *Token)
Request a disconnection with current connected wireless network.
Definition WiFi2.h:391
EFI_STATUS(EFIAPI * EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK)(IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL *This, IN EFI_80211_CONNECT_NETWORK_TOKEN *Token)
Connect a wireless network specified by a particular SSID, BSS type and Security type.
Definition WiFi2.h:362
struct _EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL
Definition WiFi2.h:23
EFI_80211_BSS_TYPE
EFI_80211_BSS_TYPE.
Definition WiFi2.h:28
@ IeeeMeshBSS
Definition WiFi2.h:31
@ IeeeIndependentBSS
Definition WiFi2.h:30
@ IeeeAnyBss
Definition WiFi2.h:32
@ IeeeInfrastructureBSS
Definition WiFi2.h:29
#define EFI_MAX_SSID_LEN
Definition WiFi2.h:69
EFI_GUID gEfiWiFi2ProtocolGuid
EFI_STATUS(EFIAPI * EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS)(IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL *This, IN EFI_80211_GET_NETWORKS_TOKEN *Token)
Request a survey of potential wireless networks that administrator can later elect to try to join.
Definition WiFi2.h:331
EFI_80211_CONNECT_NETWORK_RESULT_CODE
EFI_80211_CONNECT_NETWORK_RESULT_CODE.
Definition WiFi2.h:38
@ ConnectFailureTimeout
Definition WiFi2.h:55
@ ConnectFailed
Definition WiFi2.h:51
@ ConnectFailedReasonUnspecified
Definition WiFi2.h:59
@ ConnectRefused
Definition WiFi2.h:46
@ ConnectSuccess
Definition WiFi2.h:42
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define EFI_EVENT
Definition efi.h:54
#define IN
Definition mlx_utils.h:28
EFI_80211_AKM_SUITE_SELECTOR.
Definition WiFi2.h:122
EFI_80211_SUITE_SELECTOR AKMSuiteList[1]
Definition WiFi2.h:132
EFI_80211_CIPHER_SUITE_SELECTOR.
Definition WiFi2.h:138
EFI_80211_SUITE_SELECTOR CipherSuiteList[1]
Definition WiFi2.h:149
EFI_80211_CONNECT_NETWORK_DATA.
Definition WiFi2.h:240
EFI_80211_NETWORK * Network
Definition WiFi2.h:244
EFI_80211_CONNECT_NETWORK_TOKEN.
Definition WiFi2.h:257
EFI_80211_CONNECT_NETWORK_RESULT_CODE ResultCode
Definition WiFi2.h:281
EFI_80211_CONNECT_NETWORK_DATA * Data
Definition WiFi2.h:277
EFI_80211_DISCONNECT_NETWORK_TOKEN.
Definition WiFi2.h:287
EFI_80211_GET_NETWORKS_DATA.
Definition WiFi2.h:88
EFI_80211_SSID SSIDList[1]
Definition WiFi2.h:101
EFI_80211_GET_NETWORKS_RESULT.
Definition WiFi2.h:192
EFI_80211_NETWORK_DESCRIPTION NetworkDesc[1]
Definition WiFi2.h:202
EFI_80211_GET_NETWORKS_TOKEN.
Definition WiFi2.h:208
EFI_80211_GET_NETWORKS_RESULT * Result
Definition WiFi2.h:234
EFI_80211_GET_NETWORKS_DATA * Data
Definition WiFi2.h:229
EFI_80211_MAC_ADDRESS.
Definition WiFi2.h:65
EFI_80211_NETWORK_DESCRIPTION.
Definition WiFi2.h:177
EFI_80211_NETWORK Network
Definition WiFi2.h:181
EFI_80211_NETWORK.
Definition WiFi2.h:155
EFI_80211_AKM_SUITE_SELECTOR * AKMSuite
Definition WiFi2.h:167
EFI_80211_CIPHER_SUITE_SELECTOR * CipherSuite
Definition WiFi2.h:171
EFI_80211_BSS_TYPE BSSType
Definition WiFi2.h:159
EFI_80211_SSID SSId
Definition WiFi2.h:163
EFI_80211_SSID.
Definition WiFi2.h:74
UINT8 SSId[EFI_MAX_SSID_LEN]
Definition WiFi2.h:82
UINT8 SSIdLen
Definition WiFi2.h:78
EFI_80211_SUITE_SELECTOR.
Definition WiFi2.h:107
The EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL provides network management service interfaces for 802....
Definition WiFi2.h:402
EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK ConnectNetwork
Definition WiFi2.h:404
EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS GetNetworks
Definition WiFi2.h:403
EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK DisconnectNetwork
Definition WiFi2.h:405