TianoCore EDK2 master
Loading...
Searching...
No Matches
WifiConnectionMgrMisc.h File Reference

Go to the source code of this file.

Functions

VOID EFIAPI WifiMgrInternalEmptyFunction (IN EFI_EVENT Event, IN VOID *Context)
 
VOID WifiMgrMacAddrToStr (IN EFI_80211_MAC_ADDRESS *Mac, IN UINT32 StrSize, OUT CHAR16 *Str)
 
EFI_STATUS WifiMgrReadFileToBuffer (IN WIFI_MGR_FILE_CONTEXT *FileContext, OUT VOID **PrivateKeyDataAddr, OUT UINTN *PrivateKeyDataSize)
 
WIFI_MGR_DEVICE_DATAWifiMgrGetNicByIndex (IN WIFI_MGR_PRIVATE_DATA *Private, IN UINT32 NicIndex)
 
WIFI_MGR_NETWORK_PROFILEWifiMgrGetProfileByUnicodeSSId (IN CHAR16 *SSId, IN UINT8 SecurityType, IN LIST_ENTRY *ProfileList)
 
WIFI_MGR_NETWORK_PROFILEWifiMgrGetProfileByAsciiSSId (IN CHAR8 *SSId, IN UINT8 SecurityType, IN LIST_ENTRY *ProfileList)
 
WIFI_MGR_NETWORK_PROFILEWifiMgrGetProfileByProfileIndex (IN UINT32 ProfileIndex, IN LIST_ENTRY *ProfileList)
 
BOOLEAN WifiMgrSupportAKMSuite (IN UINT16 SupportedAKMSuiteCount, IN UINT32 *SupportedAKMSuiteList, IN UINT32 *AKMSuite)
 
BOOLEAN WifiMgrSupportCipherSuite (IN UINT16 SupportedCipherSuiteCount, IN UINT32 *SupportedCipherSuiteList, IN UINT32 *CipherSuite)
 
EFI_STATUS WifiMgrCheckRSN (IN EFI_80211_AKM_SUITE_SELECTOR *AKMList, IN EFI_80211_CIPHER_SUITE_SELECTOR *CipherList, IN WIFI_MGR_DEVICE_DATA *Nic, OUT UINT8 *SecurityType, OUT BOOLEAN *AKMSuiteSupported, OUT BOOLEAN *CipherSuiteSupported)
 
UINT8 WifiMgrGetSecurityType (IN UINT32 *AKMSuite, IN UINT32 *CipherSuite)
 
EFI_STATUS WifiMgrGetSupportedSuites (IN WIFI_MGR_DEVICE_DATA *Nic)
 
VOID WifiMgrCleanProfileSecrets (IN WIFI_MGR_NETWORK_PROFILE *Profile)
 
VOID WifiMgrFreeProfileList (IN LIST_ENTRY *ProfileList)
 
VOID WifiMgrFreeHiddenList (IN LIST_ENTRY *HiddenList)
 
VOID WifiMgrFreeToken (IN WIFI_MGR_MAC_CONFIG_TOKEN *ConfigToken)
 

Detailed Description

The Miscellaneous Routines for WiFi Connection Manager.

Copyright (c) 2019, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file WifiConnectionMgrMisc.h.

Function Documentation

◆ WifiMgrCheckRSN()

EFI_STATUS WifiMgrCheckRSN ( IN EFI_80211_AKM_SUITE_SELECTOR AKMList,
IN EFI_80211_CIPHER_SUITE_SELECTOR CipherList,
IN WIFI_MGR_DEVICE_DATA Nic,
OUT UINT8 *  SecurityType,
OUT BOOLEAN *  AKMSuiteSupported,
OUT BOOLEAN *  CipherSuiteSupported 
)

Check an AKM suite list and a Cipher suite list to see if one or more AKM suites or Cipher suites are supported and find the matchable security type.

Parameters
[in]AKMListThe target AKM suite list to be checked.
[in]CipherListThe target Cipher suite list to be checked
[in]NicThe Nic to operate, contains the supported AKMSuite list and supported CipherSuite list
[out]SecurityTypeTo identify a security type from the AKM suite list and Cipher suite list
[out]AKMSuiteSupportedTo identify if this security type is supported. If it is NULL, overcome this field
[out]CipherSuiteSupportedTo identify if this security type is supported. If it is NULL, overcome this field
Return values
EFI_SUCCESSThis operation has completed successfully.
EFI_INVALID_PARAMETERNo Nic found or the suite list is null.

Definition at line 349 of file WifiConnectionMgrMisc.c.

◆ WifiMgrCleanProfileSecrets()

VOID WifiMgrCleanProfileSecrets ( IN WIFI_MGR_NETWORK_PROFILE Profile)

Clean secrets from a network profile.

Parameters
[in]ProfileThe profile to be cleanned.

Definition at line 671 of file WifiConnectionMgrMisc.c.

◆ WifiMgrFreeHiddenList()

VOID WifiMgrFreeHiddenList ( IN LIST_ENTRY HiddenList)

Free user configured hidden network list.

Parameters
[in]HiddenListThe hidden network list to be freed.

Definition at line 765 of file WifiConnectionMgrMisc.c.

◆ WifiMgrFreeProfileList()

VOID WifiMgrFreeProfileList ( IN LIST_ENTRY ProfileList)

Free all network profiles in a profile list.

Parameters
[in]ProfileListThe profile list to be freed.

Definition at line 724 of file WifiConnectionMgrMisc.c.

◆ WifiMgrFreeToken()

VOID WifiMgrFreeToken ( IN WIFI_MGR_MAC_CONFIG_TOKEN ConfigToken)

Free the resources of a config token.

Parameters
[in]ConfigTokenThe config token to be freed.

Definition at line 794 of file WifiConnectionMgrMisc.c.

◆ WifiMgrGetNicByIndex()

WIFI_MGR_DEVICE_DATA * WifiMgrGetNicByIndex ( IN WIFI_MGR_PRIVATE_DATA Private,
IN UINT32  NicIndex 
)

Get the Nic data by the NicIndex.

Parameters
[in]PrivateThe pointer to the global private data structure.
[in]NicIndexThe index indicates the position of wireless NIC.
Returns
Pointer to the Nic data, or NULL if not found.

Definition at line 129 of file WifiConnectionMgrMisc.c.

◆ WifiMgrGetProfileByAsciiSSId()

WIFI_MGR_NETWORK_PROFILE * WifiMgrGetProfileByAsciiSSId ( IN CHAR8 *  SSId,
IN UINT8  SecurityType,
IN LIST_ENTRY ProfileList 
)

Find a network profile through its' SSId and securit type, and the SSId is an ascii string.

Parameters
[in]SSIdThe target network's SSId.
[in]SecurityTypeThe target network's security type.
[in]ProfileListThe profile list on a Nic.
Returns
Pointer to a network profile, or NULL if not found.

Definition at line 206 of file WifiConnectionMgrMisc.c.

◆ WifiMgrGetProfileByProfileIndex()

WIFI_MGR_NETWORK_PROFILE * WifiMgrGetProfileByProfileIndex ( IN UINT32  ProfileIndex,
IN LIST_ENTRY ProfileList 
)

Find a network profile through its' profile index.

Parameters
[in]ProfileIndexThe target network's profile index.
[in]ProfileListThe profile list on a Nic.
Returns
Pointer to a network profile, or NULL if not found.

Definition at line 235 of file WifiConnectionMgrMisc.c.

◆ WifiMgrGetProfileByUnicodeSSId()

WIFI_MGR_NETWORK_PROFILE * WifiMgrGetProfileByUnicodeSSId ( IN CHAR16 *  SSId,
IN UINT8  SecurityType,
IN LIST_ENTRY ProfileList 
)

Find a network profile through its' SSId and securit type, and the SSId is an unicode string.

Parameters
[in]SSIdThe target network's SSId.
[in]SecurityTypeThe target network's security type.
[in]ProfileListThe profile list on a Nic.
Returns
Pointer to a network profile, or NULL if not found.

Definition at line 167 of file WifiConnectionMgrMisc.c.

◆ WifiMgrGetSecurityType()

UINT8 WifiMgrGetSecurityType ( IN UINT32 *  AKMSuite,
IN UINT32 *  CipherSuite 
)

To get the security type for a certain AKMSuite and CipherSuite.

Parameters
[in]AKMSuiteAn certain AKMSuite.
[in]CipherSuiteAn certain CipherSuite.
Returns
a security type if found, or SECURITY_TYPE_UNKNOWN.

Get the security type for a certain AKMSuite and CipherSuite.

Parameters
[in]AKMSuiteAn certain AKMSuite.
[in]CipherSuiteAn certain CipherSuite.
Returns
a security type if found, or SECURITY_TYPE_UNKNOWN.

Definition at line 477 of file WifiConnectionMgrMisc.c.

◆ WifiMgrGetSupportedSuites()

EFI_STATUS WifiMgrGetSupportedSuites ( IN WIFI_MGR_DEVICE_DATA Nic)

Get supported AKMSuites and CipherSuites from supplicant.

Parameters
[in]NicThe Nic to operate.
Return values
EFI_SUCCESSGet the supported suite list successfully.
EFI_INVALID_PARAMETERNo Nic found or supplicant is NULL.

Get supported AKMSuites and CipherSuites from supplicant for a Nic.

Parameters
[in]NicThe Nic to operate.
Return values
EFI_SUCCESSGet the supported suite list successfully.
EFI_INVALID_PARAMETERNo Nic found or supplicant is NULL.

Definition at line 571 of file WifiConnectionMgrMisc.c.

◆ WifiMgrInternalEmptyFunction()

VOID EFIAPI WifiMgrInternalEmptyFunction ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Empty function for event process function.

Parameters
[in]EventThe Event needs to be processed
[in]ContextThe context of the event

Empty function for event process function.

Parameters
EventThe Event need to be process
ContextThe context of the event.

Definition at line 39 of file WifiConnectionMgrMisc.c.

◆ WifiMgrMacAddrToStr()

VOID WifiMgrMacAddrToStr ( IN EFI_80211_MAC_ADDRESS Mac,
IN UINT32  StrSize,
OUT CHAR16 *  Str 
)

Convert the mac address into a hexadecimal encoded ":" seperated string.

Parameters
[in]MacThe mac address
[in]StrSizeThe size, in bytes, of the output buffer specified by Str
[out]StrThe storage to return the mac string

Convert the mac address into a hexadecimal encoded ":" seperated string.

Parameters
[in]MacThe mac address.
[in]StrSizeThe size, in bytes, of the output buffer specified by Str.
[out]StrThe storage to return the mac string.

Definition at line 56 of file WifiConnectionMgrMisc.c.

◆ WifiMgrReadFileToBuffer()

EFI_STATUS WifiMgrReadFileToBuffer ( IN WIFI_MGR_FILE_CONTEXT FileContext,
OUT VOID **  DataAddr,
OUT UINTN DataSize 
)

Read private key file to buffer.

Parameters
[in]FileContextThe file context of private key file.
[out]PrivateKeyDataAddrThe buffer address to restore private key file, should be freed by caller.
[out]PrivateKeyDataSizeThe size of read private key file.
Return values
EFI_SUCCESSSuccessfully read the private key file.
EFI_INVALID_PARAMETEROne or more of the parameters is invalid.

Definition at line 92 of file WifiConnectionMgrMisc.c.

◆ WifiMgrSupportAKMSuite()

BOOLEAN WifiMgrSupportAKMSuite ( IN UINT16  SupportedAKMSuiteCount,
IN UINT32 *  SupportedAKMSuiteList,
IN UINT32 *  AKMSuite 
)

To test if the AKMSuite is in supported AKMSuite list.

Parameters
[in]SupportedAKMSuiteCountThe count of the supported AKMSuites.
[in]SupportedAKMSuiteListThe supported AKMSuite list.
[in]AKMSuiteThe AKMSuite to be tested.
Returns
True if this AKMSuite is supported, or False if not.

Definition at line 272 of file WifiConnectionMgrMisc.c.

◆ WifiMgrSupportCipherSuite()

BOOLEAN WifiMgrSupportCipherSuite ( IN UINT16  SupportedCipherSuiteCount,
IN UINT32 *  SupportedCipherSuiteList,
IN UINT32 *  CipherSuite 
)

To check if the CipherSuite is in supported CipherSuite list.

Parameters
[in]SupportedCipherSuiteCountThe count of the supported CipherSuites.
[in]SupportedCipherSuiteListThe supported CipherSuite list.
[in]CipherSuiteThe CipherSuite to be tested.
Returns
True if this CipherSuite is supported, or False if not.

Definition at line 306 of file WifiConnectionMgrMisc.c.