TianoCore EDK2 master
Loading...
Searching...
No Matches
WifiConnectionMgrMisc.c
Go to the documentation of this file.
1
11
12//
13// STA AKM preference order
14// REF: https://www.wi-fi.org/file/wpa3-specification
15//
16STATIC UINT32 mAKMSuitePreference[] = {
17 IEEE_80211_AKM_SUITE_8021X_SUITE_B192, // AKM Suite 12
18 IEEE_80211_AKM_SUITE_8021X_SUITE_B, // AKM Suite 11
19 IEEE_80211_AKM_SUITE_8021X_OR_PMKSA_SHA256, // AKM Suite 5
20 IEEE_80211_AKM_SUITE_8021X_OR_PMKSA, // AKM Suite 1
21
22 IEEE_80211_AKM_SUITE_SAE, // AKM Suite 8
23 IEEE_80211_AKM_SUITE_PSK_SHA256, // AKM Suite 6
24 IEEE_80211_AKM_SUITE_PSK, // AKM Suite 2
25
26 IEEE_80211_AKM_SUITE_OWE // AKM Suite 18
27};
28#define AKM_SUITE_PREFERENCE_COUNT (sizeof (mAKMSuitePreference) / sizeof (UINT32))
29
37VOID
38EFIAPI
40 IN EFI_EVENT Event,
41 IN VOID *Context
42 )
43{
44 return;
45}
46
55VOID
58 IN UINT32 StrSize,
59 OUT CHAR16 *Str
60 )
61{
62 if ((Mac == NULL) || (Str == NULL)) {
63 return;
64 }
65
67 Str,
68 StrSize,
69 L"%02X:%02X:%02X:%02X:%02X:%02X",
70 Mac->Addr[0],
71 Mac->Addr[1],
72 Mac->Addr[2],
73 Mac->Addr[3],
74 Mac->Addr[4],
75 Mac->Addr[5]
76 );
77}
78
93 IN WIFI_MGR_FILE_CONTEXT *FileContext,
94 OUT VOID **DataAddr,
95 OUT UINTN *DataSize
96 )
97{
98 EFI_STATUS Status;
99
100 if ((FileContext != NULL) && (FileContext->FHandle != NULL)) {
101 Status = ReadFileContent (
102 FileContext->FHandle,
103 DataAddr,
104 DataSize,
105 0
106 );
107
108 if (FileContext->FHandle != NULL) {
109 FileContext->FHandle->Close (FileContext->FHandle);
110 }
111
112 FileContext->FHandle = NULL;
113 return Status;
114 }
115
116 return EFI_INVALID_PARAMETER;
117}
118
130 IN WIFI_MGR_PRIVATE_DATA *Private,
131 IN UINT32 NicIndex
132 )
133{
134 LIST_ENTRY *Entry;
136
137 if (Private == NULL) {
138 return NULL;
139 }
140
141 NET_LIST_FOR_EACH (Entry, &Private->NicList) {
142 Nic = NET_LIST_USER_STRUCT_S (
143 Entry,
145 Link,
146 WIFI_MGR_DEVICE_DATA_SIGNATURE
147 );
148 if (Nic->NicIndex == NicIndex) {
149 return Nic;
150 }
151 }
152
153 return NULL;
154}
155
168 IN CHAR16 *SSId,
169 IN UINT8 SecurityType,
170 IN LIST_ENTRY *ProfileList
171 )
172{
173 LIST_ENTRY *Entry;
175
176 if ((SSId == NULL) || (ProfileList == NULL)) {
177 return NULL;
178 }
179
180 NET_LIST_FOR_EACH (Entry, ProfileList) {
181 Profile = NET_LIST_USER_STRUCT_S (
182 Entry,
184 Link,
185 WIFI_MGR_PROFILE_SIGNATURE
186 );
187 if ((StrCmp (SSId, Profile->SSId) == 0) && (SecurityType == Profile->SecurityType)) {
188 return Profile;
189 }
190 }
191
192 return NULL;
193}
194
207 IN CHAR8 *SSId,
208 IN UINT8 SecurityType,
209 IN LIST_ENTRY *ProfileList
210 )
211{
212 CHAR16 SSIdUniCode[SSID_STORAGE_SIZE];
213
214 if (SSId == NULL) {
215 return NULL;
216 }
217
218 if (AsciiStrToUnicodeStrS (SSId, SSIdUniCode, SSID_STORAGE_SIZE) != RETURN_SUCCESS) {
219 return NULL;
220 }
221
222 return WifiMgrGetProfileByUnicodeSSId (SSIdUniCode, SecurityType, ProfileList);
223}
224
236 IN UINT32 ProfileIndex,
237 IN LIST_ENTRY *ProfileList
238 )
239{
241 LIST_ENTRY *Entry;
242
243 if (ProfileList == NULL) {
244 return NULL;
245 }
246
247 NET_LIST_FOR_EACH (Entry, ProfileList) {
248 Profile = NET_LIST_USER_STRUCT_S (
249 Entry,
251 Link,
252 WIFI_MGR_PROFILE_SIGNATURE
253 );
254 if (Profile->ProfileIndex == ProfileIndex) {
255 return Profile;
256 }
257 }
258 return NULL;
259}
260
271BOOLEAN
273 IN UINT16 SupportedAKMSuiteCount,
274 IN UINT32 *SupportedAKMSuiteList,
275 IN UINT32 *AKMSuite
276 )
277{
278 UINT16 Index;
279
280 if ((AKMSuite == NULL) || (SupportedAKMSuiteList == NULL) ||
281 (SupportedAKMSuiteCount == 0))
282 {
283 return FALSE;
284 }
285
286 for (Index = 0; Index < SupportedAKMSuiteCount; Index++) {
287 if (SupportedAKMSuiteList[Index] == *AKMSuite) {
288 return TRUE;
289 }
290 }
291
292 return FALSE;
293}
294
305BOOLEAN
307 IN UINT16 SupportedCipherSuiteCount,
308 IN UINT32 *SupportedCipherSuiteList,
309 IN UINT32 *CipherSuite
310 )
311{
312 UINT16 Index;
313
314 if ((CipherSuite == NULL) || (SupportedCipherSuiteCount == 0) ||
315 (SupportedCipherSuiteList == NULL))
316 {
317 return FALSE;
318 }
319
320 for (Index = 0; Index < SupportedCipherSuiteCount; Index++) {
321 if (SupportedCipherSuiteList[Index] == *CipherSuite) {
322 return TRUE;
323 }
324 }
325
326 return FALSE;
327}
328
353 OUT UINT8 *SecurityType,
354 OUT BOOLEAN *AKMSuiteSupported,
355 OUT BOOLEAN *CipherSuiteSupported
356 )
357{
358 EFI_80211_AKM_SUITE_SELECTOR *SupportedAKMSuites;
359 EFI_80211_CIPHER_SUITE_SELECTOR *SupportedSwCipherSuites;
360 EFI_80211_CIPHER_SUITE_SELECTOR *SupportedHwCipherSuites;
361 UINT32 *AKMSuite;
362 EFI_80211_SUITE_SELECTOR *CipherSuite;
363 UINT16 AKMIndex;
364 UINT16 CipherIndex;
365
366 if ((Nic == NULL) || (AKMList == NULL) || (CipherList == NULL) || (SecurityType == NULL)) {
367 return EFI_INVALID_PARAMETER;
368 }
369
370 SupportedAKMSuites = Nic->SupportedSuites.SupportedAKMSuites;
371 SupportedSwCipherSuites = Nic->SupportedSuites.SupportedSwCipherSuites;
372 SupportedHwCipherSuites = Nic->SupportedSuites.SupportedHwCipherSuites;
373
374 *SecurityType = SECURITY_TYPE_UNKNOWN;
375 if ((AKMSuiteSupported != NULL) && (CipherSuiteSupported != NULL)) {
376 *AKMSuiteSupported = FALSE;
377 *CipherSuiteSupported = FALSE;
378 }
379
380 if (AKMList->AKMSuiteCount == 0) {
381 if (CipherList->CipherSuiteCount == 0) {
382 *SecurityType = SECURITY_TYPE_NONE;
383 if ((AKMSuiteSupported != NULL) && (CipherSuiteSupported != NULL)) {
384 *AKMSuiteSupported = TRUE;
385 *CipherSuiteSupported = TRUE;
386 }
387 }
388
389 return EFI_SUCCESS;
390 }
391
392 for (AKMIndex = 0; AKMIndex < AKM_SUITE_PREFERENCE_COUNT; AKMIndex++) {
393 AKMSuite = mAKMSuitePreference + AKMIndex;
394 if (WifiMgrSupportAKMSuite (AKMList->AKMSuiteCount, (UINT32 *)AKMList->AKMSuiteList, AKMSuite) &&
395 WifiMgrSupportAKMSuite (SupportedAKMSuites->AKMSuiteCount, (UINT32 *)SupportedAKMSuites->AKMSuiteList, AKMSuite))
396 {
397 if ((AKMSuiteSupported != NULL) && (CipherSuiteSupported != NULL)) {
398 *AKMSuiteSupported = TRUE;
399 }
400
401 //
402 // OWE transition mode allow CipherSuiteCount is 0
403 //
404 if (CipherList->CipherSuiteCount == 0) {
405 *SecurityType = WifiMgrGetSecurityType ((UINT32 *)AKMSuite, NULL);
406 if (*SecurityType != SECURITY_TYPE_UNKNOWN) {
407 if ((AKMSuiteSupported != NULL) && (CipherSuiteSupported != NULL)) {
408 *CipherSuiteSupported = TRUE;
409 }
410
411 return EFI_SUCCESS;
412 }
413 }
414
415 for (CipherIndex = 0; CipherIndex < CipherList->CipherSuiteCount; CipherIndex++) {
416 CipherSuite = CipherList->CipherSuiteList + CipherIndex;
417
418 if (SupportedSwCipherSuites != NULL) {
420 SupportedSwCipherSuites->CipherSuiteCount,
421 (UINT32 *)SupportedSwCipherSuites->CipherSuiteList,
422 (UINT32 *)CipherSuite
423 ))
424 {
425 *SecurityType = WifiMgrGetSecurityType ((UINT32 *)AKMSuite, (UINT32 *)CipherSuite);
426
427 if (*SecurityType != SECURITY_TYPE_UNKNOWN) {
428 if ((AKMSuiteSupported != NULL) && (CipherSuiteSupported != NULL)) {
429 *CipherSuiteSupported = TRUE;
430 }
431
432 return EFI_SUCCESS;
433 }
434 }
435 }
436
437 if (SupportedHwCipherSuites != NULL) {
439 SupportedHwCipherSuites->CipherSuiteCount,
440 (UINT32 *)SupportedHwCipherSuites->CipherSuiteList,
441 (UINT32 *)CipherSuite
442 ))
443 {
444 *SecurityType = WifiMgrGetSecurityType ((UINT32 *)AKMSuite, (UINT32 *)CipherSuite);
445
446 if (*SecurityType != SECURITY_TYPE_UNKNOWN) {
447 if ((AKMSuiteSupported != NULL) && (CipherSuiteSupported != NULL)) {
448 *CipherSuiteSupported = TRUE;
449 }
450
451 return EFI_SUCCESS;
452 }
453 }
454 }
455 }
456 }
457 }
458
459 *SecurityType = WifiMgrGetSecurityType (
460 (UINT32 *)AKMList->AKMSuiteList,
461 (UINT32 *)CipherList->CipherSuiteList
462 );
463
464 return EFI_SUCCESS;
465}
466
476UINT8
478 IN UINT32 *AKMSuite,
479 IN UINT32 *CipherSuite
480 )
481{
482 if ((AKMSuite != NULL) && (*AKMSuite == IEEE_80211_AKM_SUITE_OWE)) {
483 return SECURITY_TYPE_NONE;
484 }
485
486 if (CipherSuite == NULL) {
487 if (AKMSuite == NULL) {
488 return SECURITY_TYPE_NONE;
489 } else {
490 return SECURITY_TYPE_UNKNOWN;
491 }
492 } else if (*CipherSuite == IEEE_80211_PAIRWISE_CIPHER_SUITE_USE_GROUP) {
493 if (AKMSuite == NULL) {
494 return SECURITY_TYPE_NONE;
495 } else {
496 return SECURITY_TYPE_UNKNOWN;
497 }
498 } else if ((*CipherSuite == IEEE_80211_PAIRWISE_CIPHER_SUITE_WEP40) ||
499 (*CipherSuite == IEEE_80211_PAIRWISE_CIPHER_SUITE_WEP104))
500 {
501 return SECURITY_TYPE_WEP;
502 } else if (*CipherSuite == IEEE_80211_PAIRWISE_CIPHER_SUITE_CCMP) {
503 if (AKMSuite == NULL) {
504 return SECURITY_TYPE_UNKNOWN;
505 }
506
507 if (*AKMSuite == IEEE_80211_AKM_SUITE_SAE) {
508 return SECURITY_TYPE_WPA3_PERSONAL;
509 } else if ((*AKMSuite == IEEE_80211_AKM_SUITE_8021X_OR_PMKSA) ||
510 (*AKMSuite == IEEE_80211_AKM_SUITE_8021X_OR_PMKSA_SHA256))
511 {
512 return SECURITY_TYPE_WPA2_ENTERPRISE;
513 } else if ((*AKMSuite == IEEE_80211_AKM_SUITE_PSK) ||
514 (*AKMSuite == IEEE_80211_AKM_SUITE_PSK_SHA256))
515 {
516 return SECURITY_TYPE_WPA2_PERSONAL;
517 } else {
518 return SECURITY_TYPE_UNKNOWN;
519 }
520 } else if (*CipherSuite == IEEE_80211_PAIRWISE_CIPHER_SUITE_TKIP) {
521 if (AKMSuite == NULL) {
522 return SECURITY_TYPE_UNKNOWN;
523 }
524
525 if ((*AKMSuite == IEEE_80211_AKM_SUITE_8021X_OR_PMKSA) ||
526 (*AKMSuite == IEEE_80211_AKM_SUITE_8021X_OR_PMKSA_SHA256))
527 {
528 return SECURITY_TYPE_WPA_ENTERPRISE;
529 } else if ((*AKMSuite == IEEE_80211_AKM_SUITE_PSK) ||
530 (*AKMSuite == IEEE_80211_AKM_SUITE_PSK_SHA256))
531 {
532 return SECURITY_TYPE_WPA_PERSONAL;
533 } else {
534 return SECURITY_TYPE_UNKNOWN;
535 }
536 } else if (*CipherSuite == IEEE_80211_PAIRWISE_CIPHER_SUITE_GCMP) {
537 if (AKMSuite == NULL) {
538 return SECURITY_TYPE_UNKNOWN;
539 }
540
541 if (*AKMSuite == IEEE_80211_AKM_SUITE_8021X_SUITE_B) {
542 return SECURITY_TYPE_WPA3_ENTERPRISE;
543 } else {
544 return SECURITY_TYPE_UNKNOWN;
545 }
546 } else if (*CipherSuite == IEEE_80211_PAIRWISE_CIPHER_SUITE_GCMP256) {
547 if (AKMSuite == NULL) {
548 return SECURITY_TYPE_UNKNOWN;
549 }
550
551 if (*AKMSuite == IEEE_80211_AKM_SUITE_8021X_SUITE_B192) {
552 return SECURITY_TYPE_WPA3_ENTERPRISE;
553 } else {
554 return SECURITY_TYPE_UNKNOWN;
555 }
556 } else {
557 return SECURITY_TYPE_UNKNOWN;
558 }
559}
560
573 )
574{
575 EFI_STATUS Status;
576 EFI_SUPPLICANT_PROTOCOL *Supplicant;
577 EFI_80211_AKM_SUITE_SELECTOR *SupportedAKMSuites;
578 EFI_80211_CIPHER_SUITE_SELECTOR *SupportedSwCipherSuites;
579 EFI_80211_CIPHER_SUITE_SELECTOR *SupportedHwCipherSuites;
580 UINTN DataSize;
581
582 SupportedAKMSuites = NULL;
583 SupportedSwCipherSuites = NULL;
584 SupportedHwCipherSuites = NULL;
585
586 if ((Nic == NULL) || (Nic->Supplicant == NULL)) {
587 return EFI_INVALID_PARAMETER;
588 }
589
590 Supplicant = Nic->Supplicant;
591
592 DataSize = 0;
593 Status = Supplicant->GetData (Supplicant, EfiSupplicant80211SupportedAKMSuites, NULL, &DataSize);
594 if ((Status == EFI_BUFFER_TOO_SMALL) && (DataSize > 0)) {
595 SupportedAKMSuites = AllocateZeroPool (DataSize);
596 if (SupportedAKMSuites == NULL) {
597 return EFI_OUT_OF_RESOURCES;
598 }
599
600 Status = Supplicant->GetData (
601 Supplicant,
602 EfiSupplicant80211SupportedAKMSuites,
603 (UINT8 *)SupportedAKMSuites,
604 &DataSize
605 );
606 if (!EFI_ERROR (Status)) {
607 Nic->SupportedSuites.SupportedAKMSuites = SupportedAKMSuites;
608 } else {
609 FreePool (SupportedAKMSuites);
610 }
611 } else {
612 SupportedAKMSuites = NULL;
613 }
614
615 DataSize = 0;
616 Status = Supplicant->GetData (Supplicant, EfiSupplicant80211SupportedSoftwareCipherSuites, NULL, &DataSize);
617 if ((Status == EFI_BUFFER_TOO_SMALL) && (DataSize > 0)) {
618 SupportedSwCipherSuites = AllocateZeroPool (DataSize);
619 if (SupportedSwCipherSuites == NULL) {
620 return EFI_OUT_OF_RESOURCES;
621 }
622
623 Status = Supplicant->GetData (
624 Supplicant,
625 EfiSupplicant80211SupportedSoftwareCipherSuites,
626 (UINT8 *)SupportedSwCipherSuites,
627 &DataSize
628 );
629 if (!EFI_ERROR (Status)) {
630 Nic->SupportedSuites.SupportedSwCipherSuites = SupportedSwCipherSuites;
631 } else {
632 FreePool (SupportedSwCipherSuites);
633 }
634 } else {
635 SupportedSwCipherSuites = NULL;
636 }
637
638 DataSize = 0;
639 Status = Supplicant->GetData (Supplicant, EfiSupplicant80211SupportedHardwareCipherSuites, NULL, &DataSize);
640 if ((Status == EFI_BUFFER_TOO_SMALL) && (DataSize > 0)) {
641 SupportedHwCipherSuites = AllocateZeroPool (DataSize);
642 if (SupportedHwCipherSuites == NULL) {
643 return EFI_OUT_OF_RESOURCES;
644 }
645
646 Status = Supplicant->GetData (
647 Supplicant,
648 EfiSupplicant80211SupportedHardwareCipherSuites,
649 (UINT8 *)SupportedHwCipherSuites,
650 &DataSize
651 );
652 if (!EFI_ERROR (Status)) {
653 Nic->SupportedSuites.SupportedHwCipherSuites = SupportedHwCipherSuites;
654 } else {
655 FreePool (SupportedHwCipherSuites);
656 }
657 } else {
658 SupportedHwCipherSuites = NULL;
659 }
660
661 return EFI_SUCCESS;
662}
663
670VOID
673 )
674{
675 EFI_STATUS Status;
676 EDKII_WIFI_PROFILE_SYNC_PROTOCOL *WiFiProfileSyncProtocol;
677
678 ZeroMem (Profile->Password, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE);
679 ZeroMem (Profile->EapPassword, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE);
680 ZeroMem (Profile->PrivateKeyPassword, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE);
681
682 //
683 // When EFI WiFi profile sync protocol is found the system is performing a recovery boot in secure
684 // boot mode. The profile sync driver will manage the CA certificate, client certificate, and key
685 // data, cleaning them at exit boot services.
686 //
687 Status = gBS->LocateProtocol (&gEdkiiWiFiProfileSyncProtocolGuid, NULL, (VOID **)&WiFiProfileSyncProtocol);
688 if (!EFI_ERROR (Status)) {
689 return;
690 }
691
692 if (Profile->CACertData != NULL) {
693 ZeroMem (Profile->CACertData, Profile->CACertSize);
694 FreePool (Profile->CACertData);
695 }
696
697 Profile->CACertData = NULL;
698 Profile->CACertSize = 0;
699
700 if (Profile->ClientCertData != NULL) {
701 ZeroMem (Profile->ClientCertData, Profile->ClientCertSize);
702 FreePool (Profile->ClientCertData);
703 }
704
705 Profile->ClientCertData = NULL;
706 Profile->ClientCertSize = 0;
707
708 if (Profile->PrivateKeyData != NULL) {
709 ZeroMem (Profile->PrivateKeyData, Profile->PrivateKeyDataSize);
710 FreePool (Profile->PrivateKeyData);
711 }
712
713 Profile->PrivateKeyData = NULL;
714 Profile->PrivateKeyDataSize = 0;
715}
716
723VOID
725 IN LIST_ENTRY *ProfileList
726 )
727{
729 LIST_ENTRY *Entry;
730 LIST_ENTRY *NextEntry;
731
732 if (ProfileList == NULL) {
733 return;
734 }
735
736 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, ProfileList) {
737 Profile = NET_LIST_USER_STRUCT_S (
738 Entry,
740 Link,
741 WIFI_MGR_PROFILE_SIGNATURE
742 );
743
745
746 if (Profile->Network.AKMSuite != NULL) {
747 FreePool (Profile->Network.AKMSuite);
748 }
749
750 if (Profile->Network.CipherSuite != NULL) {
751 FreePool (Profile->Network.CipherSuite);
752 }
753
754 FreePool (Profile);
755 }
756}
757
764VOID
766 IN LIST_ENTRY *HiddenList
767 )
768{
769 WIFI_HIDDEN_NETWORK_DATA *HiddenNetwork;
770 LIST_ENTRY *Entry;
771 LIST_ENTRY *NextEntry;
772
773 if (HiddenList == NULL) {
774 return;
775 }
776
777 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, HiddenList) {
778 HiddenNetwork = NET_LIST_USER_STRUCT_S (
779 Entry,
781 Link,
782 WIFI_MGR_HIDDEN_NETWORK_SIGNATURE
783 );
784 FreePool (HiddenNetwork);
785 }
786}
787
793VOID
795 IN WIFI_MGR_MAC_CONFIG_TOKEN *ConfigToken
796 )
797{
799
800 if (ConfigToken == NULL) {
801 return;
802 }
803
804 switch (ConfigToken->Type) {
805 case TokenTypeGetNetworksToken:
806
807 if (ConfigToken->Token.GetNetworksToken != NULL) {
808 gBS->CloseEvent (ConfigToken->Token.GetNetworksToken->Event);
809 if (ConfigToken->Token.GetNetworksToken->Data != NULL) {
810 FreePool (ConfigToken->Token.GetNetworksToken->Data);
811 }
812
813 Result = ConfigToken->Token.GetNetworksToken->Result;
814 if (Result != NULL) {
815 FreePool (Result);
816 }
817
818 FreePool (ConfigToken->Token.GetNetworksToken);
819 }
820
821 FreePool (ConfigToken);
822 break;
823
824 case TokenTypeConnectNetworkToken:
825
826 if (ConfigToken->Token.ConnectNetworkToken != NULL) {
827 gBS->CloseEvent (ConfigToken->Token.ConnectNetworkToken->Event);
828 if (ConfigToken->Token.ConnectNetworkToken->Data != NULL) {
829 FreePool (ConfigToken->Token.ConnectNetworkToken->Data);
830 }
831
832 FreePool (ConfigToken->Token.ConnectNetworkToken);
833 }
834
835 FreePool (ConfigToken);
836 break;
837
838 case TokenTypeDisconnectNetworkToken:
839
840 if (ConfigToken->Token.DisconnectNetworkToken != NULL) {
841 FreePool (ConfigToken->Token.DisconnectNetworkToken);
842 }
843
844 FreePool (ConfigToken);
845 break;
846
847 default:
848 break;
849 }
850}
UINT64 UINTN
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
Definition: String.c:72
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
Definition: String.c:109
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
Definition: SafeString.c:2873
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
Definition: PrintLib.c:408
#define NULL
Definition: Base.h:319
#define STATIC
Definition: Base.h:264
#define RETURN_SUCCESS
Definition: Base.h:1066
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS ReadFileContent(IN EFI_FILE_HANDLE FileHandle, IN OUT VOID **BufferPtr, OUT UINTN *FileSize, IN UINTN AddtionAllocateSize)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
WIFI_MGR_DEVICE_DATA * WifiMgrGetNicByIndex(IN WIFI_MGR_PRIVATE_DATA *Private, IN UINT32 NicIndex)
VOID WifiMgrFreeProfileList(IN LIST_ENTRY *ProfileList)
VOID EFIAPI WifiMgrInternalEmptyFunction(IN EFI_EVENT Event, IN VOID *Context)
WIFI_MGR_NETWORK_PROFILE * WifiMgrGetProfileByProfileIndex(IN UINT32 ProfileIndex, IN LIST_ENTRY *ProfileList)
EFI_STATUS WifiMgrReadFileToBuffer(IN WIFI_MGR_FILE_CONTEXT *FileContext, OUT VOID **DataAddr, OUT UINTN *DataSize)
WIFI_MGR_NETWORK_PROFILE * WifiMgrGetProfileByAsciiSSId(IN CHAR8 *SSId, IN UINT8 SecurityType, IN LIST_ENTRY *ProfileList)
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)
VOID WifiMgrMacAddrToStr(IN EFI_80211_MAC_ADDRESS *Mac, IN UINT32 StrSize, OUT CHAR16 *Str)
EFI_STATUS WifiMgrGetSupportedSuites(IN WIFI_MGR_DEVICE_DATA *Nic)
VOID WifiMgrCleanProfileSecrets(IN WIFI_MGR_NETWORK_PROFILE *Profile)
VOID WifiMgrFreeHiddenList(IN LIST_ENTRY *HiddenList)
BOOLEAN WifiMgrSupportAKMSuite(IN UINT16 SupportedAKMSuiteCount, IN UINT32 *SupportedAKMSuiteList, IN UINT32 *AKMSuite)
WIFI_MGR_NETWORK_PROFILE * WifiMgrGetProfileByUnicodeSSId(IN CHAR16 *SSId, IN UINT8 SecurityType, IN LIST_ENTRY *ProfileList)
UINT8 WifiMgrGetSecurityType(IN UINT32 *AKMSuite, IN UINT32 *CipherSuite)
VOID WifiMgrFreeToken(IN WIFI_MGR_MAC_CONFIG_TOKEN *ConfigToken)