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