diff options
author | xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-30 13:47:55 +0000 |
---|---|---|
committer | xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-30 13:47:55 +0000 |
commit | 779ae3579848a36319d67a6ba012b4b9aa88aa6b (patch) | |
tree | 41d1a27cffb0b75d9ada10329b371d194ed21c31 /MdeModulePkg/Universal/Network/Ip4Dxe | |
parent | 1204fe8319e5e6f77df68c375ef403e9ffa9227e (diff) | |
download | edk2-platforms-779ae3579848a36319d67a6ba012b4b9aa88aa6b.tar.xz |
Add VLAN support.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9649 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4Dxe')
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c index 1b7fa4e603..5e297821a2 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c @@ -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;
|