WiFiProfileSyncProtocol.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /** @file
  2. WiFi profile sync protocol. Supports One Click Recovery or KVM OS recovery
  3. boot flow over WiFi. This protocol will hold the WiFi profile provided by AMT
  4. in its original structure, then convert the profile when the WifiConnectionManager
  5. is attempting a connection during a system recovery reboot, OCR or KVM. These
  6. converstion and operations are found in the WifiProfileSync driver and in
  7. the link provided below.
  8. This protocol facilitates the reporting and storing of the connection state
  9. incase of failure, to which a connection attempt will rety a maximum of 3 times.
  10. Pulbic links to speficiation document for KVM and One Click Recovery feature.
  11. https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Foneclickrecovery.htm
  12. Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
  13. SPDX-License-Identifier: BSD-2-Clause-Patent
  14. **/
  15. #ifndef WIFI_PROFILE_SYNC_PROTOCOL_H_
  16. #define WIFI_PROFILE_SYNC_PROTOCOL_H_
  17. #include <WifiConnectionManagerDxe/WifiConnectionMgrConfig.h>
  18. //
  19. // WiFi Profile Sync Protocol GUID variable.
  20. //
  21. extern EFI_GUID gEdkiiWiFiProfileSyncProtocolGuid;
  22. /**
  23. Used by the WiFi connection manager to get the WiFi profile that AMT shared
  24. and was stored in WiFi profile protocol. Aligns the AMT WiFi profile data to
  25. the WiFi connection manager profile structure fo connection use.
  26. @param[in, out] WcmProfile WiFi Connection Manager profile structure
  27. @param[in, out] MacAddress MAC address from AMT saved to NiC MAC address
  28. @retval EFI_SUCCESS Stored WiFi profile converted and returned succefully
  29. @retval EFI_UNSUPPORTED Profile protocol sharing not supported or enabled
  30. @retval EFI_NOT_FOUND No profiles to returned
  31. @retval Others Error Occurred
  32. **/
  33. typedef
  34. EFI_STATUS
  35. (EFIAPI *WIFI_PROFILE_GET)(
  36. IN OUT WIFI_MGR_NETWORK_PROFILE *Profile,
  37. IN OUT EFI_80211_MAC_ADDRESS MacAddress
  38. );
  39. /**
  40. Saves the WiFi connection status recieved by the WiFiConnectionManager when
  41. in a KVM OR One Click Recovery WLAN recovery flow. Input as
  42. EFI_80211_CONNECT_NETWORK_RESULT_CODE then converted and stored as EFI_STATUS type.
  43. @param[in] ConnectionStatus WiFi connection attempt results
  44. **/
  45. typedef
  46. VOID
  47. (EFIAPI *WIFI_SET_CONNECT_STATE)(
  48. IN EFI_80211_CONNECT_NETWORK_RESULT_CODE ConnectionStatus
  49. );
  50. /**
  51. Retrieves the stored WiFi connection status when in either KVM OR One Click
  52. Recovery WLAN recovery flow.
  53. @retval EFI_SUCCESS WiFi connection completed succesfully
  54. @retval Others Connection failure occurred
  55. **/
  56. typedef
  57. EFI_STATUS
  58. (EFIAPI *WIFI_GET_CONNECT_STATE)(
  59. VOID
  60. );
  61. //
  62. // WiFi Profile Sync Protocol structure.
  63. //
  64. typedef struct {
  65. UINT32 Revision;
  66. WIFI_SET_CONNECT_STATE SetConnectState;
  67. WIFI_GET_CONNECT_STATE GetConnectState;
  68. WIFI_PROFILE_GET GetProfile;
  69. } EDKII_WIFI_PROFILE_SYNC_PROTOCOL;
  70. /**
  71. WiFi Profile Protocol revision number.
  72. Revision 1: Initial version
  73. **/
  74. #define EDKII_WIFI_PROFILE_SYNC_PROTOCOL_REVISION 1
  75. #endif // WIFI_PROFILE_SYNC_PROTOCOL_H_