For network dynamic media support:

1. add library function NetLibDetectMedia to NetLib for media detection
2. update MnpDxe to periodically poll for media status update and check for media status before packet transmit
3. update Ip4Dxe to return ModeData using Mnp->GetModeData()
4. update IScsiDxe to check for media status before try to do DHCP and session login
5. update UefiPxeBcDxe to check for media status before PXE start

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9919 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xdu2
2010-02-03 04:37:53 +00:00
parent e51e619ed7
commit dd29f3edb9
16 changed files with 449 additions and 62 deletions

View File

@ -1,7 +1,7 @@
/** @file
Declaration of structures and functions of MnpDxe driver.
Copyright (c) 2005 - 2009, Intel Corporation.<BR>
Copyright (c) 2005 - 2010, Intel Corporation.<BR>
All rights reserved. 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
@ -22,6 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define MNP_SYS_POLL_INTERVAL (10 * TICKS_PER_MS) // 10 milliseconds
#define MNP_TIMEOUT_CHECK_INTERVAL (50 * TICKS_PER_MS) // 50 milliseconds
#define MNP_MEDIA_DETECT_INTERVAL (500 * TICKS_PER_MS) // 500 milliseconds
#define MNP_TX_TIMEOUT_TIME (500 * TICKS_PER_MS) // 500 milliseconds
#define MNP_INIT_NET_BUFFER_NUM 512
#define MNP_NET_BUFFER_INCREASEMENT 64
@ -448,9 +449,8 @@ MnpFreeNbuf (
/**
Remove the received packets if timeout occurs.
@param[in] Event The event this notify function registered to.
@param[in] Context Pointer to the context data registered to the
event.
@param[in] Event The event this notify function registered to.
@param[in] Context Pointer to the context data registered to the event.
**/
VOID
@ -460,19 +460,33 @@ MnpCheckPacketTimeout (
IN VOID *Context
);
/**
Poll to update MediaPresent field in SNP ModeData by Snp.GetStatus().
@param[in] Event The event this notify function registered to.
@param[in] Context Pointer to the context data registered to the event.
**/
VOID
EFIAPI
MnpCheckMediaStatus (
IN EFI_EVENT Event,
IN VOID *Context
);
/**
Poll to receive the packets from Snp. This function is either called by upperlayer
protocols/applications or the system poll timer notify mechanism.
@param[in] Event The event this notify function registered to.
@param[in, out] Context Pointer to the context data registered to the event.
@param[in] Event The event this notify function registered to.
@param[in] Context Pointer to the context data registered to the event.
**/
VOID
EFIAPI
MnpSystemPoll (
IN EFI_EVENT Event,
IN OUT VOID *Context
IN EFI_EVENT Event,
IN VOID *Context
);
/**