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