2 The Mac Connection2 Protocol adapter functions for WiFi Connection Manager.
4 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __EFI_WIFI_IMPL__
17 #define __EFI_WIFI_IMPL__
20 Start scan operation, and send out a token to collect available networks.
22 @param[in] Nic Pointer to the device data of the selected NIC.
24 @retval EFI_SUCCESS The operation is completed.
25 @retval EFI_ALREADY_STARTED A former scan operation is already ongoing.
26 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
27 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
28 @retval Other Errors Return errors when getting networks from low layer.
33 IN WIFI_MGR_DEVICE_DATA
*Nic
37 Get current link state from low layer.
39 @param[in] Nic Pointer to the device data of the selected NIC.
40 @param[out] LinkState The pointer to buffer to retrieve link state.
42 @retval EFI_SUCCESS The operation is completed.
43 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
44 @retval EFI_UNSUPPORTED Adapter information protocol is not supported.
45 @retval Other Errors Returned errors when retrieving link state from low layer.
50 IN WIFI_MGR_DEVICE_DATA
*Nic
,
51 OUT EFI_ADAPTER_INFO_MEDIA_STATE
*LinkState
55 Start connect operation, and send out a token to connect to a target network.
57 @param[in] Nic Pointer to the device data of the selected NIC.
58 @param[in] Profile The target network to be connected.
60 @retval EFI_SUCCESS The operation is completed.
61 @retval EFI_ALREADY_STARTED Already in "connected" state, need to perform a disconnect
63 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
64 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
65 @retval Other Errors Return errors when connecting network on low layer.
69 WifiMgrConnectToNetwork (
70 IN WIFI_MGR_DEVICE_DATA
*Nic
,
71 IN WIFI_MGR_NETWORK_PROFILE
*Profile
75 Start disconnect operation, and send out a token to disconnect from current connected
78 @param[in] Nic Pointer to the device data of the selected NIC.
80 @retval EFI_SUCCESS The operation is completed.
81 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
82 @retval Other Errors Return errors when disconnecting a network on low layer.
86 WifiMgrDisconnectToNetwork (
87 IN WIFI_MGR_DEVICE_DATA
*Nic
91 The state machine of the connection manager, periodically check the state and
92 perform a corresponding operation.
94 @param[in] Event The timer event to be triggered.
95 @param[in] Context The context of the Nic device data.