]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add EFI Wireless MAC Connection Protocol definitions
authorHao Wu <hao.a.wu@intel.com>
Wed, 20 May 2015 05:20:15 +0000 (05:20 +0000)
committerhwu1225 <hwu1225@Edk2>
Wed, 20 May 2015 05:20:15 +0000 (05:20 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17475 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Protocol/WiFi.h [new file with mode: 0644]
MdePkg/MdePkg.dec

diff --git a/MdePkg/Include/Protocol/WiFi.h b/MdePkg/Include/Protocol/WiFi.h
new file mode 100644 (file)
index 0000000..8e9fb38
--- /dev/null
@@ -0,0 +1,1144 @@
+/** @file\r
+  This file provides management service interfaces of 802.11 MAC layer. It is used by\r
+  network applications (and drivers) to establish wireless connection with an access\r
+  point (AP).\r
+\r
+  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution. The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+  @par Revision Reference:\r
+  This Protocol is introduced in UEFI Specification 2.5\r
+\r
+**/\r
+\r
+#ifndef __EFI_WIFI_PROTOCOL_H__\r
+#define __EFI_WIFI_PROTOCOL_H__\r
+\r
+#define EFI_WIRELESS_MAC_CONNECTION_PROTOCOL_GUID \\r
+  { \\r
+    0xda55bc9, 0x45f8, 0x4bb4, {0x87, 0x19, 0x52, 0x24, 0xf1, 0x8a, 0x4d, 0x45 } \\r
+  }\r
+\r
+typedef struct _EFI_WIRELESS_MAC_CONNECTION_PROTOCOL EFI_WIRELESS_MAC_CONNECTION_PROTOCOL;\r
+\r
+///\r
+/// EFI_80211_BSS_TYPE\r
+///\r
+typedef enum {\r
+  IeeeInfrastructureBSS,\r
+  IeeeIndependentBSS,\r
+  IeeeMeshBSS,\r
+  IeeeAnyBss\r
+} EFI_80211_BSS_TYPE;\r
+\r
+///\r
+/// EFI_80211_ACC_NET_TYPE\r
+///\r
+typedef enum {\r
+  IeeePrivate           = 0,\r
+  IeeePrivatewithGuest  = 1,\r
+  IeeeChargeablePublic  = 2,\r
+  IeeeFreePublic        = 3,\r
+  IeeePersonal          = 4,\r
+  IeeeEmergencyServOnly = 5,\r
+  IeeeTestOrExp         = 14,\r
+  IeeeWildcard          = 15\r
+} EFI_80211_ACC_NET_TYPE;\r
+\r
+///\r
+/// EFI_80211_ASSOCIATE_RESULT_CODE\r
+///\r
+typedef enum {\r
+  AssociateSuccess,\r
+  AssociateRefusedReasonUnspecified,\r
+  AssociateRefusedCapsMismatch,\r
+  AssociateRefusedExtReason,\r
+  AssociateRefusedAPOutOfMemory,\r
+  AssociateRefusedBasicRatesMismatch,\r
+  AssociateRejectedEmergencyServicesNotSupported,\r
+  AssociateRefusedTemporarily\r
+} EFI_80211_ASSOCIATE_RESULT_CODE;\r
+\r
+///\r
+/// EFI_80211_SCAN_RESULT_CODE\r
+///\r
+typedef enum {\r
+  ///\r
+  /// The scan operation finished successfully.\r
+  ///\r
+  ScanSuccess,\r
+  ///\r
+  /// The scan operation is not supported in current implementation.\r
+  ///\r
+  ScanNotSupported\r
+} EFI_80211_SCAN_RESULT_CODE;\r
+\r
+///\r
+/// EFI_80211_REASON_CODE\r
+///\r
+typedef enum {\r
+  Ieee80211UnspecifiedReason           = 1,\r
+  Ieee80211PreviousAuthenticateInvalid = 2,\r
+  Ieee80211DeauthenticatedSinceLeaving = 3,\r
+  Ieee80211DisassociatedDueToInactive  = 4,\r
+  Ieee80211DisassociatedSinceApUnable  = 5,\r
+  Ieee80211Class2FrameNonauthenticated = 6,\r
+  Ieee80211Class3FrameNonassociated    = 7,\r
+  Ieee80211DisassociatedSinceLeaving   = 8,\r
+  // ...\r
+} EFI_80211_REASON_CODE;\r
+\r
+///\r
+/// EFI_80211_DISASSOCIATE_RESULT_CODE\r
+///\r
+typedef enum {\r
+  ///\r
+  /// Disassociation process completed successfully.\r
+  ///\r
+  DisassociateSuccess,\r
+  ///\r
+  /// Disassociation failed due to any input parameter is invalid.\r
+  ///\r
+  DisassociateInvalidParameters\r
+} EFI_80211_DISASSOCIATE_RESULT_CODE;\r
+\r
+///\r
+/// EFI_80211_AUTHENTICATION_TYPE\r
+///\r
+typedef enum {\r
+  ///\r
+  /// Open system authentication, admits any STA to the DS.\r
+  ///\r
+  OpenSystem,\r
+  ///\r
+  /// Shared Key authentication relies on WEP to demonstrate knowledge of a WEP\r
+  /// encryption key.\r
+  ///\r
+  SharedKey,\r
+  ///\r
+  /// FT authentication relies on keys derived during the initial mobility domain\r
+  /// association to authenticate the stations.\r
+  ///\r
+  FastBSSTransition,\r
+  ///\r
+  /// SAE authentication uses finite field cryptography to prove knowledge of a shared\r
+  /// password.\r
+  ///\r
+  SAE\r
+} EFI_80211_AUTHENTICATION_TYPE;\r
+\r
+///\r
+/// EFI_80211_AUTHENTICATION_RESULT_CODE\r
+///\r
+typedef enum {\r
+  AuthenticateSuccess,\r
+  AuthenticateRefused,\r
+  AuthenticateAnticLoggingTokenRequired,\r
+  AuthenticateFiniteCyclicGroupNotSupported,\r
+  AuthenticationRejected,\r
+  AuthenticateInvalidParameter\r
+} EFI_80211_AUTHENTICATE_RESULT_CODE;\r
+\r
+///\r
+/// EFI_80211_MAC_ADDRESS\r
+///\r
+typedef struct {\r
+  UINT8                              Addr[6];\r
+} EFI_80211_MAC_ADDRESS;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_HEADER\r
+///\r
+typedef struct {\r
+  ///\r
+  /// A unique element ID defined in IEEE 802.11 specification.\r
+  ///\r
+  UINT8                              ElementID;\r
+  ///\r
+  /// Specifies the number of octets in the element body.\r
+  ///\r
+  UINT8                              Length;\r
+} EFI_80211_ELEMENT_HEADER;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_REQ\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Common header of an element.\r
+  ///\r
+  EFI_80211_ELEMENT_HEADER           Hdr;\r
+  ///\r
+  /// Start of elements that are requested to be included in the Probe Response frame.\r
+  /// The elements are listed in order of increasing element ID.\r
+  ///\r
+  UINT8                              RequestIDs[1];\r
+} EFI_80211_ELEMENT_REQ;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_SSID\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Common header of an element.\r
+  ///\r
+  EFI_80211_ELEMENT_HEADER           Hdr;\r
+  ///\r
+  /// Service set identifier. If Hdr.Length is zero, this field is ignored.\r
+  ///\r
+  UINT8                              SSId[32];\r
+} EFI_80211_ELEMENT_SSID;\r
+\r
+///\r
+/// EFI_80211_SCAN_DATA\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Determines whether infrastructure BSS, IBSS, MBSS, or all, are included in the\r
+  /// scan.\r
+  ///\r
+  EFI_80211_BSS_TYPE                 BSSType;\r
+  ///\r
+  /// Indicates a specific or wildcard BSSID. Use all binary 1s to represent all SSIDs.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Length in bytes of the SSId. If zero, ignore SSId field.\r
+  ///\r
+  UINT8                              SSIdLen;\r
+  ///\r
+  /// Specifies the desired SSID or the wildcard SSID. Use NULL to represent all SSIDs.\r
+  ///\r
+  UINT8                              *SSId;\r
+  ///\r
+  /// Indicates passive scanning if TRUE.\r
+  ///\r
+  BOOLEAN                            PassiveMode;\r
+  ///\r
+  /// The delay in microseconds to be used prior to transmitting a Probe frame during\r
+  /// active scanning. If zero, the value can be overridden by an\r
+  /// implementation-dependent default value.\r
+  ///\r
+  UINT32                             ProbeDelay;\r
+  ///\r
+  /// Specifies a list of channels that are examined when scanning for a BSS. If set to\r
+  /// NULL, all valid channels will be scanned.\r
+  ///\r
+  UINT32                             *ChannelList;\r
+  ///\r
+  /// Indicates the minimum time in TU to spend on each channel when scanning. If zero,\r
+  /// the value can be overridden by an implementation-dependent default value.\r
+  ///\r
+  UINT32                             MinChannelTime;\r
+  ///\r
+  /// Indicates the maximum time in TU to spend on each channel when scanning. If zero,\r
+  /// the value can be overridden by an implementation-dependent default value.\r
+  ///\r
+  UINT32                             MaxChannelTime;\r
+  ///\r
+  /// Points to an optionally present element. This is an optional parameter and may be\r
+  /// NULL.\r
+  ///\r
+  EFI_80211_ELEMENT_REQ              *RequestInformation;\r
+  ///\r
+  /// Indicates one or more SSID elements that are optionally present. This is an\r
+  /// optional parameter and may be NULL.\r
+  ///\r
+  EFI_80211_ELEMENT_SSID             *SSIDList;\r
+  ///\r
+  /// Specifies a desired specific access network type or the wildcard access network\r
+  /// type. Use 15 as wildcard access network type.\r
+  ///\r
+  EFI_80211_ACC_NET_TYPE             AccessNetworkType;\r
+  ///\r
+  ///  Specifies zero or more elements. This is an optional parameter and may be NULL.\r
+  ///\r
+  UINT8                              *VendorSpecificInfo;\r
+} EFI_80211_SCAN_DATA;\r
+\r
+///\r
+/// EFI_80211_COUNTRY_TRIPLET_SUBBAND\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Indicates the lowest channel number in the subband. It has a positive integer\r
+  /// value less than 201.\r
+  ///\r
+  UINT8                              FirstChannelNum;\r
+  ///\r
+  /// Indicates the number of channels in the subband.\r
+  ///\r
+  UINT8                              NumOfChannels;\r
+  ///\r
+  /// Indicates the maximum power in dBm allowed to be transmitted.\r
+  ///\r
+  UINT8                              MaxTxPowerLevel;\r
+} EFI_80211_COUNTRY_TRIPLET_SUBBAND;\r
+\r
+///\r
+/// EFI_80211_COUNTRY_TRIPLET_OPERATE\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Indicates the operating extension identifier. It has a positive integer value of\r
+  /// 201 or greater.\r
+  ///\r
+  UINT8                              OperatingExtId;\r
+  ///\r
+  /// Index into a set of values for radio equipment set of rules.\r
+  ///\r
+  UINT8                              OperatingClass;\r
+  ///\r
+  /// Specifies aAirPropagationTime characteristics used in BSS operation. Refer the\r
+  /// definition of aAirPropagationTime in IEEE 802.11 specification.\r
+  ///\r
+  UINT8                              CoverageClass;\r
+} EFI_80211_COUNTRY_TRIPLET_OPERATE;\r
+\r
+///\r
+/// EFI_80211_COUNTRY_TRIPLET\r
+///\r
+typedef union {\r
+  ///\r
+  /// The subband triplet.\r
+  ///\r
+  EFI_80211_COUNTRY_TRIPLET_SUBBAND  Subband;\r
+  ///\r
+  /// The operating triplet.\r
+  ///\r
+  EFI_80211_COUNTRY_TRIPLET_OPERATE  Operating;\r
+} EFI_80211_COUNTRY_TRIPLET;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_COUNTRY\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Common header of an element.\r
+  ///\r
+  EFI_80211_ELEMENT_HEADER           Hdr;\r
+  ///\r
+  /// Specifies country strings in 3 octets.\r
+  ///\r
+  UINT8                              CountryStr[3];\r
+  ///\r
+  /// Indicates a triplet that repeated in country element. The number of triplets is\r
+  /// determined by the Hdr.Length field.\r
+  ///\r
+  EFI_80211_COUNTRY_TRIPLET          CountryTriplet[1];\r
+} EFI_80211_ELEMENT_COUNTRY;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_DATA_RSN\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Indicates the version number of the RSNA protocol. Value 1 is defined in current\r
+  /// IEEE 802.11 specification.\r
+  ///\r
+  UINT16                             Version;\r
+  ///\r
+  /// Specifies the cipher suite selector used by the BSS to protect group address frames.\r
+  ///\r
+  UINT32                             GroupDataCipherSuite;\r
+  ///\r
+  /// Indicates the number of pairwise cipher suite selectors that are contained in\r
+  /// PairwiseCipherSuiteList.\r
+  ///\r
+//UINT16                             PairwiseCipherSuiteCount;\r
+  ///\r
+  /// Contains a series of cipher suite selectors that indicate the pairwise cipher\r
+  /// suites contained in this element.\r
+  ///\r
+//UINT32                             PairwiseCipherSuiteList[PairwiseCipherSuiteCount];\r
+  ///\r
+  /// Indicates the number of AKM suite selectors that are contained in AKMSuiteList.\r
+  ///\r
+//UINT16                             AKMSuiteCount;\r
+  ///\r
+  /// Contains a series of AKM suite selectors that indicate the AKM suites contained in\r
+  /// this element.\r
+  ///\r
+//UINT32                             AKMSuiteList[AKMSuiteCount];\r
+  ///\r
+  /// Indicates requested or advertised capabilities.\r
+  ///\r
+//UINT16                             RSNCapabilities;\r
+  ///\r
+  /// Indicates the number of PKMIDs in the PMKIDList.\r
+  ///\r
+//UINT16                             PMKIDCount;\r
+  ///\r
+  /// Contains zero or more PKMIDs that the STA believes to be valid for the destination\r
+  /// AP.\r
+//UINT8                              PMKIDList[PMKIDCount][16];\r
+  ///\r
+  /// Specifies the cipher suite selector used by the BSS to protect group addressed\r
+  /// robust management frames.\r
+  ///\r
+//UINT32                             GroupManagementCipherSuite;\r
+} EFI_80211_ELEMENT_DATA_RSN;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_RSN\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Common header of an element.\r
+  ///\r
+  EFI_80211_ELEMENT_HEADER           Hdr;\r
+  ///\r
+  /// Points to RSN element. The size of a RSN element is limited to 255 octets.\r
+  ///\r
+  EFI_80211_ELEMENT_DATA_RSN         *Data;\r
+} EFI_80211_ELEMENT_RSN;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_EXT_CAP\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Common header of an element.\r
+  ///\r
+  EFI_80211_ELEMENT_HEADER           Hdr;\r
+  ///\r
+  /// Indicates the capabilities being advertised by the STA transmitting the element.\r
+  /// This is a bit field with variable length. Refer to IEEE 802.11 specification for\r
+  /// bit value.\r
+  ///\r
+  UINT8                              Capabilities[1];\r
+} EFI_80211_ELEMENT_EXT_CAP;\r
+\r
+///\r
+/// EFI_80211_BSS_DESCRIPTION\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Indicates a specific BSSID of the found BSS.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Specifies the SSID of the found BSS. If NULL, ignore SSIdLen field.\r
+  ///\r
+  UINT8                              *SSId;\r
+  ///\r
+  /// Specifies the SSID of the found BSS. If NULL, ignore SSIdLen field.\r
+  ///\r
+  UINT8                              SSIdLen;\r
+  ///\r
+  /// Specifies the type of the found BSS.\r
+  ///\r
+  EFI_80211_BSS_TYPE                 BSSType;\r
+  ///\r
+  /// The beacon period in TU of the found BSS.\r
+  ///\r
+  UINT16                             BeaconPeriod;\r
+  ///\r
+  /// The timestamp of the received frame from the found BSS.\r
+  ///\r
+  UINT64                             Timestamp;\r
+  ///\r
+  /// The advertised capabilities of the BSS.\r
+  ///\r
+  UINT16                             CapabilityInfo;\r
+  ///\r
+  /// The set of data rates that shall be supported by all STAs that desire to join this\r
+  /// BSS.\r
+  ///\r
+  UINT8                              *BSSBasicRateSet;\r
+  ///\r
+  /// The set of data rates that the peer STA desires to use for communication within\r
+  /// the BSS.\r
+  ///\r
+  UINT8                              *OperationalRateSet;\r
+  ///\r
+  /// The information required to identify the regulatory domain in which the peer STA\r
+  /// is located.\r
+  ///\r
+  EFI_80211_ELEMENT_COUNTRY          *Country;\r
+  ///\r
+  /// The cipher suites and AKM suites supported in the BSS.\r
+  ///\r
+  EFI_80211_ELEMENT_RSN              RSN;\r
+  ///\r
+  /// Specifies the RSSI of the received frame.\r
+  ///\r
+  UINT8                              RSSI;\r
+  ///\r
+  /// Specifies the RCPI of the received frame.\r
+  ///\r
+  UINT8                              RCPIMeasurement;\r
+  ///\r
+  /// Specifies the RSNI of the received frame.\r
+  ///\r
+  UINT8                              RSNIMeasurement;\r
+  ///\r
+  /// Specifies the elements requested by the request element of the Probe Request frame.\r
+  /// This is an optional parameter and may be NULL.\r
+  ///\r
+  UINT8                              *RequestedElements;\r
+  ///\r
+  /// Specifies the BSS membership selectors that represent the set of features that\r
+  /// shall be supported by all STAs to join this BSS.\r
+  ///\r
+  UINT8                              *BSSMembershipSelectorSet;\r
+  ///\r
+  /// Specifies the parameters within the Extended Capabilities element that are\r
+  /// supported by the MAC entity. This is an optional parameter and may be NULL.\r
+  ///\r
+  EFI_80211_ELEMENT_EXT_CAP          *ExtCapElement;\r
+} EFI_80211_BSS_DESCRIPTION;\r
+\r
+///\r
+/// EFI_80211_SUBELEMENT_INFO\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Indicates the unique identifier within the containing element or sub-element.\r
+  ///\r
+  UINT8                              SubElementID;\r
+  ///\r
+  /// Specifies the number of octets in the Data field.\r
+  ///\r
+  UINT8                              Length;\r
+  ///\r
+  /// A variable length data buffer.\r
+  ///\r
+  UINT8                              Data[1];\r
+} EFI_80211_SUBELEMENT_INFO;\r
+\r
+///\r
+/// EFI_80211_MULTIPLE_BSSID\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Common header of an element.\r
+  ///\r
+  EFI_80211_ELEMENT_HEADER           Hdr;\r
+  ///\r
+  /// Indicates the maximum number of BSSIDs in the multiple BSSID set. When Indicator\r
+  /// is set to n, 2n is the maximum number.\r
+  ///\r
+  UINT8                              Indicator;\r
+  ///\r
+  /// Contains zero or more sub-elements.\r
+  ///\r
+  EFI_80211_SUBELEMENT_INFO          SubElement[1];\r
+} EFI_80211_MULTIPLE_BSSID;\r
+\r
+///\r
+/// EFI_80211_BSS_DESP_PILOT\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Indicates a specific BSSID of the found BSS.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Specifies the type of the found BSS.\r
+  ///\r
+  EFI_80211_BSS_TYPE                 BSSType;\r
+  ///\r
+  /// One octet field to report condensed capability information.\r
+  ///\r
+  UINT8                              ConCapInfo;\r
+  ///\r
+  /// Two octet's field to report condensed country string.\r
+  ///\r
+  UINT8                              ConCountryStr[2];\r
+  ///\r
+  /// Indicates the operating class value for the operating channel.\r
+  ///\r
+  UINT8                              OperatingClass;\r
+  ///\r
+  /// Indicates the operating channel.\r
+  ///\r
+  UINT8                              Channel;\r
+  ///\r
+  /// Indicates the measurement pilot interval in TU.\r
+  ///\r
+  UINT8                              Interval;\r
+  ///\r
+  /// Indicates that the BSS is within a multiple BSSID set.\r
+  ///\r
+  EFI_80211_MULTIPLE_BSSID           *MultipleBSSID;\r
+  ///\r
+  /// Specifies the RCPI of the received frame.\r
+  ///\r
+  UINT8                              RCPIMeasurement;\r
+  ///\r
+  /// Specifies the RSNI of the received frame.\r
+  ///\r
+  UINT8                              RSNIMeasurement;\r
+} EFI_80211_BSS_DESP_PILOT;\r
+\r
+///\r
+/// EFI_80211_SCAN_RESULT\r
+///\r
+typedef struct {\r
+  ///\r
+  /// The number of EFI_80211_BSS_DESCRIPTION in BSSDespSet. If zero, BSSDespSet should\r
+  /// be ignored.\r
+  ///\r
+  UINTN                              NumOfBSSDesp;\r
+  ///\r
+  /// Points to zero or more instances of EFI_80211_BSS_DESCRIPTION.\r
+  ///\r
+  EFI_80211_BSS_DESCRIPTION          **BSSDespSet;\r
+  ///\r
+  /// The number of EFI_80211_BSS_DESP_PILOT in BSSDespFromPilotSet. If zero,\r
+  /// BSSDespFromPilotSet should be ignored.\r
+  ///\r
+  UINTN                              NumofBSSDespFromPilot;\r
+  ///\r
+  /// Points to zero or more instances of EFI_80211_BSS_DESP_PILOT.\r
+  ///\r
+  EFI_80211_BSS_DESP_PILOT           **BSSDespFromPilotSet;\r
+  ///\r
+  /// Specifies zero or more elements. This is an optional parameter and may be NULL.\r
+  ///\r
+  UINT8                              *VendorSpecificInfo;\r
+} EFI_80211_SCAN_RESULT;\r
+\r
+///\r
+/// EFI_80211_SCAN_DATA_TOKEN\r
+///\r
+typedef struct {\r
+  ///\r
+  /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
+  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
+  ///\r
+  EFI_EVENT                          Event;\r
+  ///\r
+  /// Will be set to one of the following values:\r
+  ///   EFI_SUCCESS:       Scan operation completed successfully.\r
+  ///   EFI_NOT_FOUND:     Failed to find available BSS.\r
+  ///   EFI_DEVICE_ERROR:  An unexpected network or system error occurred.\r
+  ///   EFI_ACCESS_DENIED: The scan operation is not completed due to some underlying\r
+  ///                      hardware or software state.\r
+  ///   EFI_NOT_READY:     The scan operation is started but not yet completed.\r
+  EFI_STATUS                         Status;\r
+  ///\r
+  /// Pointer to the scan data.\r
+  ///\r
+  EFI_80211_SCAN_DATA                *Data;\r
+  ///\r
+  /// Indicates the scan state.\r
+  ///\r
+  EFI_80211_SCAN_RESULT_CODE         ResultCode;\r
+  ///\r
+  /// Indicates the scan result. It is caller's responsibility to free this buffer.\r
+  ///\r
+  EFI_80211_SCAN_RESULT              *Result;\r
+} EFI_80211_SCAN_DATA_TOKEN;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE\r
+///\r
+typedef struct {\r
+  ///\r
+  /// The first channel number in a subband of supported channels.\r
+  ///\r
+  UINT8                              FirstChannelNumber;\r
+  ///\r
+  /// The number of channels in a subband of supported channels.\r
+  ///\r
+  UINT8                              NumberOfChannels;\r
+} EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_SUPP_CHANNEL\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Common header of an element.\r
+  ///\r
+  EFI_80211_ELEMENT_HEADER                Hdr;\r
+  ///\r
+  /// Indicates one or more tuples of (first channel, number of channels).\r
+  ///\r
+  EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE    Subband[1];\r
+} EFI_80211_ELEMENT_SUPP_CHANNEL;\r
+\r
+///\r
+/// EFI_80211_ASSOCIATE_DATA\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Specifies the address of the peer MAC entity to associate with.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Specifies the requested operational capabilities to the AP in 2 octets.\r
+  ///\r
+  UINT16                             CapabilityInfo;\r
+  ///\r
+  /// Specifies a time limit in TU, after which the associate procedure is terminated.\r
+  ///\r
+  UINT32                             FailureTimeout;\r
+  ///\r
+  /// Specifies if in power save mode, how often the STA awakes and listens for the next\r
+  /// beacon frame in TU.\r
+  ///\r
+  UINT32                             ListenInterval;\r
+  ///\r
+  /// Indicates a list of channels in which the STA is capable of operating.\r
+  ///\r
+  EFI_80211_ELEMENT_SUPP_CHANNEL     *Channels;\r
+  ///\r
+  /// The cipher suites and AKM suites selected by the STA.\r
+  ///\r
+  EFI_80211_ELEMENT_RSN              RSN;\r
+  ///\r
+  /// Specifies the parameters within the Extended Capabilities element that are\r
+  /// supported by the MAC entity.  This is an optional parameter and may be NULL.\r
+  ///\r
+  EFI_80211_ELEMENT_EXT_CAP          *ExtCapElement;\r
+  ///\r
+  /// Specifies zero or more elements. This is an optional parameter and may be NULL.\r
+  ///\r
+  UINT8                              *VendorSpecificInfo;\r
+} EFI_80211_ASSOCIATE_DATA;\r
+\r
+///\r
+/// EFI_80211_ELEMENT_TIMEOUT_VAL\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Common header of an element.\r
+  ///\r
+  EFI_80211_ELEMENT_HEADER           Hdr;\r
+  ///\r
+  /// Specifies the timeout interval type.\r
+  ///\r
+  UINT8                              Type;\r
+  ///\r
+  /// Specifies the timeout interval value.\r
+  ///\r
+  UINT32                             Value;\r
+} EFI_80211_ELEMENT_TIMEOUT_VAL;\r
+\r
+///\r
+/// EFI_80211_ASSOCIATE_RESULT\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Specifies the address of the peer MAC entity from which the association request\r
+  /// was received.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Specifies the operational capabilities advertised by the AP.\r
+  ///\r
+  UINT16                             CapabilityInfo;\r
+  ///\r
+  /// Specifies the association ID value assigned by the AP.\r
+  ///\r
+  UINT16                             AssociationID;\r
+  ///\r
+  /// Indicates the measured RCPI of the corresponding association request frame. It is\r
+  /// an optional parameter and is set to zero if unavailable.\r
+  ///\r
+  UINT8                              RCPIValue;\r
+  ///\r
+  /// Indicates the measured RSNI at the time the corresponding association request\r
+  /// frame was received. It is an optional parameter and is set to zero if unavailable.\r
+  ///\r
+  UINT8                              RSNIValue;\r
+  ///\r
+  /// Specifies the parameters within the Extended Capabilities element that are\r
+  /// supported by the MAC entity.  This is an optional parameter and may be NULL.\r
+  ///\r
+  EFI_80211_ELEMENT_EXT_CAP          *ExtCapElement;\r
+  ///\r
+  /// Specifies the timeout interval when the result code is AssociateRefusedTemporarily.\r
+  ///\r
+  EFI_80211_ELEMENT_TIMEOUT_VAL      TimeoutInterval;\r
+  ///\r
+  /// Specifies zero or more elements. This is an optional parameter and may be NULL.\r
+  ///\r
+  UINT8                              *VendorSpecificInfo;\r
+} EFI_80211_ASSOCIATE_RESULT;\r
+\r
+///\r
+/// EFI_80211_ASSOCIATE_DATA_TOKEN\r
+///\r
+typedef struct {\r
+  ///\r
+  /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
+  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
+  ///\r
+  EFI_EVENT                          Event;\r
+  ///\r
+  /// Will be set to one of the following values:\r
+  ///   EFI_SUCCESS:      Association operation completed successfully.\r
+  ///   EFI_DEVICE_ERROR: An unexpected network or system error occurred.\r
+  ///\r
+  EFI_STATUS                         Status;\r
+  ///\r
+  /// Pointer to the association data.\r
+  ///\r
+  EFI_80211_ASSOCIATE_DATA           *Data;\r
+  ///\r
+  /// Indicates the association state.\r
+  ///\r
+  EFI_80211_ASSOCIATE_RESULT_CODE    ResultCode;\r
+  ///\r
+  /// Indicates the association result. It is caller's responsibility to free this\r
+  /// buffer.\r
+  ///\r
+  EFI_80211_ASSOCIATE_RESULT         *Result;\r
+} EFI_80211_ASSOCIATE_DATA_TOKEN;\r
+\r
+///\r
+/// EFI_80211_DISASSOCIATE_DATA\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Specifies the address of the peer MAC entity with which to perform the\r
+  /// disassociation process.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Specifies the reason for initiating the disassociation process.\r
+  ///\r
+  EFI_80211_REASON_CODE              ReasonCode;\r
+  ///\r
+  /// Zero or more elements, may be NULL.\r
+  ///\r
+  UINT8                              *VendorSpecificInfo;\r
+} EFI_80211_DISASSOCIATE_DATA;\r
+\r
+///\r
+/// EFI_80211_DISASSOCIATE_DATA_TOKEN\r
+///\r
+typedef struct {\r
+  ///\r
+  /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
+  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
+  ///\r
+  EFI_EVENT                          Event;\r
+  ///\r
+  /// Will be set to one of the following values:\r
+  ///   EFI_SUCCESS:       Disassociation operation completed successfully.\r
+  ///   EFI_DEVICE_ERROR:  An unexpected network or system error occurred.\r
+  ///   EFI_ACCESS_DENIED: The disassociation operation is not completed due to some\r
+  ///                      underlying hardware or software state.\r
+  ///   EFI_NOT_READY:     The disassociation operation is started but not yet completed.\r
+  ///\r
+  EFI_STATUS                         Status;\r
+  ///\r
+  /// Pointer to the disassociation data.\r
+  ///\r
+  EFI_80211_DISASSOCIATE_DATA        *Data;\r
+  ///\r
+  /// Indicates the disassociation state.\r
+  ///\r
+  EFI_80211_DISASSOCIATE_RESULT_CODE ResultCode;\r
+} EFI_80211_DISASSOCIATE_DATA_TOKEN;\r
+\r
+///\r
+/// EFI_80211_AUTHENTICATION_DATA\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Specifies the address of the peer MAC entity with which to perform the\r
+  /// authentication process.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Specifies the type of authentication algorithm to use during the authentication\r
+  /// process.\r
+  ///\r
+  EFI_80211_AUTHENTICATION_TYPE      AuthType;\r
+  ///\r
+  /// Specifies a time limit in TU after which the authentication procedure is\r
+  /// terminated.\r
+  ///\r
+  UINT32                             FailureTimeout;\r
+  ///\r
+  /// Specifies the set of elements to be included in the first message of the FT\r
+  /// authentication sequence, may be NULL.\r
+  ///\r
+  UINT8                              *FTContent;\r
+  ///\r
+  /// Specifies the set of elements to be included in the SAE Commit Message or SAE\r
+  /// Confirm Message, may be NULL.\r
+  ///\r
+  UINT8                              *SAEContent;\r
+  ///\r
+  /// Zero or more elements, may be NULL.\r
+  ///\r
+  UINT8                              *VendorSpecificInfo;\r
+} EFI_80211_AUTHENTICATE_DATA;\r
+\r
+///\r
+/// EFI_80211_AUTHENTICATION_RESULT\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Specifies the address of the peer MAC entity from which the authentication request\r
+  /// was received.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Specifies the set of elements to be included in the second message of the FT\r
+  /// authentication sequence, may be NULL.\r
+  ///\r
+  UINT8                              *FTContent;\r
+  ///\r
+  /// Specifies the set of elements to be included in the SAE Commit Message or SAE\r
+  /// Confirm Message, may be NULL.\r
+  ///\r
+  UINT8                              *SAEContent;\r
+  ///\r
+  /// Zero or more elements, may be NULL.\r
+  ///\r
+  UINT8                              *VendorSpecificInfo;\r
+} EFI_80211_AUTHENTICATE_RESULT;\r
+\r
+///\r
+/// EFI_80211_AUTHENTICATE_DATA_TOKEN\r
+///\r
+typedef struct {\r
+  ///\r
+  /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
+  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
+  ///\r
+  EFI_EVENT                          Event;\r
+  ///\r
+  /// Will be set to one of the following values:\r
+  ///   EFI_SUCCESS: Authentication operation completed successfully.\r
+  ///   EFI_PROTOCOL_ERROR: Peer MAC entity rejects the authentication.\r
+  ///   EFI_NO_RESPONSE:    Peer MAC entity does not response the authentication request.\r
+  ///   EFI_DEVICE_ERROR:   An unexpected network or system error occurred.\r
+  ///   EFI_ACCESS_DENIED:  The authentication operation is not completed due to some\r
+  ///                       underlying hardware or software state.\r
+  ///   EFI_NOT_READY:      The authentication operation is started but not yet completed.\r
+  ///\r
+  EFI_STATUS                         Status;\r
+  ///\r
+  /// Pointer to the authentication data.\r
+  ///\r
+  EFI_80211_AUTHENTICATE_DATA        *Data;\r
+  ///\r
+  /// Indicates the association state.\r
+  ///\r
+  EFI_80211_AUTHENTICATE_RESULT_CODE ResultCode;\r
+  ///\r
+  /// Indicates the association result. It is caller's responsibility to free this\r
+  /// buffer.\r
+  ///\r
+  EFI_80211_AUTHENTICATE_RESULT      *Result;\r
+} EFI_80211_AUTHENTICATE_DATA_TOKEN;\r
+\r
+///\r
+/// EFI_80211_DEAUTHENTICATE_DATA\r
+///\r
+typedef struct {\r
+  ///\r
+  /// Specifies the address of the peer MAC entity with which to perform the\r
+  /// deauthentication process.\r
+  ///\r
+  EFI_80211_MAC_ADDRESS              BSSId;\r
+  ///\r
+  /// Specifies the reason for initiating the deauthentication process.\r
+  ///\r
+  EFI_80211_REASON_CODE              ReasonCode;\r
+  ///\r
+  /// Zero or more elements, may be NULL.\r
+  ///\r
+  UINT8                              *VendorSpecificInfo;\r
+} EFI_80211_DEAUTHENTICATE_DATA;\r
+\r
+///\r
+/// EFI_80211_DEAUTHENTICATE_DATA_TOKEN\r
+///\r
+typedef struct {\r
+  ///\r
+  /// This Event will be signaled after the Status field is updated by the EFI Wireless\r
+  /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r
+  ///\r
+  EFI_EVENT                          Event;\r
+  ///\r
+  /// Will be set to one of the following values:\r
+  ///   EFI_SUCCESS:       Deauthentication operation completed successfully.\r
+  ///   EFI_DEVICE_ERROR:  An unexpected network or system error occurred.\r
+  ///   EFI_ACCESS_DENIED: The deauthentication operation is not completed due to some\r
+  ///                      underlying hardware or software state.\r
+  ///   EFI_NOT_READY:     The deauthentication operation is started but not yet\r
+  ///                      completed.\r
+  ///\r
+  EFI_STATUS                         Status;\r
+  ///\r
+  /// Pointer to the deauthentication data.\r
+  ///\r
+  EFI_80211_DEAUTHENTICATE_DATA      *Data;\r
+} EFI_80211_DEAUTHENTICATE_DATA_TOKEN;\r
+\r
+/**\r
+  Request a survey of potential BSSs that administrator can later elect to try to join.\r
+\r
+  The Scan() function returns the description of the set of BSSs detected by the scan\r
+  process. Passive scan operation is performed by default.\r
+\r
+  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
+                                  instance.\r
+  @param[in]  Data                Pointer to the scan token.\r
+\r
+  @retval EFI_SUCCESS             The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  This is NULL.\r
+                                  Data is NULL.\r
+                                  Data->Data is NULL.\r
+  @retval EFI_UNSUPPORTED         One or more of the input parameters are not supported\r
+                                  by this implementation.\r
+  @retval EFI_ALREADY_STARTED     The scan operation is already started.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_SCAN)(\r
+  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,\r
+  IN EFI_80211_SCAN_DATA_TOKEN                   *Data\r
+  );\r
+\r
+/**\r
+  Request an association with a specified peer MAC entity that is within an AP.\r
+\r
+  The Associate() function provides the capability for MAC layer to become associated\r
+  with an AP.\r
+\r
+  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
+                                  instance.\r
+  @param[in]  Data                Pointer to the association token.\r
+\r
+  @retval EFI_SUCCESS             The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  This is NULL.\r
+                                  Data is NULL.\r
+                                  Data->Data is NULL.\r
+  @retval EFI_UNSUPPORTED         One or more of the input parameters are not supported\r
+                                  by this implementation.\r
+  @retval EFI_ALREADY_STARTED     The association process is already started.\r
+  @retval EFI_NOT_READY           Authentication is not performed before this association\r
+                                  process.\r
+  @retval EFI_NOT_FOUND           The specified peer MAC entity is not found.\r
+  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_ASSOCIATE)(\r
+  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,\r
+  IN EFI_80211_ASSOCIATE_DATA_TOKEN              *Data\r
+  );\r
+\r
+/**\r
+  Request a disassociation with a specified peer MAC entity.\r
+\r
+  The Disassociate() function is invoked to terminate an existing association.\r
+  Disassociation is a notification and cannot be refused by the receiving peer except\r
+  when management frame protection is negotiated and the message integrity check fails.\r
+\r
+  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
+                                  instance.\r
+  @param[in]  Data                Pointer to the disassociation token.\r
+\r
+  @retval EFI_SUCCESS             The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  This is NULL.\r
+                                  Data is NULL.\r
+  @retval EFI_ALREADY_STARTED     The disassociation process is already started.\r
+  @retval EFI_NOT_READY           The disassociation service is invoked to a\r
+                                  nonexistent association relationship.\r
+  @retval EFI_NOT_FOUND           The specified peer MAC entity is not found.\r
+  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_DISASSOCIATE)(\r
+  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,\r
+  IN EFI_80211_DISASSOCIATE_DATA_TOKEN           *Data\r
+  );\r
+\r
+/**\r
+  Request the process of establishing an authentication relationship with a peer MAC\r
+  entity.\r
+\r
+  The Authenticate() function requests authentication with a specified peer MAC entity.\r
+  This service might be time-consuming thus is designed to be invoked independently of\r
+  the association service.\r
+\r
+  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
+                                  instance.\r
+  @param[in]  Data                Pointer to the authentication token.\r
+\r
+  @retval EFI_SUCCESS             The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  This is NULL.\r
+                                  Data is NULL.\r
+                                  Data.Data is NULL.\r
+  @retval EFI_UNSUPPORTED         One or more of the input parameters are not supported\r
+                                  by this implementation.\r
+  @retval EFI_ALREADY_STARTED     The authentication process is already started.\r
+  @retval EFI_NOT_FOUND           The specified peer MAC entity is not found.\r
+  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_AUTHENTICATE)(\r
+  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,\r
+  IN EFI_80211_AUTHENTICATE_DATA_TOKEN           *Data\r
+  );\r
+\r
+/**\r
+  Invalidate the authentication relationship with a peer MAC entity.\r
+\r
+  The Deauthenticate() function requests that the authentication relationship with a\r
+  specified peer MAC entity be invalidated. Deauthentication is a notification and when\r
+  it is sent out the association at the transmitting station is terminated.\r
+\r
+  @param[in]  This                Pointer to the EFI_WIRELESS_MAC_CONNECTION_PROTOCOL\r
+                                  instance.\r
+  @param[in]  Data                Pointer to the deauthentication token.\r
+\r
+  @retval EFI_SUCCESS             The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER   One or more of the following conditions is TRUE:\r
+                                  This is NULL.\r
+                                  Data is NULL.\r
+                                  Data.Data is NULL.\r
+  @retval EFI_ALREADY_STARTED     The deauthentication process is already started.\r
+  @retval EFI_NOT_READY           The deauthentication service is invoked to a\r
+                                  nonexistent association or authentication relationship.\r
+  @retval EFI_NOT_FOUND           The specified peer MAC entity is not found.\r
+  @retval EFI_OUT_OF_RESOURCES    Required system resources could not be allocated.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_DEAUTHENTICATE)(\r
+  IN EFI_WIRELESS_MAC_CONNECTION_PROTOCOL        *This,\r
+  IN EFI_80211_DEAUTHENTICATE_DATA_TOKEN         *Data\r
+  );\r
+\r
+///\r
+/// The EFI_WIRELESS_MAC_CONNECTION_PROTOCOL is designed to provide management service\r
+/// interfaces for the EFI wireless network stack to establish wireless connection with\r
+/// AP. An EFI Wireless MAC Connection Protocol instance will be installed on each\r
+/// communication device that the EFI wireless network stack runs on.\r
+///\r
+struct _EFI_WIRELESS_MAC_CONNECTION_PROTOCOL {\r
+  EFI_WIRELESS_MAC_CONNECTION_SCAN               Scan;\r
+  EFI_WIRELESS_MAC_CONNECTION_ASSOCIATE          Associate;\r
+  EFI_WIRELESS_MAC_CONNECTION_DISASSOCIATE       Disassociate;\r
+  EFI_WIRELESS_MAC_CONNECTION_AUTHENTICATE       Authenticate;\r
+  EFI_WIRELESS_MAC_CONNECTION_DEAUTHENTICATE     Deauthenticate;\r
+};\r
+\r
+extern EFI_GUID gEfiWiFiProtocolGuid;\r
+\r
+#endif\r
index a9bbc3d131476a80212665e32bfd354f48b9645e..521620bbd753e56e89083bc6788e6a9733dfbabf 100644 (file)
 \r
   ## Include/Protocol/HiiConfigKeyword.h \r
   gEfiConfigKeywordHandlerProtocolGuid = {0x0a8badd5, 0x03b8, 0x4d19, {0xb1, 0x28, 0x7b, 0x8f, 0x0e, 0xda, 0xa5, 0x96}} \r
+  \r
+  ## Include/Protocol/WiFi.h\r
+  gEfiWiFiProtocolGuid                 = { 0xda55bc9, 0x45f8, 0x4bb4, {0x87, 0x19, 0x52, 0x24, 0xf1, 0x8a, 0x4d, 0x45 }}\r
 \r
 #\r
 # [Error.gEfiMdePkgTokenSpaceGuid]\r