summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Protocol/WiFi.h
blob: 8e9fb3835d44cd049f978ea3acd29e78665ca83b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
/** @file
  This file provides management service interfaces of 802.11 MAC layer. It is used by
  network applications (and drivers) to establish wireless connection with an access
  point (AP).

  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
  This program and the accompanying materials
  are licensed and made available under the terms and conditions of the BSD License
  which accompanies this distribution. The full text of the license may be found at
  http://opensource.org/licenses/bsd-license.php

  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

  @par Revision Reference:
  This Protocol is introduced in UEFI Specification 2.5

**/

#ifndef __EFI_WIFI_PROTOCOL_H__
#define __EFI_WIFI_PROTOCOL_H__

#define EFI_WIRELESS_MAC_CONNECTION_PROTOCOL_GUID \
  { \
    0xda55bc9, 0x45f8, 0x4bb4, {0x87, 0x19, 0x52, 0x24, 0xf1, 0x8a, 0x4d, 0x45 } \
  }

typedef struct _EFI_WIRELESS_MAC_CONNECTION_PROTOCOL EFI_WIRELESS_MAC_CONNECTION_PROTOCOL;

///
/// EFI_80211_BSS_TYPE
///
typedef enum {
  IeeeInfrastructureBSS,
  IeeeIndependentBSS,
  IeeeMeshBSS,
  IeeeAnyBss
} EFI_80211_BSS_TYPE;

///
/// EFI_80211_ACC_NET_TYPE
///
typedef enum {
  IeeePrivate           = 0,
  IeeePrivatewithGuest  = 1,
  IeeeChargeablePublic  = 2,
  IeeeFreePublic        = 3,
  IeeePersonal          = 4,
  IeeeEmergencyServOnly = 5,
  IeeeTestOrExp         = 14,
  IeeeWildcard          = 15
} EFI_80211_ACC_NET_TYPE;

///
/// EFI_80211_ASSOCIATE_RESULT_CODE
///
typedef enum {
  AssociateSuccess,
  AssociateRefusedReasonUnspecified,
  AssociateRefusedCapsMismatch,
  AssociateRefusedExtReason,
  AssociateRefusedAPOutOfMemory,
  AssociateRefusedBasicRatesMismatch,
  AssociateRejectedEmergencyServicesNotSupported,
  AssociateRefusedTemporarily
} EFI_80211_ASSOCIATE_RESULT_CODE;

///
/// EFI_80211_SCAN_RESULT_CODE
///
typedef enum {
  ///
  /// The scan operation finished successfully.
  ///
  ScanSuccess,
  ///
  /// The scan operation is not supported in current implementation.
  ///
  ScanNotSupported
} EFI_80211_SCAN_RESULT_CODE;

///
/// EFI_80211_REASON_CODE
///
typedef enum {
  Ieee80211UnspecifiedReason           = 1,
  Ieee80211PreviousAuthenticateInvalid = 2,
  Ieee80211DeauthenticatedSinceLeaving = 3,
  Ieee80211DisassociatedDueToInactive  = 4,
  Ieee80211DisassociatedSinceApUnable  = 5,
  Ieee80211Class2FrameNonauthenticated = 6,
  Ieee80211Class3FrameNonassociated    = 7,
  Ieee80211DisassociatedSinceLeaving   = 8,
  // ...
} EFI_80211_REASON_CODE;

///
/// EFI_80211_DISASSOCIATE_RESULT_CODE
///
typedef enum {
  ///
  /// Disassociation process completed successfully.
  ///
  DisassociateSuccess,
  ///
  /// Disassociation failed due to any input parameter is invalid.
  ///
  DisassociateInvalidParameters
} EFI_80211_DISASSOCIATE_RESULT_CODE;

///
/// EFI_80211_AUTHENTICATION_TYPE
///
typedef enum {
  ///
  /// Open system authentication, admits any STA to the DS.
  ///
  OpenSystem,
  ///
  /// Shared Key authentication relies on WEP to demonstrate knowledge of a WEP
  /// encryption key.
  ///
  SharedKey,
  ///
  /// FT authentication relies on keys derived during the initial mobility domain
  /// association to authenticate the stations.
  ///
  FastBSSTransition,
  ///
  /// SAE authentication uses finite field cryptography to prove knowledge of a shared
  /// password.
  ///
  SAE
} EFI_80211_AUTHENTICATION_TYPE;

///
/// EFI_80211_AUTHENTICATION_RESULT_CODE
///
typedef enum {
  AuthenticateSuccess,
  AuthenticateRefused,
  AuthenticateAnticLoggingTokenRequired,
  AuthenticateFiniteCyclicGroupNotSupported,
  AuthenticationRejected,
  AuthenticateInvalidParameter
} EFI_80211_AUTHENTICATE_RESULT_CODE;

///
/// EFI_80211_MAC_ADDRESS
///
typedef struct {
  UINT8                              Addr[6];
} EFI_80211_MAC_ADDRESS;

///
/// EFI_80211_ELEMENT_HEADER
///
typedef struct {
  ///
  /// A unique element ID defined in IEEE 802.11 specification.
  ///
  UINT8                              ElementID;
  ///
  /// Specifies the number of octets in the element body.
  ///
  UINT8                              Length;
} EFI_80211_ELEMENT_HEADER;

///
/// EFI_80211_ELEMENT_REQ
///
typedef struct {
  ///
  /// Common header of an element.
  ///
  EFI_80211_ELEMENT_HEADER           Hdr;
  ///
  /// Start of elements that are requested to be included in the Probe Response frame.
  /// The elements are listed in order of increasing element ID.
  ///
  UINT8                              RequestIDs[1];
} EFI_80211_ELEMENT_REQ;

///
/// EFI_80211_ELEMENT_SSID
///
typedef struct {
  ///
  /// Common header of an element.
  ///
  EFI_80211_ELEMENT_HEADER           Hdr;
  ///
  /// Service set identifier. If Hdr.Length is zero, this field is ignored.
  ///
  UINT8                              SSId[32];
} EFI_80211_ELEMENT_SSID;

///
/// EFI_80211_SCAN_DATA
///
typedef struct {
  ///
  /// Determines whether infrastructure BSS, IBSS, MBSS, or all, are included in the
  /// scan.
  ///
  EFI_80211_BSS_TYPE                 BSSType;
  ///
  /// Indicates a specific or wildcard BSSID. Use all binary 1s to represent all SSIDs.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Length in bytes of the SSId. If zero, ignore SSId field.
  ///
  UINT8                              SSIdLen;
  ///
  /// Specifies the desired SSID or the wildcard SSID. Use NULL to represent all SSIDs.
  ///
  UINT8                              *SSId;
  ///
  /// Indicates passive scanning if TRUE.
  ///
  BOOLEAN                            PassiveMode;
  ///
  /// The delay in microseconds to be used prior to transmitting a Probe frame during
  /// active scanning. If zero, the value can be overridden by an
  /// implementation-dependent default value.
  ///
  UINT32                             ProbeDelay;
  ///
  /// Specifies a list of channels that are examined when scanning for a BSS. If set to
  /// NULL, all valid channels will be scanned.
  ///
  UINT32                             *ChannelList;
  ///
  /// Indicates the minimum time in TU to spend on each channel when scanning. If zero,
  /// the value can be overridden by an implementation-dependent default value.
  ///
  UINT32                             MinChannelTime;
  ///
  /// Indicates the maximum time in TU to spend on each channel when scanning. If zero,
  /// the value can be overridden by an implementation-dependent default value.
  ///
  UINT32                             MaxChannelTime;
  ///
  /// Points to an optionally present element. This is an optional parameter and may be
  /// NULL.
  ///
  EFI_80211_ELEMENT_REQ              *RequestInformation;
  ///
  /// Indicates one or more SSID elements that are optionally present. This is an
  /// optional parameter and may be NULL.
  ///
  EFI_80211_ELEMENT_SSID             *SSIDList;
  ///
  /// Specifies a desired specific access network type or the wildcard access network
  /// type. Use 15 as wildcard access network type.
  ///
  EFI_80211_ACC_NET_TYPE             AccessNetworkType;
  ///
  ///  Specifies zero or more elements. This is an optional parameter and may be NULL.
  ///
  UINT8                              *VendorSpecificInfo;
} EFI_80211_SCAN_DATA;

///
/// EFI_80211_COUNTRY_TRIPLET_SUBBAND
///
typedef struct {
  ///
  /// Indicates the lowest channel number in the subband. It has a positive integer
  /// value less than 201.
  ///
  UINT8                              FirstChannelNum;
  ///
  /// Indicates the number of channels in the subband.
  ///
  UINT8                              NumOfChannels;
  ///
  /// Indicates the maximum power in dBm allowed to be transmitted.
  ///
  UINT8                              MaxTxPowerLevel;
} EFI_80211_COUNTRY_TRIPLET_SUBBAND;

///
/// EFI_80211_COUNTRY_TRIPLET_OPERATE
///
typedef struct {
  ///
  /// Indicates the operating extension identifier. It has a positive integer value of
  /// 201 or greater.
  ///
  UINT8                              OperatingExtId;
  ///
  /// Index into a set of values for radio equipment set of rules.
  ///
  UINT8                              OperatingClass;
  ///
  /// Specifies aAirPropagationTime characteristics used in BSS operation. Refer the
  /// definition of aAirPropagationTime in IEEE 802.11 specification.
  ///
  UINT8                              CoverageClass;
} EFI_80211_COUNTRY_TRIPLET_OPERATE;

///
/// EFI_80211_COUNTRY_TRIPLET
///
typedef union {
  ///
  /// The subband triplet.
  ///
  EFI_80211_COUNTRY_TRIPLET_SUBBAND  Subband;
  ///
  /// The operating triplet.
  ///
  EFI_80211_COUNTRY_TRIPLET_OPERATE  Operating;
} EFI_80211_COUNTRY_TRIPLET;

///
/// EFI_80211_ELEMENT_COUNTRY
///
typedef struct {
  ///
  /// Common header of an element.
  ///
  EFI_80211_ELEMENT_HEADER           Hdr;
  ///
  /// Specifies country strings in 3 octets.
  ///
  UINT8                              CountryStr[3];
  ///
  /// Indicates a triplet that repeated in country element. The number of triplets is
  /// determined by the Hdr.Length field.
  ///
  EFI_80211_COUNTRY_TRIPLET          CountryTriplet[1];
} EFI_80211_ELEMENT_COUNTRY;

///
/// EFI_80211_ELEMENT_DATA_RSN
///
typedef struct {
  ///
  /// Indicates the version number of the RSNA protocol. Value 1 is defined in current
  /// IEEE 802.11 specification.
  ///
  UINT16                             Version;
  ///
  /// Specifies the cipher suite selector used by the BSS to protect group address frames.
  ///
  UINT32                             GroupDataCipherSuite;
  ///
  /// Indicates the number of pairwise cipher suite selectors that are contained in
  /// PairwiseCipherSuiteList.
  ///
//UINT16                             PairwiseCipherSuiteCount;
  ///
  /// Contains a series of cipher suite selectors that indicate the pairwise cipher
  /// suites contained in this element.
  ///
//UINT32                             PairwiseCipherSuiteList[PairwiseCipherSuiteCount];
  ///
  /// Indicates the number of AKM suite selectors that are contained in AKMSuiteList.
  ///
//UINT16                             AKMSuiteCount;
  ///
  /// Contains a series of AKM suite selectors that indicate the AKM suites contained in
  /// this element.
  ///
//UINT32                             AKMSuiteList[AKMSuiteCount];
  ///
  /// Indicates requested or advertised capabilities.
  ///
//UINT16                             RSNCapabilities;
  ///
  /// Indicates the number of PKMIDs in the PMKIDList.
  ///
//UINT16                             PMKIDCount;
  ///
  /// Contains zero or more PKMIDs that the STA believes to be valid for the destination
  /// AP.
//UINT8                              PMKIDList[PMKIDCount][16];
  ///
  /// Specifies the cipher suite selector used by the BSS to protect group addressed
  /// robust management frames.
  ///
//UINT32                             GroupManagementCipherSuite;
} EFI_80211_ELEMENT_DATA_RSN;

///
/// EFI_80211_ELEMENT_RSN
///
typedef struct {
  ///
  /// Common header of an element.
  ///
  EFI_80211_ELEMENT_HEADER           Hdr;
  ///
  /// Points to RSN element. The size of a RSN element is limited to 255 octets.
  ///
  EFI_80211_ELEMENT_DATA_RSN         *Data;
} EFI_80211_ELEMENT_RSN;

///
/// EFI_80211_ELEMENT_EXT_CAP
///
typedef struct {
  ///
  /// Common header of an element.
  ///
  EFI_80211_ELEMENT_HEADER           Hdr;
  ///
  /// Indicates the capabilities being advertised by the STA transmitting the element.
  /// This is a bit field with variable length. Refer to IEEE 802.11 specification for
  /// bit value.
  ///
  UINT8                              Capabilities[1];
} EFI_80211_ELEMENT_EXT_CAP;

///
/// EFI_80211_BSS_DESCRIPTION
///
typedef struct {
  ///
  /// Indicates a specific BSSID of the found BSS.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Specifies the SSID of the found BSS. If NULL, ignore SSIdLen field.
  ///
  UINT8                              *SSId;
  ///
  /// Specifies the SSID of the found BSS. If NULL, ignore SSIdLen field.
  ///
  UINT8                              SSIdLen;
  ///
  /// Specifies the type of the found BSS.
  ///
  EFI_80211_BSS_TYPE                 BSSType;
  ///
  /// The beacon period in TU of the found BSS.
  ///
  UINT16                             BeaconPeriod;
  ///
  /// The timestamp of the received frame from the found BSS.
  ///
  UINT64                             Timestamp;
  ///
  /// The advertised capabilities of the BSS.
  ///
  UINT16                             CapabilityInfo;
  ///
  /// The set of data rates that shall be supported by all STAs that desire to join this
  /// BSS.
  ///
  UINT8                              *BSSBasicRateSet;
  ///
  /// The set of data rates that the peer STA desires to use for communication within
  /// the BSS.
  ///
  UINT8                              *OperationalRateSet;
  ///
  /// The information required to identify the regulatory domain in which the peer STA
  /// is located.
  ///
  EFI_80211_ELEMENT_COUNTRY          *Country;
  ///
  /// The cipher suites and AKM suites supported in the BSS.
  ///
  EFI_80211_ELEMENT_RSN              RSN;
  ///
  /// Specifies the RSSI of the received frame.
  ///
  UINT8                              RSSI;
  ///
  /// Specifies the RCPI of the received frame.
  ///
  UINT8                              RCPIMeasurement;
  ///
  /// Specifies the RSNI of the received frame.
  ///
  UINT8                              RSNIMeasurement;
  ///
  /// Specifies the elements requested by the request element of the Probe Request frame.
  /// This is an optional parameter and may be NULL.
  ///
  UINT8                              *RequestedElements;
  ///
  /// Specifies the BSS membership selectors that represent the set of features that
  /// shall be supported by all STAs to join this BSS.
  ///
  UINT8                              *BSSMembershipSelectorSet;
  ///
  /// Specifies the parameters within the Extended Capabilities element that are
  /// supported by the MAC entity. This is an optional parameter and may be NULL.
  ///
  EFI_80211_ELEMENT_EXT_CAP          *ExtCapElement;
} EFI_80211_BSS_DESCRIPTION;

///
/// EFI_80211_SUBELEMENT_INFO
///
typedef struct {
  ///
  /// Indicates the unique identifier within the containing element or sub-element.
  ///
  UINT8                              SubElementID;
  ///
  /// Specifies the number of octets in the Data field.
  ///
  UINT8                              Length;
  ///
  /// A variable length data buffer.
  ///
  UINT8                              Data[1];
} EFI_80211_SUBELEMENT_INFO;

///
/// EFI_80211_MULTIPLE_BSSID
///
typedef struct {
  ///
  /// Common header of an element.
  ///
  EFI_80211_ELEMENT_HEADER           Hdr;
  ///
  /// Indicates the maximum number of BSSIDs in the multiple BSSID set. When Indicator
  /// is set to n, 2n is the maximum number.
  ///
  UINT8                              Indicator;
  ///
  /// Contains zero or more sub-elements.
  ///
  EFI_80211_SUBELEMENT_INFO          SubElement[1];
} EFI_80211_MULTIPLE_BSSID;

///
/// EFI_80211_BSS_DESP_PILOT
///
typedef struct {
  ///
  /// Indicates a specific BSSID of the found BSS.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Specifies the type of the found BSS.
  ///
  EFI_80211_BSS_TYPE                 BSSType;
  ///
  /// One octet field to report condensed capability information.
  ///
  UINT8                              ConCapInfo;
  ///
  /// Two octet's field to report condensed country string.
  ///
  UINT8                              ConCountryStr[2];
  ///
  /// Indicates the operating class value for the operating channel.
  ///
  UINT8                              OperatingClass;
  ///
  /// Indicates the operating channel.
  ///
  UINT8                              Channel;
  ///
  /// Indicates the measurement pilot interval in TU.
  ///
  UINT8                              Interval;
  ///
  /// Indicates that the BSS is within a multiple BSSID set.
  ///
  EFI_80211_MULTIPLE_BSSID           *MultipleBSSID;
  ///
  /// Specifies the RCPI of the received frame.
  ///
  UINT8                              RCPIMeasurement;
  ///
  /// Specifies the RSNI of the received frame.
  ///
  UINT8                              RSNIMeasurement;
} EFI_80211_BSS_DESP_PILOT;

///
/// EFI_80211_SCAN_RESULT
///
typedef struct {
  ///
  /// The number of EFI_80211_BSS_DESCRIPTION in BSSDespSet. If zero, BSSDespSet should
  /// be ignored.
  ///
  UINTN                              NumOfBSSDesp;
  ///
  /// Points to zero or more instances of EFI_80211_BSS_DESCRIPTION.
  ///
  EFI_80211_BSS_DESCRIPTION          **BSSDespSet;
  ///
  /// The number of EFI_80211_BSS_DESP_PILOT in BSSDespFromPilotSet. If zero,
  /// BSSDespFromPilotSet should be ignored.
  ///
  UINTN                              NumofBSSDespFromPilot;
  ///
  /// Points to zero or more instances of EFI_80211_BSS_DESP_PILOT.
  ///
  EFI_80211_BSS_DESP_PILOT           **BSSDespFromPilotSet;
  ///
  /// Specifies zero or more elements. This is an optional parameter and may be NULL.
  ///
  UINT8                              *VendorSpecificInfo;
} EFI_80211_SCAN_RESULT;

///
/// EFI_80211_SCAN_DATA_TOKEN
///
typedef struct {
  ///
  /// This Event will be signaled after the Status field is updated by the EFI Wireless
  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.
  ///
  EFI_EVENT                          Event;
  ///
  /// Will be set to one of the following values:
  ///   EFI_SUCCESS:       Scan operation completed successfully.
  ///   EFI_NOT_FOUND:     Failed to find available BSS.
  ///   EFI_DEVICE_ERROR:  An unexpected network or system error occurred.
  ///   EFI_ACCESS_DENIED: The scan operation is not completed due to some underlying
  ///                      hardware or software state.
  ///   EFI_NOT_READY:     The scan operation is started but not yet completed.
  EFI_STATUS                         Status;
  ///
  /// Pointer to the scan data.
  ///
  EFI_80211_SCAN_DATA                *Data;
  ///
  /// Indicates the scan state.
  ///
  EFI_80211_SCAN_RESULT_CODE         ResultCode;
  ///
  /// Indicates the scan result. It is caller's responsibility to free this buffer.
  ///
  EFI_80211_SCAN_RESULT              *Result;
} EFI_80211_SCAN_DATA_TOKEN;

///
/// EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE
///
typedef struct {
  ///
  /// The first channel number in a subband of supported channels.
  ///
  UINT8                              FirstChannelNumber;
  ///
  /// The number of channels in a subband of supported channels.
  ///
  UINT8                              NumberOfChannels;
} EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE;

///
/// EFI_80211_ELEMENT_SUPP_CHANNEL
///
typedef struct {
  ///
  /// Common header of an element.
  ///
  EFI_80211_ELEMENT_HEADER                Hdr;
  ///
  /// Indicates one or more tuples of (first channel, number of channels).
  ///
  EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE    Subband[1];
} EFI_80211_ELEMENT_SUPP_CHANNEL;

///
/// EFI_80211_ASSOCIATE_DATA
///
typedef struct {
  ///
  /// Specifies the address of the peer MAC entity to associate with.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Specifies the requested operational capabilities to the AP in 2 octets.
  ///
  UINT16                             CapabilityInfo;
  ///
  /// Specifies a time limit in TU, after which the associate procedure is terminated.
  ///
  UINT32                             FailureTimeout;
  ///
  /// Specifies if in power save mode, how often the STA awakes and listens for the next
  /// beacon frame in TU.
  ///
  UINT32                             ListenInterval;
  ///
  /// Indicates a list of channels in which the STA is capable of operating.
  ///
  EFI_80211_ELEMENT_SUPP_CHANNEL     *Channels;
  ///
  /// The cipher suites and AKM suites selected by the STA.
  ///
  EFI_80211_ELEMENT_RSN              RSN;
  ///
  /// Specifies the parameters within the Extended Capabilities element that are
  /// supported by the MAC entity.  This is an optional parameter and may be NULL.
  ///
  EFI_80211_ELEMENT_EXT_CAP          *ExtCapElement;
  ///
  /// Specifies zero or more elements. This is an optional parameter and may be NULL.
  ///
  UINT8                              *VendorSpecificInfo;
} EFI_80211_ASSOCIATE_DATA;

///
/// EFI_80211_ELEMENT_TIMEOUT_VAL
///
typedef struct {
  ///
  /// Common header of an element.
  ///
  EFI_80211_ELEMENT_HEADER           Hdr;
  ///
  /// Specifies the timeout interval type.
  ///
  UINT8                              Type;
  ///
  /// Specifies the timeout interval value.
  ///
  UINT32                             Value;
} EFI_80211_ELEMENT_TIMEOUT_VAL;

///
/// EFI_80211_ASSOCIATE_RESULT
///
typedef struct {
  ///
  /// Specifies the address of the peer MAC entity from which the association request
  /// was received.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Specifies the operational capabilities advertised by the AP.
  ///
  UINT16                             CapabilityInfo;
  ///
  /// Specifies the association ID value assigned by the AP.
  ///
  UINT16                             AssociationID;
  ///
  /// Indicates the measured RCPI of the corresponding association request frame. It is
  /// an optional parameter and is set to zero if unavailable.
  ///
  UINT8                              RCPIValue;
  ///
  /// Indicates the measured RSNI at the time the corresponding association request
  /// frame was received. It is an optional parameter and is set to zero if unavailable.
  ///
  UINT8                              RSNIValue;
  ///
  /// Specifies the parameters within the Extended Capabilities element that are
  /// supported by the MAC entity.  This is an optional parameter and may be NULL.
  ///
  EFI_80211_ELEMENT_EXT_CAP          *ExtCapElement;
  ///
  /// Specifies the timeout interval when the result code is AssociateRefusedTemporarily.
  ///
  EFI_80211_ELEMENT_TIMEOUT_VAL      TimeoutInterval;
  ///
  /// Specifies zero or more elements. This is an optional parameter and may be NULL.
  ///
  UINT8                              *VendorSpecificInfo;
} EFI_80211_ASSOCIATE_RESULT;

///
/// EFI_80211_ASSOCIATE_DATA_TOKEN
///
typedef struct {
  ///
  /// This Event will be signaled after the Status field is updated by the EFI Wireless
  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.
  ///
  EFI_EVENT                          Event;
  ///
  /// Will be set to one of the following values:
  ///   EFI_SUCCESS:      Association operation completed successfully.
  ///   EFI_DEVICE_ERROR: An unexpected network or system error occurred.
  ///
  EFI_STATUS                         Status;
  ///
  /// Pointer to the association data.
  ///
  EFI_80211_ASSOCIATE_DATA           *Data;
  ///
  /// Indicates the association state.
  ///
  EFI_80211_ASSOCIATE_RESULT_CODE    ResultCode;
  ///
  /// Indicates the association result. It is caller's responsibility to free this
  /// buffer.
  ///
  EFI_80211_ASSOCIATE_RESULT         *Result;
} EFI_80211_ASSOCIATE_DATA_TOKEN;

///
/// EFI_80211_DISASSOCIATE_DATA
///
typedef struct {
  ///
  /// Specifies the address of the peer MAC entity with which to perform the
  /// disassociation process.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Specifies the reason for initiating the disassociation process.
  ///
  EFI_80211_REASON_CODE              ReasonCode;
  ///
  /// Zero or more elements, may be NULL.
  ///
  UINT8                              *VendorSpecificInfo;
} EFI_80211_DISASSOCIATE_DATA;

///
/// EFI_80211_DISASSOCIATE_DATA_TOKEN
///
typedef struct {
  ///
  /// This Event will be signaled after the Status field is updated by the EFI Wireless
  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.
  ///
  EFI_EVENT                          Event;
  ///
  /// Will be set to one of the following values:
  ///   EFI_SUCCESS:       Disassociation operation completed successfully.
  ///   EFI_DEVICE_ERROR:  An unexpected network or system error occurred.
  ///   EFI_ACCESS_DENIED: The disassociation operation is not completed due to some
  ///                      underlying hardware or software state.
  ///   EFI_NOT_READY:     The disassociation operation is started but not yet completed.
  ///
  EFI_STATUS                         Status;
  ///
  /// Pointer to the disassociation data.
  ///
  EFI_80211_DISASSOCIATE_DATA        *Data;
  ///
  /// Indicates the disassociation state.
  ///
  EFI_80211_DISASSOCIATE_RESULT_CODE ResultCode;
} EFI_80211_DISASSOCIATE_DATA_TOKEN;

///
/// EFI_80211_AUTHENTICATION_DATA
///
typedef struct {
  ///
  /// Specifies the address of the peer MAC entity with which to perform the
  /// authentication process.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Specifies the type of authentication algorithm to use during the authentication
  /// process.
  ///
  EFI_80211_AUTHENTICATION_TYPE      AuthType;
  ///
  /// Specifies a time limit in TU after which the authentication procedure is
  /// terminated.
  ///
  UINT32                             FailureTimeout;
  ///
  /// Specifies the set of elements to be included in the first message of the FT
  /// authentication sequence, may be NULL.
  ///
  UINT8                              *FTContent;
  ///
  /// Specifies the set of elements to be included in the SAE Commit Message or SAE
  /// Confirm Message, may be NULL.
  ///
  UINT8                              *SAEContent;
  ///
  /// Zero or more elements, may be NULL.
  ///
  UINT8                              *VendorSpecificInfo;
} EFI_80211_AUTHENTICATE_DATA;

///
/// EFI_80211_AUTHENTICATION_RESULT
///
typedef struct {
  ///
  /// Specifies the address of the peer MAC entity from which the authentication request
  /// was received.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Specifies the set of elements to be included in the second message of the FT
  /// authentication sequence, may be NULL.
  ///
  UINT8                              *FTContent;
  ///
  /// Specifies the set of elements to be included in the SAE Commit Message or SAE
  /// Confirm Message, may be NULL.
  ///
  UINT8                              *SAEContent;
  ///
  /// Zero or more elements, may be NULL.
  ///
  UINT8                              *VendorSpecificInfo;
} EFI_80211_AUTHENTICATE_RESULT;

///
/// EFI_80211_AUTHENTICATE_DATA_TOKEN
///
typedef struct {
  ///
  /// This Event will be signaled after the Status field is updated by the EFI Wireless
  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.
  ///
  EFI_EVENT                          Event;
  ///
  /// Will be set to one of the following values:
  ///   EFI_SUCCESS: Authentication operation completed successfully.
  ///   EFI_PROTOCOL_ERROR: Peer MAC entity rejects the authentication.
  ///   EFI_NO_RESPONSE:    Peer MAC entity does not response the authentication request.
  ///   EFI_DEVICE_ERROR:   An unexpected network or system error occurred.
  ///   EFI_ACCESS_DENIED:  The authentication operation is not completed due to some
  ///                       underlying hardware or software state.
  ///   EFI_NOT_READY:      The authentication operation is started but not yet completed.
  ///
  EFI_STATUS                         Status;
  ///
  /// Pointer to the authentication data.
  ///
  EFI_80211_AUTHENTICATE_DATA        *Data;
  ///
  /// Indicates the association state.
  ///
  EFI_80211_AUTHENTICATE_RESULT_CODE ResultCode;
  ///
  /// Indicates the association result. It is caller's responsibility to free this
  /// buffer.
  ///
  EFI_80211_AUTHENTICATE_RESULT      *Result;
} EFI_80211_AUTHENTICATE_DATA_TOKEN;

///
/// EFI_80211_DEAUTHENTICATE_DATA
///
typedef struct {
  ///
  /// Specifies the address of the peer MAC entity with which to perform the
  /// deauthentication process.
  ///
  EFI_80211_MAC_ADDRESS              BSSId;
  ///
  /// Specifies the reason for initiating the deauthentication process.
  ///
  EFI_80211_REASON_CODE              ReasonCode;
  ///
  /// Zero or more elements, may be NULL.
  ///
  UINT8                              *VendorSpecificInfo;
} EFI_80211_DEAUTHENTICATE_DATA;

///
/// EFI_80211_DEAUTHENTICATE_DATA_TOKEN
///
typedef struct {
  ///
  /// This Event will be signaled after the Status field is updated by the EFI Wireless
  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.
  ///
  EFI_EVENT                          Event;
  ///
  /// Will be set to one of the following values:
  ///   EFI_SUCCESS:       Deauthentication operation completed successfully.
  ///   EFI_DEVICE_ERROR:  An unexpected network or system error occurred.
  ///   EFI_ACCESS_DENIED: The deauthentication operation is not completed due to some
  ///                      underlying hardware or software state.
  ///   EFI_NOT_READY:     The deauthentication operation is started but not yet
  ///                      completed.
  ///
  EFI_STATUS                         Status;
  ///
  /// Pointer to the deauthentication data.
  ///
  EFI_80211_DEAUTHENTICATE_DATA      *Data;
} EFI_80211_DEAUTHENTICATE_DATA_TOKEN;

/**
  Request a survey of potential BSSs that administrator can later elect to try to join.

  The Scan() function returns the description of the set of BSSs detected by the scan
  process. Passive scan operation is performed by default.

  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL
                                  instance.
  @param[in]  Data                Pointer to the scan token.

  @retval EFI_SUCCESS             The operation completed successfully.
  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:
                                  This is NULL.
                                  Data is NULL.
                                  Data->Data is NULL.
  @retval EFI_UNSUPPORTED         One or more of the input parameters are not supported
                                  by this implementation.
  @retval EFI_ALREADY_STARTED     The scan operation is already started.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_SCAN)(
  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,
  IN EFI_80211_SCAN_DATA_TOKEN                   *Data
  );

/**
  Request an association with a specified peer MAC entity that is within an AP.

  The Associate() function provides the capability for MAC layer to become associated
  with an AP.

  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL
                                  instance.
  @param[in]  Data                Pointer to the association token.

  @retval EFI_SUCCESS             The operation completed successfully.
  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:
                                  This is NULL.
                                  Data is NULL.
                                  Data->Data is NULL.
  @retval EFI_UNSUPPORTED         One or more of the input parameters are not supported
                                  by this implementation.
  @retval EFI_ALREADY_STARTED     The association process is already started.
  @retval EFI_NOT_READY           Authentication is not performed before this association
                                  process.
  @retval EFI_NOT_FOUND           The specified peer MAC entity is not found.
  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_ASSOCIATE)(
  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,
  IN EFI_80211_ASSOCIATE_DATA_TOKEN              *Data
  );

/**
  Request a disassociation with a specified peer MAC entity.

  The Disassociate() function is invoked to terminate an existing association.
  Disassociation is a notification and cannot be refused by the receiving peer except
  when management frame protection is negotiated and the message integrity check fails.

  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL
                                  instance.
  @param[in]  Data                Pointer to the disassociation token.

  @retval EFI_SUCCESS             The operation completed successfully.
  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:
                                  This is NULL.
                                  Data is NULL.
  @retval EFI_ALREADY_STARTED     The disassociation process is already started.
  @retval EFI_NOT_READY           The disassociation service is invoked to a
                                  nonexistent association relationship.
  @retval EFI_NOT_FOUND           The specified peer MAC entity is not found.
  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_DISASSOCIATE)(
  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,
  IN EFI_80211_DISASSOCIATE_DATA_TOKEN           *Data
  );

/**
  Request the process of establishing an authentication relationship with a peer MAC
  entity.

  The Authenticate() function requests authentication with a specified peer MAC entity.
  This service might be time-consuming thus is designed to be invoked independently of
  the association service.

  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL
                                  instance.
  @param[in]  Data                Pointer to the authentication token.

  @retval EFI_SUCCESS             The operation completed successfully.
  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:
                                  This is NULL.
                                  Data is NULL.
                                  Data.Data is NULL.
  @retval EFI_UNSUPPORTED         One or more of the input parameters are not supported
                                  by this implementation.
  @retval EFI_ALREADY_STARTED     The authentication process is already started.
  @retval EFI_NOT_FOUND           The specified peer MAC entity is not found.
  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_AUTHENTICATE)(
  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,
  IN EFI_80211_AUTHENTICATE_DATA_TOKEN           *Data
  );

/**
  Invalidate the authentication relationship with a peer MAC entity.

  The Deauthenticate() function requests that the authentication relationship with a
  specified peer MAC entity be invalidated. Deauthentication is a notification and when
  it is sent out the association at the transmitting station is terminated.

  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL
                                  instance.
  @param[in]  Data                Pointer to the deauthentication token.

  @retval EFI_SUCCESS             The operation completed successfully.
  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:
                                  This is NULL.
                                  Data is NULL.
                                  Data.Data is NULL.
  @retval EFI_ALREADY_STARTED     The deauthentication process is already started.
  @retval EFI_NOT_READY           The deauthentication service is invoked to a
                                  nonexistent association or authentication relationship.
  @retval EFI_NOT_FOUND           The specified peer MAC entity is not found.
  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_DEAUTHENTICATE)(
  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,
  IN EFI_80211_DEAUTHENTICATE_DATA_TOKEN         *Data
  );

///
/// The EFI_WIRELESS_MAC_CONNECTION_PROTOCOL is designed to provide management service
/// interfaces for the EFI wireless network stack to establish wireless connection with
/// AP. An EFI Wireless MAC Connection Protocol instance will be installed on each
/// communication device that the EFI wireless network stack runs on.
///
struct _EFI_WIRELESS_MAC_CONNECTION_PROTOCOL {
  EFI_WIRELESS_MAC_CONNECTION_SCAN               Scan;
  EFI_WIRELESS_MAC_CONNECTION_ASSOCIATE          Associate;
  EFI_WIRELESS_MAC_CONNECTION_DISASSOCIATE       Disassociate;
  EFI_WIRELESS_MAC_CONNECTION_AUTHENTICATE       Authenticate;
  EFI_WIRELESS_MAC_CONNECTION_DEAUTHENTICATE     Deauthenticate;
};

extern EFI_GUID gEfiWiFiProtocolGuid;

#endif