]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/WiFi.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / WiFi.h
CommitLineData
0d2aa2b1
HW
1/** @file\r
2 This file provides management service interfaces of 802.11 MAC layer. It is used by\r
3 network applications (and drivers) to establish wireless connection with an access\r
4 point (AP).\r
5\r
4e858edb 6 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
9344f092 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
0d2aa2b1
HW
8\r
9 @par Revision Reference:\r
10 This Protocol is introduced in UEFI Specification 2.5\r
11\r
12**/\r
13\r
14#ifndef __EFI_WIFI_PROTOCOL_H__\r
15#define __EFI_WIFI_PROTOCOL_H__\r
16\r
4e858edb
HW
17#include <Protocol/WiFi2.h>\r
18\r
0d2aa2b1
HW
19#define EFI_WIRELESS_MAC_CONNECTION_PROTOCOL_GUID \\r
20 { \\r
21 0xda55bc9, 0x45f8, 0x4bb4, {0x87, 0x19, 0x52, 0x24, 0xf1, 0x8a, 0x4d, 0x45 } \\r
22 }\r
23\r
24typedef struct _EFI_WIRELESS_MAC_CONNECTION_PROTOCOL EFI_WIRELESS_MAC_CONNECTION_PROTOCOL;\r
25\r
0d2aa2b1
HW
26///\r
27/// EFI_80211_ACC_NET_TYPE\r
28///\r
29typedef enum {\r
30 IeeePrivate = 0,\r
31 IeeePrivatewithGuest = 1,\r
32 IeeeChargeablePublic = 2,\r
33 IeeeFreePublic = 3,\r
34 IeeePersonal = 4,\r
35 IeeeEmergencyServOnly = 5,\r
36 IeeeTestOrExp = 14,\r
37 IeeeWildcard = 15\r
38} EFI_80211_ACC_NET_TYPE;\r
39\r
40///\r
41/// EFI_80211_ASSOCIATE_RESULT_CODE\r
42///\r
43typedef enum {\r
44 AssociateSuccess,\r
45 AssociateRefusedReasonUnspecified,\r
46 AssociateRefusedCapsMismatch,\r
47 AssociateRefusedExtReason,\r
48 AssociateRefusedAPOutOfMemory,\r
49 AssociateRefusedBasicRatesMismatch,\r
50 AssociateRejectedEmergencyServicesNotSupported,\r
51 AssociateRefusedTemporarily\r
52} EFI_80211_ASSOCIATE_RESULT_CODE;\r
53\r
54///\r
55/// EFI_80211_SCAN_RESULT_CODE\r
56///\r
57typedef enum {\r
58 ///\r
59 /// The scan operation finished successfully.\r
60 ///\r
61 ScanSuccess,\r
62 ///\r
63 /// The scan operation is not supported in current implementation.\r
64 ///\r
65 ScanNotSupported\r
66} EFI_80211_SCAN_RESULT_CODE;\r
67\r
68///\r
69/// EFI_80211_REASON_CODE\r
70///\r
71typedef enum {\r
72 Ieee80211UnspecifiedReason = 1,\r
73 Ieee80211PreviousAuthenticateInvalid = 2,\r
74 Ieee80211DeauthenticatedSinceLeaving = 3,\r
75 Ieee80211DisassociatedDueToInactive = 4,\r
76 Ieee80211DisassociatedSinceApUnable = 5,\r
77 Ieee80211Class2FrameNonauthenticated = 6,\r
78 Ieee80211Class3FrameNonassociated = 7,\r
79 Ieee80211DisassociatedSinceLeaving = 8,\r
80 // ...\r
81} EFI_80211_REASON_CODE;\r
82\r
83///\r
84/// EFI_80211_DISASSOCIATE_RESULT_CODE\r
85///\r
86typedef enum {\r
87 ///\r
88 /// Disassociation process completed successfully.\r
89 ///\r
90 DisassociateSuccess,\r
91 ///\r
92 /// Disassociation failed due to any input parameter is invalid.\r
93 ///\r
94 DisassociateInvalidParameters\r
95} EFI_80211_DISASSOCIATE_RESULT_CODE;\r
96\r
97///\r
98/// EFI_80211_AUTHENTICATION_TYPE\r
99///\r
100typedef enum {\r
101 ///\r
102 /// Open system authentication, admits any STA to the DS.\r
103 ///\r
104 OpenSystem,\r
105 ///\r
106 /// Shared Key authentication relies on WEP to demonstrate knowledge of a WEP\r
107 /// encryption key.\r
108 ///\r
109 SharedKey,\r
110 ///\r
111 /// FT authentication relies on keys derived during the initial mobility domain\r
112 /// association to authenticate the stations.\r
113 ///\r
114 FastBSSTransition,\r
115 ///\r
116 /// SAE authentication uses finite field cryptography to prove knowledge of a shared\r
117 /// password.\r
118 ///\r
119 SAE\r
120} EFI_80211_AUTHENTICATION_TYPE;\r
121\r
122///\r
123/// EFI_80211_AUTHENTICATION_RESULT_CODE\r
124///\r
125typedef enum {\r
126 AuthenticateSuccess,\r
127 AuthenticateRefused,\r
128 AuthenticateAnticLoggingTokenRequired,\r
129 AuthenticateFiniteCyclicGroupNotSupported,\r
130 AuthenticationRejected,\r
131 AuthenticateInvalidParameter\r
132} EFI_80211_AUTHENTICATE_RESULT_CODE;\r
133\r
0d2aa2b1
HW
134///\r
135/// EFI_80211_ELEMENT_HEADER\r
136///\r
137typedef struct {\r
138 ///\r
139 /// A unique element ID defined in IEEE 802.11 specification.\r
140 ///\r
141 UINT8 ElementID;\r
142 ///\r
143 /// Specifies the number of octets in the element body.\r
144 ///\r
145 UINT8 Length;\r
146} EFI_80211_ELEMENT_HEADER;\r
147\r
148///\r
149/// EFI_80211_ELEMENT_REQ\r
150///\r
151typedef struct {\r
152 ///\r
153 /// Common header of an element.\r
154 ///\r
155 EFI_80211_ELEMENT_HEADER Hdr;\r
156 ///\r
157 /// Start of elements that are requested to be included in the Probe Response frame.\r
158 /// The elements are listed in order of increasing element ID.\r
159 ///\r
160 UINT8 RequestIDs[1];\r
161} EFI_80211_ELEMENT_REQ;\r
162\r
163///\r
164/// EFI_80211_ELEMENT_SSID\r
165///\r
166typedef struct {\r
167 ///\r
168 /// Common header of an element.\r
169 ///\r
170 EFI_80211_ELEMENT_HEADER Hdr;\r
171 ///\r
172 /// Service set identifier. If Hdr.Length is zero, this field is ignored.\r
173 ///\r
174 UINT8 SSId[32];\r
175} EFI_80211_ELEMENT_SSID;\r
176\r
177///\r
178/// EFI_80211_SCAN_DATA\r
179///\r
180typedef struct {\r
181 ///\r
182 /// Determines whether infrastructure BSS, IBSS, MBSS, or all, are included in the\r
183 /// scan.\r
184 ///\r
185 EFI_80211_BSS_TYPE BSSType;\r
186 ///\r
187 /// Indicates a specific or wildcard BSSID. Use all binary 1s to represent all SSIDs.\r
188 ///\r
189 EFI_80211_MAC_ADDRESS BSSId;\r
190 ///\r
191 /// Length in bytes of the SSId. If zero, ignore SSId field.\r
192 ///\r
193 UINT8 SSIdLen;\r
194 ///\r
195 /// Specifies the desired SSID or the wildcard SSID. Use NULL to represent all SSIDs.\r
196 ///\r
197 UINT8 *SSId;\r
198 ///\r
199 /// Indicates passive scanning if TRUE.\r
200 ///\r
201 BOOLEAN PassiveMode;\r
202 ///\r
203 /// The delay in microseconds to be used prior to transmitting a Probe frame during\r
204 /// active scanning. If zero, the value can be overridden by an\r
205 /// implementation-dependent default value.\r
206 ///\r
207 UINT32 ProbeDelay;\r
208 ///\r
209 /// Specifies a list of channels that are examined when scanning for a BSS. If set to\r
210 /// NULL, all valid channels will be scanned.\r
211 ///\r
212 UINT32 *ChannelList;\r
213 ///\r
214 /// Indicates the minimum time in TU to spend on each channel when scanning. If zero,\r
215 /// the value can be overridden by an implementation-dependent default value.\r
216 ///\r
217 UINT32 MinChannelTime;\r
218 ///\r
219 /// Indicates the maximum time in TU to spend on each channel when scanning. If zero,\r
220 /// the value can be overridden by an implementation-dependent default value.\r
221 ///\r
222 UINT32 MaxChannelTime;\r
223 ///\r
224 /// Points to an optionally present element. This is an optional parameter and may be\r
225 /// NULL.\r
226 ///\r
227 EFI_80211_ELEMENT_REQ *RequestInformation;\r
228 ///\r
229 /// Indicates one or more SSID elements that are optionally present. This is an\r
230 /// optional parameter and may be NULL.\r
231 ///\r
232 EFI_80211_ELEMENT_SSID *SSIDList;\r
233 ///\r
234 /// Specifies a desired specific access network type or the wildcard access network\r
235 /// type. Use 15 as wildcard access network type.\r
236 ///\r
237 EFI_80211_ACC_NET_TYPE AccessNetworkType;\r
238 ///\r
239 /// Specifies zero or more elements. This is an optional parameter and may be NULL.\r
240 ///\r
241 UINT8 *VendorSpecificInfo;\r
242} EFI_80211_SCAN_DATA;\r
243\r
244///\r
245/// EFI_80211_COUNTRY_TRIPLET_SUBBAND\r
246///\r
247typedef struct {\r
248 ///\r
249 /// Indicates the lowest channel number in the subband. It has a positive integer\r
250 /// value less than 201.\r
251 ///\r
252 UINT8 FirstChannelNum;\r
253 ///\r
254 /// Indicates the number of channels in the subband.\r
255 ///\r
256 UINT8 NumOfChannels;\r
257 ///\r
258 /// Indicates the maximum power in dBm allowed to be transmitted.\r
259 ///\r
260 UINT8 MaxTxPowerLevel;\r
261} EFI_80211_COUNTRY_TRIPLET_SUBBAND;\r
262\r
263///\r
264/// EFI_80211_COUNTRY_TRIPLET_OPERATE\r
265///\r
266typedef struct {\r
267 ///\r
268 /// Indicates the operating extension identifier. It has a positive integer value of\r
269 /// 201 or greater.\r
270 ///\r
271 UINT8 OperatingExtId;\r
272 ///\r
273 /// Index into a set of values for radio equipment set of rules.\r
274 ///\r
275 UINT8 OperatingClass;\r
276 ///\r
277 /// Specifies aAirPropagationTime characteristics used in BSS operation. Refer the\r
278 /// definition of aAirPropagationTime in IEEE 802.11 specification.\r
279 ///\r
280 UINT8 CoverageClass;\r
281} EFI_80211_COUNTRY_TRIPLET_OPERATE;\r
282\r
283///\r
284/// EFI_80211_COUNTRY_TRIPLET\r
285///\r
286typedef union {\r
287 ///\r
288 /// The subband triplet.\r
289 ///\r
290 EFI_80211_COUNTRY_TRIPLET_SUBBAND Subband;\r
291 ///\r
292 /// The operating triplet.\r
293 ///\r
294 EFI_80211_COUNTRY_TRIPLET_OPERATE Operating;\r
295} EFI_80211_COUNTRY_TRIPLET;\r
296\r
297///\r
298/// EFI_80211_ELEMENT_COUNTRY\r
299///\r
300typedef struct {\r
301 ///\r
302 /// Common header of an element.\r
303 ///\r
304 EFI_80211_ELEMENT_HEADER Hdr;\r
305 ///\r
306 /// Specifies country strings in 3 octets.\r
307 ///\r
308 UINT8 CountryStr[3];\r
309 ///\r
310 /// Indicates a triplet that repeated in country element. The number of triplets is\r
311 /// determined by the Hdr.Length field.\r
312 ///\r
313 EFI_80211_COUNTRY_TRIPLET CountryTriplet[1];\r
314} EFI_80211_ELEMENT_COUNTRY;\r
315\r
316///\r
317/// EFI_80211_ELEMENT_DATA_RSN\r
318///\r
319typedef struct {\r
320 ///\r
321 /// Indicates the version number of the RSNA protocol. Value 1 is defined in current\r
322 /// IEEE 802.11 specification.\r
323 ///\r
324 UINT16 Version;\r
325 ///\r
326 /// Specifies the cipher suite selector used by the BSS to protect group address frames.\r
327 ///\r
328 UINT32 GroupDataCipherSuite;\r
329 ///\r
330 /// Indicates the number of pairwise cipher suite selectors that are contained in\r
331 /// PairwiseCipherSuiteList.\r
332 ///\r
333//UINT16 PairwiseCipherSuiteCount;\r
334 ///\r
335 /// Contains a series of cipher suite selectors that indicate the pairwise cipher\r
336 /// suites contained in this element.\r
337 ///\r
338//UINT32 PairwiseCipherSuiteList[PairwiseCipherSuiteCount];\r
339 ///\r
340 /// Indicates the number of AKM suite selectors that are contained in AKMSuiteList.\r
341 ///\r
342//UINT16 AKMSuiteCount;\r
343 ///\r
344 /// Contains a series of AKM suite selectors that indicate the AKM suites contained in\r
345 /// this element.\r
346 ///\r
347//UINT32 AKMSuiteList[AKMSuiteCount];\r
348 ///\r
349 /// Indicates requested or advertised capabilities.\r
350 ///\r
351//UINT16 RSNCapabilities;\r
352 ///\r
353 /// Indicates the number of PKMIDs in the PMKIDList.\r
354 ///\r
355//UINT16 PMKIDCount;\r
356 ///\r
357 /// Contains zero or more PKMIDs that the STA believes to be valid for the destination\r
358 /// AP.\r
359//UINT8 PMKIDList[PMKIDCount][16];\r
360 ///\r
361 /// Specifies the cipher suite selector used by the BSS to protect group addressed\r
362 /// robust management frames.\r
363 ///\r
364//UINT32 GroupManagementCipherSuite;\r
365} EFI_80211_ELEMENT_DATA_RSN;\r
366\r
367///\r
368/// EFI_80211_ELEMENT_RSN\r
369///\r
370typedef struct {\r
371 ///\r
372 /// Common header of an element.\r
373 ///\r
374 EFI_80211_ELEMENT_HEADER Hdr;\r
375 ///\r
376 /// Points to RSN element. The size of a RSN element is limited to 255 octets.\r
377 ///\r
378 EFI_80211_ELEMENT_DATA_RSN *Data;\r
379} EFI_80211_ELEMENT_RSN;\r
380\r
381///\r
382/// EFI_80211_ELEMENT_EXT_CAP\r
383///\r
384typedef struct {\r
385 ///\r
386 /// Common header of an element.\r
387 ///\r
388 EFI_80211_ELEMENT_HEADER Hdr;\r
389 ///\r
390 /// Indicates the capabilities being advertised by the STA transmitting the element.\r
391 /// This is a bit field with variable length. Refer to IEEE 802.11 specification for\r
392 /// bit value.\r
393 ///\r
394 UINT8 Capabilities[1];\r
395} EFI_80211_ELEMENT_EXT_CAP;\r
396\r
397///\r
398/// EFI_80211_BSS_DESCRIPTION\r
399///\r
400typedef struct {\r
401 ///\r
402 /// Indicates a specific BSSID of the found BSS.\r
403 ///\r
404 EFI_80211_MAC_ADDRESS BSSId;\r
405 ///\r
406 /// Specifies the SSID of the found BSS. If NULL, ignore SSIdLen field.\r
407 ///\r
408 UINT8 *SSId;\r
409 ///\r
410 /// Specifies the SSID of the found BSS. If NULL, ignore SSIdLen field.\r
411 ///\r
412 UINT8 SSIdLen;\r
413 ///\r
414 /// Specifies the type of the found BSS.\r
415 ///\r
416 EFI_80211_BSS_TYPE BSSType;\r
417 ///\r
418 /// The beacon period in TU of the found BSS.\r
419 ///\r
420 UINT16 BeaconPeriod;\r
421 ///\r
422 /// The timestamp of the received frame from the found BSS.\r
423 ///\r
424 UINT64 Timestamp;\r
425 ///\r
426 /// The advertised capabilities of the BSS.\r
427 ///\r
428 UINT16 CapabilityInfo;\r
429 ///\r
430 /// The set of data rates that shall be supported by all STAs that desire to join this\r
431 /// BSS.\r
432 ///\r
433 UINT8 *BSSBasicRateSet;\r
434 ///\r
435 /// The set of data rates that the peer STA desires to use for communication within\r
436 /// the BSS.\r
437 ///\r
438 UINT8 *OperationalRateSet;\r
439 ///\r
440 /// The information required to identify the regulatory domain in which the peer STA\r
441 /// is located.\r
442 ///\r
443 EFI_80211_ELEMENT_COUNTRY *Country;\r
444 ///\r
445 /// The cipher suites and AKM suites supported in the BSS.\r
446 ///\r
447 EFI_80211_ELEMENT_RSN RSN;\r
448 ///\r
449 /// Specifies the RSSI of the received frame.\r
450 ///\r
451 UINT8 RSSI;\r
452 ///\r
453 /// Specifies the RCPI of the received frame.\r
454 ///\r
455 UINT8 RCPIMeasurement;\r
456 ///\r
457 /// Specifies the RSNI of the received frame.\r
458 ///\r
459 UINT8 RSNIMeasurement;\r
460 ///\r
461 /// Specifies the elements requested by the request element of the Probe Request frame.\r
462 /// This is an optional parameter and may be NULL.\r
463 ///\r
464 UINT8 *RequestedElements;\r
465 ///\r
466 /// Specifies the BSS membership selectors that represent the set of features that\r
467 /// shall be supported by all STAs to join this BSS.\r
468 ///\r
469 UINT8 *BSSMembershipSelectorSet;\r
470 ///\r
471 /// Specifies the parameters within the Extended Capabilities element that are\r
472 /// supported by the MAC entity. This is an optional parameter and may be NULL.\r
473 ///\r
474 EFI_80211_ELEMENT_EXT_CAP *ExtCapElement;\r
475} EFI_80211_BSS_DESCRIPTION;\r
476\r
477///\r
478/// EFI_80211_SUBELEMENT_INFO\r
479///\r
480typedef struct {\r
481 ///\r
482 /// Indicates the unique identifier within the containing element or sub-element.\r
483 ///\r
484 UINT8 SubElementID;\r
485 ///\r
486 /// Specifies the number of octets in the Data field.\r
487 ///\r
488 UINT8 Length;\r
489 ///\r
490 /// A variable length data buffer.\r
491 ///\r
492 UINT8 Data[1];\r
493} EFI_80211_SUBELEMENT_INFO;\r
494\r
495///\r
496/// EFI_80211_MULTIPLE_BSSID\r
497///\r
498typedef struct {\r
499 ///\r
500 /// Common header of an element.\r
501 ///\r
502 EFI_80211_ELEMENT_HEADER Hdr;\r
503 ///\r
504 /// Indicates the maximum number of BSSIDs in the multiple BSSID set. When Indicator\r
505 /// is set to n, 2n is the maximum number.\r
506 ///\r
507 UINT8 Indicator;\r
508 ///\r
509 /// Contains zero or more sub-elements.\r
510 ///\r
511 EFI_80211_SUBELEMENT_INFO SubElement[1];\r
512} EFI_80211_MULTIPLE_BSSID;\r
513\r
514///\r
515/// EFI_80211_BSS_DESP_PILOT\r
516///\r
517typedef struct {\r
518 ///\r
519 /// Indicates a specific BSSID of the found BSS.\r
520 ///\r
521 EFI_80211_MAC_ADDRESS BSSId;\r
522 ///\r
523 /// Specifies the type of the found BSS.\r
524 ///\r
525 EFI_80211_BSS_TYPE BSSType;\r
526 ///\r
527 /// One octet field to report condensed capability information.\r
528 ///\r
529 UINT8 ConCapInfo;\r
530 ///\r
531 /// Two octet's field to report condensed country string.\r
532 ///\r
533 UINT8 ConCountryStr[2];\r
534 ///\r
535 /// Indicates the operating class value for the operating channel.\r
536 ///\r
537 UINT8 OperatingClass;\r
538 ///\r
539 /// Indicates the operating channel.\r
540 ///\r
541 UINT8 Channel;\r
542 ///\r
543 /// Indicates the measurement pilot interval in TU.\r
544 ///\r
545 UINT8 Interval;\r
546 ///\r
547 /// Indicates that the BSS is within a multiple BSSID set.\r
548 ///\r
549 EFI_80211_MULTIPLE_BSSID *MultipleBSSID;\r
550 ///\r
551 /// Specifies the RCPI of the received frame.\r
552 ///\r
553 UINT8 RCPIMeasurement;\r
554 ///\r
555 /// Specifies the RSNI of the received frame.\r
556 ///\r
557 UINT8 RSNIMeasurement;\r
558} EFI_80211_BSS_DESP_PILOT;\r
559\r
560///\r
561/// EFI_80211_SCAN_RESULT\r
562///\r
563typedef struct {\r
564 ///\r
565 /// The number of EFI_80211_BSS_DESCRIPTION in BSSDespSet. If zero, BSSDespSet should\r
566 /// be ignored.\r
567 ///\r
568 UINTN NumOfBSSDesp;\r
569 ///\r
570 /// Points to zero or more instances of EFI_80211_BSS_DESCRIPTION.\r
571 ///\r
572 EFI_80211_BSS_DESCRIPTION **BSSDespSet;\r
573 ///\r
574 /// The number of EFI_80211_BSS_DESP_PILOT in BSSDespFromPilotSet. If zero,\r
575 /// BSSDespFromPilotSet should be ignored.\r
576 ///\r
577 UINTN NumofBSSDespFromPilot;\r
578 ///\r
579 /// Points to zero or more instances of EFI_80211_BSS_DESP_PILOT.\r
580 ///\r
581 EFI_80211_BSS_DESP_PILOT **BSSDespFromPilotSet;\r
582 ///\r
583 /// Specifies zero or more elements. This is an optional parameter and may be NULL.\r
584 ///\r
585 UINT8 *VendorSpecificInfo;\r
586} EFI_80211_SCAN_RESULT;\r
587\r
588///\r
589/// EFI_80211_SCAN_DATA_TOKEN\r
590///\r
591typedef struct {\r
592 ///\r
593 /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
594 /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
595 ///\r
596 EFI_EVENT Event;\r
597 ///\r
598 /// Will be set to one of the following values:\r
599 /// EFI_SUCCESS: Scan operation completed successfully.\r
600 /// EFI_NOT_FOUND: Failed to find available BSS.\r
601 /// EFI_DEVICE_ERROR: An unexpected network or system error occurred.\r
602 /// EFI_ACCESS_DENIED: The scan operation is not completed due to some underlying\r
603 /// hardware or software state.\r
604 /// EFI_NOT_READY: The scan operation is started but not yet completed.\r
605 EFI_STATUS Status;\r
606 ///\r
607 /// Pointer to the scan data.\r
608 ///\r
609 EFI_80211_SCAN_DATA *Data;\r
610 ///\r
611 /// Indicates the scan state.\r
612 ///\r
613 EFI_80211_SCAN_RESULT_CODE ResultCode;\r
614 ///\r
615 /// Indicates the scan result. It is caller's responsibility to free this buffer.\r
616 ///\r
617 EFI_80211_SCAN_RESULT *Result;\r
618} EFI_80211_SCAN_DATA_TOKEN;\r
619\r
620///\r
621/// EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE\r
622///\r
623typedef struct {\r
624 ///\r
625 /// The first channel number in a subband of supported channels.\r
626 ///\r
627 UINT8 FirstChannelNumber;\r
628 ///\r
629 /// The number of channels in a subband of supported channels.\r
630 ///\r
631 UINT8 NumberOfChannels;\r
632} EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE;\r
633\r
634///\r
635/// EFI_80211_ELEMENT_SUPP_CHANNEL\r
636///\r
637typedef struct {\r
638 ///\r
639 /// Common header of an element.\r
640 ///\r
641 EFI_80211_ELEMENT_HEADER Hdr;\r
642 ///\r
643 /// Indicates one or more tuples of (first channel, number of channels).\r
644 ///\r
645 EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE Subband[1];\r
646} EFI_80211_ELEMENT_SUPP_CHANNEL;\r
647\r
648///\r
649/// EFI_80211_ASSOCIATE_DATA\r
650///\r
651typedef struct {\r
652 ///\r
653 /// Specifies the address of the peer MAC entity to associate with.\r
654 ///\r
655 EFI_80211_MAC_ADDRESS BSSId;\r
656 ///\r
657 /// Specifies the requested operational capabilities to the AP in 2 octets.\r
658 ///\r
659 UINT16 CapabilityInfo;\r
660 ///\r
661 /// Specifies a time limit in TU, after which the associate procedure is terminated.\r
662 ///\r
663 UINT32 FailureTimeout;\r
664 ///\r
665 /// Specifies if in power save mode, how often the STA awakes and listens for the next\r
666 /// beacon frame in TU.\r
667 ///\r
668 UINT32 ListenInterval;\r
669 ///\r
670 /// Indicates a list of channels in which the STA is capable of operating.\r
671 ///\r
672 EFI_80211_ELEMENT_SUPP_CHANNEL *Channels;\r
673 ///\r
674 /// The cipher suites and AKM suites selected by the STA.\r
675 ///\r
676 EFI_80211_ELEMENT_RSN RSN;\r
677 ///\r
678 /// Specifies the parameters within the Extended Capabilities element that are\r
679 /// supported by the MAC entity. This is an optional parameter and may be NULL.\r
680 ///\r
681 EFI_80211_ELEMENT_EXT_CAP *ExtCapElement;\r
682 ///\r
683 /// Specifies zero or more elements. This is an optional parameter and may be NULL.\r
684 ///\r
685 UINT8 *VendorSpecificInfo;\r
686} EFI_80211_ASSOCIATE_DATA;\r
687\r
688///\r
689/// EFI_80211_ELEMENT_TIMEOUT_VAL\r
690///\r
691typedef struct {\r
692 ///\r
693 /// Common header of an element.\r
694 ///\r
695 EFI_80211_ELEMENT_HEADER Hdr;\r
696 ///\r
697 /// Specifies the timeout interval type.\r
698 ///\r
699 UINT8 Type;\r
700 ///\r
701 /// Specifies the timeout interval value.\r
702 ///\r
703 UINT32 Value;\r
704} EFI_80211_ELEMENT_TIMEOUT_VAL;\r
705\r
706///\r
707/// EFI_80211_ASSOCIATE_RESULT\r
708///\r
709typedef struct {\r
710 ///\r
711 /// Specifies the address of the peer MAC entity from which the association request\r
712 /// was received.\r
713 ///\r
714 EFI_80211_MAC_ADDRESS BSSId;\r
715 ///\r
716 /// Specifies the operational capabilities advertised by the AP.\r
717 ///\r
718 UINT16 CapabilityInfo;\r
719 ///\r
720 /// Specifies the association ID value assigned by the AP.\r
721 ///\r
722 UINT16 AssociationID;\r
723 ///\r
724 /// Indicates the measured RCPI of the corresponding association request frame. It is\r
725 /// an optional parameter and is set to zero if unavailable.\r
726 ///\r
727 UINT8 RCPIValue;\r
728 ///\r
729 /// Indicates the measured RSNI at the time the corresponding association request\r
730 /// frame was received. It is an optional parameter and is set to zero if unavailable.\r
731 ///\r
732 UINT8 RSNIValue;\r
733 ///\r
734 /// Specifies the parameters within the Extended Capabilities element that are\r
735 /// supported by the MAC entity. This is an optional parameter and may be NULL.\r
736 ///\r
737 EFI_80211_ELEMENT_EXT_CAP *ExtCapElement;\r
738 ///\r
739 /// Specifies the timeout interval when the result code is AssociateRefusedTemporarily.\r
740 ///\r
741 EFI_80211_ELEMENT_TIMEOUT_VAL TimeoutInterval;\r
742 ///\r
743 /// Specifies zero or more elements. This is an optional parameter and may be NULL.\r
744 ///\r
745 UINT8 *VendorSpecificInfo;\r
746} EFI_80211_ASSOCIATE_RESULT;\r
747\r
748///\r
749/// EFI_80211_ASSOCIATE_DATA_TOKEN\r
750///\r
751typedef struct {\r
752 ///\r
753 /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
754 /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
755 ///\r
756 EFI_EVENT Event;\r
757 ///\r
758 /// Will be set to one of the following values:\r
759 /// EFI_SUCCESS: Association operation completed successfully.\r
760 /// EFI_DEVICE_ERROR: An unexpected network or system error occurred.\r
761 ///\r
762 EFI_STATUS Status;\r
763 ///\r
764 /// Pointer to the association data.\r
765 ///\r
766 EFI_80211_ASSOCIATE_DATA *Data;\r
767 ///\r
768 /// Indicates the association state.\r
769 ///\r
770 EFI_80211_ASSOCIATE_RESULT_CODE ResultCode;\r
771 ///\r
772 /// Indicates the association result. It is caller's responsibility to free this\r
773 /// buffer.\r
774 ///\r
775 EFI_80211_ASSOCIATE_RESULT *Result;\r
776} EFI_80211_ASSOCIATE_DATA_TOKEN;\r
777\r
778///\r
779/// EFI_80211_DISASSOCIATE_DATA\r
780///\r
781typedef struct {\r
782 ///\r
783 /// Specifies the address of the peer MAC entity with which to perform the\r
784 /// disassociation process.\r
785 ///\r
786 EFI_80211_MAC_ADDRESS BSSId;\r
787 ///\r
788 /// Specifies the reason for initiating the disassociation process.\r
789 ///\r
790 EFI_80211_REASON_CODE ReasonCode;\r
791 ///\r
792 /// Zero or more elements, may be NULL.\r
793 ///\r
794 UINT8 *VendorSpecificInfo;\r
795} EFI_80211_DISASSOCIATE_DATA;\r
796\r
797///\r
798/// EFI_80211_DISASSOCIATE_DATA_TOKEN\r
799///\r
800typedef struct {\r
801 ///\r
802 /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
803 /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
804 ///\r
805 EFI_EVENT Event;\r
806 ///\r
807 /// Will be set to one of the following values:\r
808 /// EFI_SUCCESS: Disassociation operation completed successfully.\r
809 /// EFI_DEVICE_ERROR: An unexpected network or system error occurred.\r
810 /// EFI_ACCESS_DENIED: The disassociation operation is not completed due to some\r
811 /// underlying hardware or software state.\r
812 /// EFI_NOT_READY: The disassociation operation is started but not yet completed.\r
813 ///\r
814 EFI_STATUS Status;\r
815 ///\r
816 /// Pointer to the disassociation data.\r
817 ///\r
818 EFI_80211_DISASSOCIATE_DATA *Data;\r
819 ///\r
820 /// Indicates the disassociation state.\r
821 ///\r
822 EFI_80211_DISASSOCIATE_RESULT_CODE ResultCode;\r
823} EFI_80211_DISASSOCIATE_DATA_TOKEN;\r
824\r
825///\r
826/// EFI_80211_AUTHENTICATION_DATA\r
827///\r
828typedef struct {\r
829 ///\r
830 /// Specifies the address of the peer MAC entity with which to perform the\r
831 /// authentication process.\r
832 ///\r
833 EFI_80211_MAC_ADDRESS BSSId;\r
834 ///\r
835 /// Specifies the type of authentication algorithm to use during the authentication\r
836 /// process.\r
837 ///\r
838 EFI_80211_AUTHENTICATION_TYPE AuthType;\r
839 ///\r
840 /// Specifies a time limit in TU after which the authentication procedure is\r
841 /// terminated.\r
842 ///\r
843 UINT32 FailureTimeout;\r
844 ///\r
845 /// Specifies the set of elements to be included in the first message of the FT\r
846 /// authentication sequence, may be NULL.\r
847 ///\r
848 UINT8 *FTContent;\r
849 ///\r
850 /// Specifies the set of elements to be included in the SAE Commit Message or SAE\r
851 /// Confirm Message, may be NULL.\r
852 ///\r
853 UINT8 *SAEContent;\r
854 ///\r
855 /// Zero or more elements, may be NULL.\r
856 ///\r
857 UINT8 *VendorSpecificInfo;\r
858} EFI_80211_AUTHENTICATE_DATA;\r
859\r
860///\r
861/// EFI_80211_AUTHENTICATION_RESULT\r
862///\r
863typedef struct {\r
864 ///\r
865 /// Specifies the address of the peer MAC entity from which the authentication request\r
866 /// was received.\r
867 ///\r
868 EFI_80211_MAC_ADDRESS BSSId;\r
869 ///\r
870 /// Specifies the set of elements to be included in the second message of the FT\r
871 /// authentication sequence, may be NULL.\r
872 ///\r
873 UINT8 *FTContent;\r
874 ///\r
875 /// Specifies the set of elements to be included in the SAE Commit Message or SAE\r
876 /// Confirm Message, may be NULL.\r
877 ///\r
878 UINT8 *SAEContent;\r
879 ///\r
880 /// Zero or more elements, may be NULL.\r
881 ///\r
882 UINT8 *VendorSpecificInfo;\r
883} EFI_80211_AUTHENTICATE_RESULT;\r
884\r
885///\r
886/// EFI_80211_AUTHENTICATE_DATA_TOKEN\r
887///\r
888typedef struct {\r
889 ///\r
890 /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
891 /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
892 ///\r
893 EFI_EVENT Event;\r
894 ///\r
895 /// Will be set to one of the following values:\r
896 /// EFI_SUCCESS: Authentication operation completed successfully.\r
897 /// EFI_PROTOCOL_ERROR: Peer MAC entity rejects the authentication.\r
898 /// EFI_NO_RESPONSE: Peer MAC entity does not response the authentication request.\r
899 /// EFI_DEVICE_ERROR: An unexpected network or system error occurred.\r
900 /// EFI_ACCESS_DENIED: The authentication operation is not completed due to some\r
901 /// underlying hardware or software state.\r
902 /// EFI_NOT_READY: The authentication operation is started but not yet completed.\r
903 ///\r
904 EFI_STATUS Status;\r
905 ///\r
906 /// Pointer to the authentication data.\r
907 ///\r
908 EFI_80211_AUTHENTICATE_DATA *Data;\r
909 ///\r
910 /// Indicates the association state.\r
911 ///\r
912 EFI_80211_AUTHENTICATE_RESULT_CODE ResultCode;\r
913 ///\r
914 /// Indicates the association result. It is caller's responsibility to free this\r
915 /// buffer.\r
916 ///\r
917 EFI_80211_AUTHENTICATE_RESULT *Result;\r
918} EFI_80211_AUTHENTICATE_DATA_TOKEN;\r
919\r
920///\r
921/// EFI_80211_DEAUTHENTICATE_DATA\r
922///\r
923typedef struct {\r
924 ///\r
925 /// Specifies the address of the peer MAC entity with which to perform the\r
926 /// deauthentication process.\r
927 ///\r
928 EFI_80211_MAC_ADDRESS BSSId;\r
929 ///\r
930 /// Specifies the reason for initiating the deauthentication process.\r
931 ///\r
932 EFI_80211_REASON_CODE ReasonCode;\r
933 ///\r
934 /// Zero or more elements, may be NULL.\r
935 ///\r
936 UINT8 *VendorSpecificInfo;\r
937} EFI_80211_DEAUTHENTICATE_DATA;\r
938\r
939///\r
940/// EFI_80211_DEAUTHENTICATE_DATA_TOKEN\r
941///\r
942typedef struct {\r
943 ///\r
944 /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
945 /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
946 ///\r
947 EFI_EVENT Event;\r
948 ///\r
949 /// Will be set to one of the following values:\r
950 /// EFI_SUCCESS: Deauthentication operation completed successfully.\r
951 /// EFI_DEVICE_ERROR: An unexpected network or system error occurred.\r
952 /// EFI_ACCESS_DENIED: The deauthentication operation is not completed due to some\r
953 /// underlying hardware or software state.\r
954 /// EFI_NOT_READY: The deauthentication operation is started but not yet\r
955 /// completed.\r
956 ///\r
957 EFI_STATUS Status;\r
958 ///\r
959 /// Pointer to the deauthentication data.\r
960 ///\r
961 EFI_80211_DEAUTHENTICATE_DATA *Data;\r
962} EFI_80211_DEAUTHENTICATE_DATA_TOKEN;\r
963\r
964/**\r
965 Request a survey of potential BSSs that administrator can later elect to try to join.\r
966\r
967 The Scan() function returns the description of the set of BSSs detected by the scan\r
968 process. Passive scan operation is performed by default.\r
969\r
970 @param[in] This Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
971 instance.\r
972 @param[in] Data Pointer to the scan token.\r
973\r
974 @retval EFI_SUCCESS The operation completed successfully.\r
975 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
976 This is NULL.\r
977 Data is NULL.\r
978 Data->Data is NULL.\r
979 @retval EFI_UNSUPPORTED One or more of the input parameters are not supported\r
980 by this implementation.\r
981 @retval EFI_ALREADY_STARTED The scan operation is already started.\r
982**/\r
983typedef\r
984EFI_STATUS\r
985(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_SCAN)(\r
986 IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL *This,\r
987 IN EFI_80211_SCAN_DATA_TOKEN *Data\r
988 );\r
989\r
990/**\r
991 Request an association with a specified peer MAC entity that is within an AP.\r
992\r
993 The Associate() function provides the capability for MAC layer to become associated\r
994 with an AP.\r
995\r
996 @param[in] This Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
997 instance.\r
998 @param[in] Data Pointer to the association token.\r
999\r
1000 @retval EFI_SUCCESS The operation completed successfully.\r
1001 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
1002 This is NULL.\r
1003 Data is NULL.\r
1004 Data->Data is NULL.\r
1005 @retval EFI_UNSUPPORTED One or more of the input parameters are not supported\r
1006 by this implementation.\r
1007 @retval EFI_ALREADY_STARTED The association process is already started.\r
1008 @retval EFI_NOT_READY Authentication is not performed before this association\r
1009 process.\r
1010 @retval EFI_NOT_FOUND The specified peer MAC entity is not found.\r
1011 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
1012**/\r
1013typedef\r
1014EFI_STATUS\r
1015(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_ASSOCIATE)(\r
1016 IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL *This,\r
1017 IN EFI_80211_ASSOCIATE_DATA_TOKEN *Data\r
1018 );\r
1019\r
1020/**\r
1021 Request a disassociation with a specified peer MAC entity.\r
1022\r
1023 The Disassociate() function is invoked to terminate an existing association.\r
1024 Disassociation is a notification and cannot be refused by the receiving peer except\r
1025 when management frame protection is negotiated and the message integrity check fails.\r
1026\r
1027 @param[in] This Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
1028 instance.\r
1029 @param[in] Data Pointer to the disassociation token.\r
1030\r
1031 @retval EFI_SUCCESS The operation completed successfully.\r
1032 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
1033 This is NULL.\r
1034 Data is NULL.\r
1035 @retval EFI_ALREADY_STARTED The disassociation process is already started.\r
1036 @retval EFI_NOT_READY The disassociation service is invoked to a\r
1037 nonexistent association relationship.\r
1038 @retval EFI_NOT_FOUND The specified peer MAC entity is not found.\r
1039 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
1040**/\r
1041typedef\r
1042EFI_STATUS\r
1043(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_DISASSOCIATE)(\r
1044 IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL *This,\r
1045 IN EFI_80211_DISASSOCIATE_DATA_TOKEN *Data\r
1046 );\r
1047\r
1048/**\r
1049 Request the process of establishing an authentication relationship with a peer MAC\r
1050 entity.\r
1051\r
1052 The Authenticate() function requests authentication with a specified peer MAC entity.\r
1053 This service might be time-consuming thus is designed to be invoked independently of\r
1054 the association service.\r
1055\r
1056 @param[in] This Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
1057 instance.\r
1058 @param[in] Data Pointer to the authentication token.\r
1059\r
1060 @retval EFI_SUCCESS The operation completed successfully.\r
1061 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
1062 This is NULL.\r
1063 Data is NULL.\r
1064 Data.Data is NULL.\r
1065 @retval EFI_UNSUPPORTED One or more of the input parameters are not supported\r
1066 by this implementation.\r
1067 @retval EFI_ALREADY_STARTED The authentication process is already started.\r
1068 @retval EFI_NOT_FOUND The specified peer MAC entity is not found.\r
1069 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
1070**/\r
1071typedef\r
1072EFI_STATUS\r
1073(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_AUTHENTICATE)(\r
1074 IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL *This,\r
1075 IN EFI_80211_AUTHENTICATE_DATA_TOKEN *Data\r
1076 );\r
1077\r
1078/**\r
1079 Invalidate the authentication relationship with a peer MAC entity.\r
1080\r
1081 The Deauthenticate() function requests that the authentication relationship with a\r
1082 specified peer MAC entity be invalidated. Deauthentication is a notification and when\r
1083 it is sent out the association at the transmitting station is terminated.\r
1084\r
1085 @param[in] This Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
1086 instance.\r
1087 @param[in] Data Pointer to the deauthentication token.\r
1088\r
1089 @retval EFI_SUCCESS The operation completed successfully.\r
1090 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r
1091 This is NULL.\r
1092 Data is NULL.\r
1093 Data.Data is NULL.\r
1094 @retval EFI_ALREADY_STARTED The deauthentication process is already started.\r
1095 @retval EFI_NOT_READY The deauthentication service is invoked to a\r
1096 nonexistent association or authentication relationship.\r
1097 @retval EFI_NOT_FOUND The specified peer MAC entity is not found.\r
1098 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
1099**/\r
1100typedef\r
1101EFI_STATUS\r
1102(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_DEAUTHENTICATE)(\r
1103 IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL *This,\r
1104 IN EFI_80211_DEAUTHENTICATE_DATA_TOKEN *Data\r
1105 );\r
1106\r
1107///\r
1108/// The EFI_WIRELESS_MAC_CONNECTION_PROTOCOL is designed to provide management service\r
1109/// interfaces for the EFI wireless network stack to establish wireless connection with\r
1110/// AP. An EFI Wireless MAC Connection Protocol instance will be installed on each\r
1111/// communication device that the EFI wireless network stack runs on.\r
1112///\r
1113struct _EFI_WIRELESS_MAC_CONNECTION_PROTOCOL {\r
1114 EFI_WIRELESS_MAC_CONNECTION_SCAN Scan;\r
1115 EFI_WIRELESS_MAC_CONNECTION_ASSOCIATE Associate;\r
1116 EFI_WIRELESS_MAC_CONNECTION_DISASSOCIATE Disassociate;\r
1117 EFI_WIRELESS_MAC_CONNECTION_AUTHENTICATE Authenticate;\r
1118 EFI_WIRELESS_MAC_CONNECTION_DEAUTHENTICATE Deauthenticate;\r
1119};\r
1120\r
1121extern EFI_GUID gEfiWiFiProtocolGuid;\r
1122\r
1123#endif\r