[edk2] [Patch] MdePkg: update head files to meet UEFI 2.7

2017-06-06 Thread fanwang2
This patch is used to update supplicant.h and wifi2.h to meet UEFI 2.7 definition. Add EfiSupplicant80211PMK field in EFI_SUPPLICANT_DATA_TYPE and change **NetworkDesc to NetworkDesc[1] in EFI_80211_GET_NETWORKS_RESULT. Cc: Ye Ting Cc: Fu Siyuan

[edk2] [Patch] MdePkg: Add UEFI 2.7 defined GUID and structure for AIP network media type.

2017-08-24 Thread fanwang2
From: Wang Fan Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan --- MdePkg/Include/Protocol/AdapterInformation.h | 21 - 1 file

[edk2] [Patch] MdeModulePkg: Free NET_BUF data after it is sent out to avoid memory leak

2017-11-21 Thread fanwang2
When build a DHCP message in function DhcpSendMessage() or DhcpRetransmit(), a new NET_BUF is created by the library of NetbufFromExt, but it's not freed after it is sent out. This patch is to fix this memory leak issue. Cc: Jiaxin Wu Cc: Ye Ting Cc: Fu

[edk2] [Patch] MdeModulePkg/NetLib: Add NetLibDetectMediaWaitTimeout() API to support EFI_NOT_READY media state detection

2017-11-27 Thread fanwang2
In wireless connection, connecting state needs to be cared more about. ECR 1772 redefined the state EFI_NOT_READY to represent connecting state and can be retrieved from Aip protocol. This patch adds a new API to check media state at a specified time interval when network is connecting until the

[edk2] [Patch v2] MdeModulePkg: Free NET_BUF data after it is sent out to avoid memory leak

2017-11-26 Thread fanwang2
V2: * Since packet has already been referred by DhcpSb->LastPacket, and will be freed when sending another packet or clean up, there is no need to add an extra free function in NetbufFromExt. Cc: Jiaxin Wu Cc: Ye Ting Cc: Fu Siyuan

[edk2] [Patch] ShellPkg: Fix a build error in Ping6 shell command.

2017-12-18 Thread fanwang2
From: Wang Fan Last check in involved a build error, this patch is to fix this issue. Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan ---

[edk2] [Patch 3/3 V2] ShellPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.

2017-12-14 Thread fanwang2
From: Wang Fan V2: *Define time period in a macro instead of hard code. Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan

[edk2] [Patch 1/3 V2] MdeModulePkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.

2017-12-14 Thread fanwang2
From: Wang Fan V2: *Define time period in a macro instead of hard code. Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan

[edk2] [Patch 2/3 V2] NetworkPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.

2017-12-14 Thread fanwang2
From: Wang Fan V2: *Define time period in a macro instead of hard code. Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan

[edk2] [Patch 0/3 V2] Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.

2017-12-14 Thread fanwang2
From: Wang Fan V2: *Define time period in a macro instead of hard code. Wang Fan (3): MdeModulePkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout. NetworkPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout. ShellPkg:

[edk2] [Patch] MdeModulePkg: Add error handling when IP address is Class E

2017-11-19 Thread fanwang2
The Dhcp4.TransmitReceive() API should be able to use at any time according to UEFI spec. While in classless addressing network, the netmask must be explicitly provided together with the station address. But if the DHCP instance haven't be configured with a valid netmask, we need compute it

[edk2] [Patch v2] MdeModulePkg/NetLib: Add NetLibDetectMediaWaitTimeout() API to support EFI_NOT_READY media state detection

2017-12-03 Thread fanwang2
V2: * Return error status code directly when Aip protocol falied to detect media rather than wait for another time's check. * Set media state default value to EFI_SUCCESS since some platforms may not support retrieving media state from Aip protocol. Cc: Fu Siyuan

[edk2] [Patch] MdeModulePkg/NetLib: Fix an error when AIP doesn't support network media state detection

2017-12-07 Thread fanwang2
AIP may not support detecting network media state, in this case, should call NetLibDetectMedia to get media state. This patch is to fix this issue. Cc: Fu Siyuan Cc: Ye Ting Cc: Jiaxin Wu Contributed-under: TianoCore Contribution

[edk2] [Patch 1/3] NetworkPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.

2017-12-12 Thread fanwang2
Since new Api NetLibDetectMediaWaitTimeout was involved to support connecting state handling, and it is forward compatible. So apply this Api in Network. Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin Contributed-under: TianoCore

[edk2] [Patch 3/3] ShellPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.

2017-12-12 Thread fanwang2
Since new Api NetLibDetectMediaWaitTimeout was involved to support connecting state handling, and it is forward compatible. So apply this Api in ShellPkg. Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin Contributed-under: TianoCore

[edk2] [Patch 2/3] MdeModulePkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.

2017-12-12 Thread fanwang2
Since new Api NetLibDetectMediaWaitTimeout was involved to support connecting state handling, and it is forward compatible. So apply this Api in MdeModulePkg. Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin Contributed-under: TianoCore

[edk2] [Patch 0/3] *** SUBJECT HERE ***

2017-12-12 Thread fanwang2
This patch updates the Api NetLibDetectMedia to NetLibDetectMediaWaitTimeout. Wang Fan (3): NetworkPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout. MdeModulePkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout. ShellPkg: Update Api from

[edk2] [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout

2017-12-24 Thread fanwang2
From: Wang Fan Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan --- MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[edk2] [Patch 2/3] MdeModulePkg/DxeNetLib: Add parameter check and ASSERT handling.

2018-01-02 Thread fanwang2
From: Wang Fan * Library API should check the input parameters before use, or ASSERT to tell it has to meet some requirements. But in DxeNetLib, not all functions follows this rule. * ASSERT shouldn't be used as error handling, add some handling code for errors. * Add

[edk2] [Patch 3/3] MdeModulePkg/DxeNetLib: Fix an error in packet length counting.

2018-01-02 Thread fanwang2
From: Wang Fan * In old implementation, the operation len-- assumes AsciiSPrint() has counted NULL terminator, and it's not correct. This patch is to fix this issue. Cc: Fu Siyuan Cc: Ye Ting Cc: Jiaxin Wu

[edk2] [Patch 0/3] Fix a set of issues for DxeNetLib

2018-01-02 Thread fanwang2
From: Wang Fan See each patch file for details. Wang Fan (3): MdeModulePkg/DxeNetLib: Fix a potential issue in macro definition. MdeModulePkg/DxeNetLib: Add parameter check and ASSERT handling. MdeModulePkg/DxeNetLib: Fix an error in packet length counting.

[edk2] [Patch 1/3] MdeModulePkg/DxeNetLib: Fix a potential issue in macro definition.

2018-01-02 Thread fanwang2
From: Wang Fan The NIC_ITEM_CONFIG_SIZE macro in DxeNetLib is defined as: sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE. This macro should be surrounded with parenthesis to avoid being incorrectly used. Cc: Fu Siyuan

[edk2] [Patch 4/4] NetworkPkg: Add more parameter or return status check in UDP6 driver

2018-01-03 Thread fanwang2
From: Wang Fan In UDP6Dxe, there are several places that may be enhanced to check input parameters and returned status. This patch is to fix these issues. Cc: Ye Ting Cc: Jiaxin Wu Cc: Fu Siyuan

[edk2] [Patch 2/4] NetworkPkg: Fix a memory leak issue in UDP6 driver

2018-01-03 Thread fanwang2
From: Wang Fan In UDP6Dxe Udp6Groups(), the code return directly without free the buffer allocated for McastIp when JoinFlag is TRUE. It is a memory leak issue that needs to be fixed. This patch is to fix this issue. Cc: Ye Ting Cc: Jiaxin Wu

[edk2] [Patch 3/4] NetworkPkg: Fix some coding style issues in UDP6 driver

2018-01-03 Thread fanwang2
From: Wang Fan In UDP6Dxe, there are some coding style issues, this patch is to fix these issues. Cc: Ye Ting Cc: Jiaxin Wu Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by:

[edk2] [Patch 0/4] Fix some issues in Udp6Dxe

2018-01-03 Thread fanwang2
From: Wang Fan See descriptions in each patch. Wang Fan (4): NetworkPkg: Add ASSERT error handling for UDP6 driver NetworkPkg: Fix a memory leak issue in UDP6 driver NetworkPkg: Fix some coding style issues in UDP6 driver NetworkPkg: Add more parameter or return

[edk2] [Patch 1/4] NetworkPkg: Add ASSERT error handling for UDP6 driver

2018-01-03 Thread fanwang2
From: Wang Fan In Udp6Dxe, there are several places use ASSERT to check returned value. But these errors should be handled if they occur, this patch is to fix this issue. Cc: Ye Ting Cc: Jiaxin Wu Cc: Fu Siyuan

[edk2] [Patch] MdeModulePkg/DxeUdpIoLib: Did some code enhancement for UdpIoLib

2018-01-03 Thread fanwang2
From: Wang Fan * Added some ASSERT descriptions for library APIs. * Added "Optional" option for Context parameter in UdpIoCancelDgrams(). * Added function return status check for UdpIoFreeIo(). Cc: Ye Ting Cc: Fu Siyuan Cc: Jiaxin Wu

[edk2] [Patch] [Patch] MdeModulePkg: Add error handling when IP address is Class E

2018-01-01 Thread fanwang2
From: Wang Fan The Dhcp4.TransmitReceive() API should be able to use at any time according to UEFI spec. While in classless addressing network, the netmask must be explicitly provided together with the station address. But if the DHCP instance haven't be configured with a