Add VLAN support.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9649 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xdu2
2009-12-30 13:47:55 +00:00
parent 1204fe8319
commit 779ae35798
30 changed files with 4310 additions and 944 deletions

View File

@@ -291,6 +291,12 @@ Ip4CreateService (
InsertHeadList (&IpSb->Interfaces, &IpSb->DefaultInterface->Link);
IpSb->MaxPacketSize = IpSb->SnpMode.MaxPacketSize - sizeof (IP4_HEAD);
if (NetLibGetVlanId (IpSb->Controller) != 0) {
//
// This is a VLAN device, reduce MTU by VLAN tag length
//
IpSb->MaxPacketSize -= NET_VLAN_TAG_LEN;
}
IpSb->MacString = NULL;
*Service = IpSb;