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