NetworkPkg: Add WiFi Connection Manager to NetworkPkg
* V2 * Remove Arch dependency in Inf file * Add a global guid for WiFi formset and set other guids to module levels * Open supplicant and EapConfig by BY_DRIVER * Remove token free function to avoid potential NULL reference * Update WifiMgrUpdateConnectMessage() to only display message for Current Nic * Fix the potential NULL reference in AIP call * REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1492 Add WiFi Connection Manager in NetworkPkg to provide UI for users to scan networks, connect or disconnect to networks. This connection manager won't include the UNDI driver, supplicant driver, or other device specific drivers and is therefor not a complete solution stack for UEFI Wi-Fi, users can seek help for Wireless card vendors. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
/** @file
|
||||
The file operation functions for WiFi Connection Manager.
|
||||
|
||||
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php.
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EFI_WIFI_MGR_FILE_UTIL__
|
||||
#define __EFI_WIFI_MGR_FILE_UTIL__
|
||||
|
||||
#include "WifiConnectionMgrDxe.h"
|
||||
|
||||
/**
|
||||
Read file content into BufferPtr, the size of the allocate buffer
|
||||
is *FileSize plus AddtionAllocateSize.
|
||||
|
||||
@param[in] FileHandle The file to be read.
|
||||
@param[in, out] BufferPtr Pointers to the pointer of allocated buffer.
|
||||
@param[out] FileSize Size of input file
|
||||
@param[in] AddtionAllocateSize Addtion size the buffer need to be allocated.
|
||||
In case the buffer need to contain others besides the file content.
|
||||
|
||||
@retval EFI_SUCCESS The file was read into the buffer.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval others Unexpected error.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
ReadFileContent (
|
||||
IN EFI_FILE_HANDLE FileHandle,
|
||||
IN OUT VOID **BufferPtr,
|
||||
OUT UINTN *FileSize,
|
||||
IN UINTN AddtionAllocateSize
|
||||
);
|
||||
|
||||
/**
|
||||
Update the CA cert base on the input file path info.
|
||||
|
||||
@param[in] Private The pointer to the global private data structure.
|
||||
@param[in] FilePath Point to the file path.
|
||||
|
||||
@retval TRUE Exit caller function.
|
||||
@retval FALSE Not exit caller function.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
UpdateCAFromFile (
|
||||
IN WIFI_MGR_PRIVATE_DATA *Private,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
||||
);
|
||||
|
||||
/**
|
||||
Update the Private Key base on the input file path info.
|
||||
|
||||
@param[in] Private The pointer to the global private data structure.
|
||||
@param[in] FilePath Point to the file path.
|
||||
|
||||
@retval TRUE Exit caller function.
|
||||
@retval FALSE Not exit caller function.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
UpdatePrivateKeyFromFile (
|
||||
IN WIFI_MGR_PRIVATE_DATA *Private,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
|
||||
);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user