TianoCore EDK2 master
|
#include "WifiConnectionMgrDxe.h"
Go to the source code of this file.
Variables | |
EFI_EAP_TYPE | mEapAuthMethod [] |
EFI_EAP_TYPE | mEapSecondAuthMethod [] |
UINT8 | mWifiConnectionCount = 0 |
The Mac Connection2 Protocol adapter functions for WiFi Connection Manager.
Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file WifiConnectionMgrImpl.c.
EFI_STATUS ConnectionRetry | ( | IN EDKII_WIFI_PROFILE_SYNC_PROTOCOL * | WiFiProfileSyncProtocol | ) |
Will reset NiC data, get profile from profile sync driver, and send for another connection attempt.This function should not be called more than 3 times.
[in] | WiFiProfileSyncProtocol | The target network profile to connect. |
EFI_SUCCESS | The operation is completed. |
other | Operation failure. |
Definition at line 937 of file WifiConnectionMgrImpl.c.
EFI_STATUS WifiMgrConfigEap | ( | IN WIFI_MGR_DEVICE_DATA * | Nic, |
IN WIFI_MGR_NETWORK_PROFILE * | Profile | ||
) |
Conduct EAP configuration to supplicant before connecting to a EAP network. Current WiFi Connection Manager only supports three kinds of EAP networks: 1). EAP-TLS (Two-Way Authentication is required in our implementation) 2). EAP-TTLS/MSCHAPv2 (One-Way Authentication is required in our implementation) 3). PEAPv0/MSCHAPv2 (One-Way Authentication is required in our implementation)
[in] | Nic | Pointer to the device data of the selected NIC. |
[in] | Profile | The target network to be connected. |
EFI_SUCCESS | The operation is completed. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_UNSUPPORTED | The expected EAP method is not supported. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Other | Errors Returned errors when setting data to supplicant. |
Definition at line 473 of file WifiConnectionMgrImpl.c.
EFI_STATUS WifiMgrConfigPassword | ( | IN WIFI_MGR_DEVICE_DATA * | Nic, |
IN WIFI_MGR_NETWORK_PROFILE * | Profile | ||
) |
Configure password to supplicant before connecting to a secured network.
[in] | Nic | Pointer to the device data of the selected NIC. |
[in] | Profile | The target network to be connected. |
EFI_SUCCESS | The operation is completed. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_NOT_FOUND | No valid password is found to configure. |
Other | Errors Returned errors when setting data to supplicant. |
Definition at line 392 of file WifiConnectionMgrImpl.c.
EFI_STATUS WifiMgrConnectToNetwork | ( | IN WIFI_MGR_DEVICE_DATA * | Nic, |
IN WIFI_MGR_NETWORK_PROFILE * | Profile | ||
) |
Start connect operation, and send out a token to connect to a target network.
[in] | Nic | Pointer to the device data of the selected NIC. |
[in] | Profile | The target network to be connected. |
EFI_SUCCESS | The operation is completed. |
EFI_ALREADY_STARTED | Already in "connected" state, need to perform a disconnect operation first. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Other | Errors Return errors when connecting network on low layer. |
Definition at line 1207 of file WifiConnectionMgrImpl.c.
EFI_STATUS WifiMgrDisconnectToNetwork | ( | IN WIFI_MGR_DEVICE_DATA * | Nic | ) |
Start disconnect operation, and send out a token to disconnect from current connected network.
[in] | Nic | Pointer to the device data of the selected NIC. |
EFI_SUCCESS | The operation is completed. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Other | Errors Return errors when disconnecting a network on low layer. |
Definition at line 1387 of file WifiConnectionMgrImpl.c.
EFI_STATUS WifiMgrGetLinkState | ( | IN WIFI_MGR_DEVICE_DATA * | Nic, |
OUT EFI_ADAPTER_INFO_MEDIA_STATE * | LinkState | ||
) |
Get current link state from low layer.
[in] | Nic | Pointer to the device data of the selected NIC. |
[out] | LinkState | The pointer to buffer to retrieve link state. |
EFI_SUCCESS | The operation is completed. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_UNSUPPORTED | Adapter information protocol is not supported. |
Other | Errors Returned errors when retrieving link state from low layer. |
Definition at line 791 of file WifiConnectionMgrImpl.c.
The callback function for connect operation.
ASSERT when errors occur in config token.
[in] | Event | The Connect token receive event. |
[in] | Context | The context of the connect token. |
Definition at line 1063 of file WifiConnectionMgrImpl.c.
The callback function for disconnect operation.
ASSERT when errors occur in config token.
[in] | Event | The Disconnect token receive event. |
[in] | Context | The context of the Disconnect token. |
Definition at line 1338 of file WifiConnectionMgrImpl.c.
The callback function for scan operation. This function updates networks according to the latest scan result, and trigger UI refresh.
ASSERT when errors occur in config token.
[in] | Event | The GetNetworks token receive event. |
[in] | Context | The context of the GetNetworks token. |
Definition at line 36 of file WifiConnectionMgrImpl.c.
The state machine of the connection manager, periodically check the state and perform a corresponding operation.
[in] | Event | The timer event to be triggered. |
[in] | Context | The context of the Nic device data. |
Definition at line 1477 of file WifiConnectionMgrImpl.c.
EFI_STATUS WifiMgrPrepareConnection | ( | IN WIFI_MGR_DEVICE_DATA * | Nic, |
IN WIFI_MGR_NETWORK_PROFILE * | Profile | ||
) |
Prepare configuration work before connecting to the target network. For WPA2 Personal networks, password should be checked; and for EAP networks, parameters are different for different networks.
[in] | Nic | Pointer to the device data of the selected NIC. |
[in] | Profile | The target network to be connected. |
EFI_SUCCESS | The operation is completed. |
EFI_UNSUPPORTED | This network is not supported. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
Definition at line 852 of file WifiConnectionMgrImpl.c.
EFI_STATUS WifiMgrStartScan | ( | IN WIFI_MGR_DEVICE_DATA * | Nic | ) |
Start scan operation, and send out a token to collect available networks.
[in] | Nic | Pointer to the device data of the selected NIC. |
EFI_SUCCESS | The operation is completed. |
EFI_ALREADY_STARTED | A former scan operation is already ongoing. |
EFI_INVALID_PARAMETER | One or more parameters are invalid. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Other | Errors Return errors when getting networks from low layer. |
Definition at line 246 of file WifiConnectionMgrImpl.c.
EFI_EAP_TYPE mEapAuthMethod[] |
Definition at line 12 of file WifiConnectionMgrImpl.c.
EFI_EAP_TYPE mEapSecondAuthMethod[] |
Definition at line 18 of file WifiConnectionMgrImpl.c.
UINT8 mWifiConnectionCount = 0 |
Definition at line 22 of file WifiConnectionMgrImpl.c.