]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / WifiConnectionManagerDxe / WifiConnectionMgrImpl.h
CommitLineData
90b24889
WF
1/** @file\r
2 The Mac Connection2 Protocol adapter functions for WiFi Connection Manager.\r
3\r
4 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
5\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php.\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __EFI_WIFI_IMPL__\r
17#define __EFI_WIFI_IMPL__\r
18\r
19/**\r
20 Start scan operation, and send out a token to collect available networks.\r
21\r
22 @param[in] Nic Pointer to the device data of the selected NIC.\r
23\r
24 @retval EFI_SUCCESS The operation is completed.\r
25 @retval EFI_ALREADY_STARTED A former scan operation is already ongoing.\r
26 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
27 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
28 @retval Other Errors Return errors when getting networks from low layer.\r
29\r
30**/\r
31EFI_STATUS\r
32WifiMgrStartScan (\r
33 IN WIFI_MGR_DEVICE_DATA *Nic\r
34 );\r
35\r
36/**\r
37 Get current link state from low layer.\r
38\r
39 @param[in] Nic Pointer to the device data of the selected NIC.\r
40 @param[out] LinkState The pointer to buffer to retrieve link state.\r
41\r
42 @retval EFI_SUCCESS The operation is completed.\r
43 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
44 @retval EFI_UNSUPPORTED Adapter information protocol is not supported.\r
45 @retval Other Errors Returned errors when retrieving link state from low layer.\r
46\r
47**/\r
48EFI_STATUS\r
49WifiMgrGetLinkState (\r
50 IN WIFI_MGR_DEVICE_DATA *Nic,\r
51 OUT EFI_ADAPTER_INFO_MEDIA_STATE *LinkState\r
52 );\r
53\r
54/**\r
55 Start connect operation, and send out a token to connect to a target network.\r
56\r
57 @param[in] Nic Pointer to the device data of the selected NIC.\r
58 @param[in] Profile The target network to be connected.\r
59\r
60 @retval EFI_SUCCESS The operation is completed.\r
61 @retval EFI_ALREADY_STARTED Already in "connected" state, need to perform a disconnect\r
62 operation first.\r
63 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r
64 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
65 @retval Other Errors Return errors when connecting network on low layer.\r
66\r
67**/\r
68EFI_STATUS\r
69WifiMgrConnectToNetwork (\r
70 IN WIFI_MGR_DEVICE_DATA *Nic,\r
71 IN WIFI_MGR_NETWORK_PROFILE *Profile\r
72 );\r
73\r
74/**\r
75 Start disconnect operation, and send out a token to disconnect from current connected\r
76 network.\r
77\r
78 @param[in] Nic Pointer to the device data of the selected NIC.\r
79\r
80 @retval EFI_SUCCESS The operation is completed.\r
81 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r
82 @retval Other Errors Return errors when disconnecting a network on low layer.\r
83\r
84**/\r
85EFI_STATUS\r
86WifiMgrDisconnectToNetwork (\r
87 IN WIFI_MGR_DEVICE_DATA *Nic\r
88 );\r
89\r
90/**\r
91 The state machine of the connection manager, periodically check the state and\r
92 perform a corresponding operation.\r
93\r
94 @param[in] Event The timer event to be triggered.\r
95 @param[in] Context The context of the Nic device data.\r
96\r
97**/\r
98VOID\r
99EFIAPI\r
100WifiMgrOnTimerTick (\r
101 IN EFI_EVENT Event,\r
102 IN VOID *Context\r
103 );\r
104\r
105#endif\r