MdeModulePkg: Update MNP driver to recycle TX buffer asynchronously.

This patch updates the MNP driver to recycle TX buffer asynchronously, instead 
of using a while loop wait after each transmit command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com> 

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19624 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Fu Siyuan
2016-01-08 02:38:34 +00:00
committed by sfu5
parent 7b4b93a247
commit 0507449955
5 changed files with 348 additions and 113 deletions

View File

@@ -1,7 +1,7 @@
/** @file
Declaration of strctures and functions for MnpDxe driver.
Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2005 - 2016, 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
@@ -67,7 +67,9 @@ typedef struct {
LIST_ENTRY GroupAddressList;
UINT32 GroupAddressCount;
EFI_EVENT TxTimeoutEvent;
LIST_ENTRY FreeTxBufList;
LIST_ENTRY AllTxBufList;
UINT32 TxBufCount;
NET_BUF_QUEUE FreeNbufQue;
INTN NbufCnt;
@@ -90,7 +92,6 @@ typedef struct {
UINT32 BufferLength;
UINT32 PaddingSize;
NET_BUF *RxNbufCache;
UINT8 *TxBuf;
} MNP_DEVICE_DATA;
#define MNP_DEVICE_DATA_FROM_THIS(a) \