]>
Commit | Line | Data |
---|---|---|
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 | |
ecf98fbc | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
90b24889 WF |
7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef __EFI_WIFI_IMPL__\r | |
11 | #define __EFI_WIFI_IMPL__\r | |
12 | \r | |
13 | /**\r | |
14 | Start scan operation, and send out a token to collect available networks.\r | |
15 | \r | |
16 | @param[in] Nic Pointer to the device data of the selected NIC.\r | |
17 | \r | |
18 | @retval EFI_SUCCESS The operation is completed.\r | |
19 | @retval EFI_ALREADY_STARTED A former scan operation is already ongoing.\r | |
20 | @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r | |
21 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r | |
22 | @retval Other Errors Return errors when getting networks from low layer.\r | |
23 | \r | |
24 | **/\r | |
25 | EFI_STATUS\r | |
26 | WifiMgrStartScan (\r | |
27 | IN WIFI_MGR_DEVICE_DATA *Nic\r | |
28 | );\r | |
29 | \r | |
30 | /**\r | |
31 | Get current link state from low layer.\r | |
32 | \r | |
33 | @param[in] Nic Pointer to the device data of the selected NIC.\r | |
34 | @param[out] LinkState The pointer to buffer to retrieve link state.\r | |
35 | \r | |
36 | @retval EFI_SUCCESS The operation is completed.\r | |
37 | @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r | |
38 | @retval EFI_UNSUPPORTED Adapter information protocol is not supported.\r | |
39 | @retval Other Errors Returned errors when retrieving link state from low layer.\r | |
40 | \r | |
41 | **/\r | |
42 | EFI_STATUS\r | |
43 | WifiMgrGetLinkState (\r | |
44 | IN WIFI_MGR_DEVICE_DATA *Nic,\r | |
45 | OUT EFI_ADAPTER_INFO_MEDIA_STATE *LinkState\r | |
46 | );\r | |
47 | \r | |
48 | /**\r | |
49 | Start connect operation, and send out a token to connect to a target network.\r | |
50 | \r | |
51 | @param[in] Nic Pointer to the device data of the selected NIC.\r | |
52 | @param[in] Profile The target network to be connected.\r | |
53 | \r | |
54 | @retval EFI_SUCCESS The operation is completed.\r | |
55 | @retval EFI_ALREADY_STARTED Already in "connected" state, need to perform a disconnect\r | |
56 | operation first.\r | |
57 | @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r | |
58 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r | |
59 | @retval Other Errors Return errors when connecting network on low layer.\r | |
60 | \r | |
61 | **/\r | |
62 | EFI_STATUS\r | |
63 | WifiMgrConnectToNetwork (\r | |
64 | IN WIFI_MGR_DEVICE_DATA *Nic,\r | |
65 | IN WIFI_MGR_NETWORK_PROFILE *Profile\r | |
66 | );\r | |
67 | \r | |
68 | /**\r | |
69 | Start disconnect operation, and send out a token to disconnect from current connected\r | |
70 | network.\r | |
71 | \r | |
72 | @param[in] Nic Pointer to the device data of the selected NIC.\r | |
73 | \r | |
74 | @retval EFI_SUCCESS The operation is completed.\r | |
75 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r | |
76 | @retval Other Errors Return errors when disconnecting a network on low layer.\r | |
77 | \r | |
78 | **/\r | |
79 | EFI_STATUS\r | |
80 | WifiMgrDisconnectToNetwork (\r | |
81 | IN WIFI_MGR_DEVICE_DATA *Nic\r | |
82 | );\r | |
83 | \r | |
84 | /**\r | |
85 | The state machine of the connection manager, periodically check the state and\r | |
86 | perform a corresponding operation.\r | |
87 | \r | |
88 | @param[in] Event The timer event to be triggered.\r | |
89 | @param[in] Context The context of the Nic device data.\r | |
90 | \r | |
91 | **/\r | |
92 | VOID\r | |
93 | EFIAPI\r | |
94 | WifiMgrOnTimerTick (\r | |
95 | IN EFI_EVENT Event,\r | |
96 | IN VOID *Context\r | |
97 | );\r | |
98 | \r | |
99 | #endif\r |