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