/** @file\r
Implementation of Managed Network Protocol I/O functions.\r
\r
-Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
of the BSD License which accompanies this distribution. The full\r
MNP_DEVICE_DATA *MnpDerviceData;\r
\r
MnpDerviceData = MnpServiceData->MnpDeviceData;\r
+\r
+ //\r
+ // Reserve space for vlan tag.\r
+ //\r
+ *PktBuf = MnpDerviceData->TxBuf + NET_VLAN_TAG_LEN;\r
+ \r
if ((TxData->DestinationAddress == NULL) && (TxData->FragmentCount == 1)) {\r
- //\r
- // Reserve space for vlan tag,if necessary.\r
- //\r
- if (MnpServiceData->VlanId != 0) {\r
- *PktBuf = MnpDerviceData->TxBuf + NET_VLAN_TAG_LEN;\r
- } else {\r
- *PktBuf = MnpDerviceData->TxBuf;\r
- } \r
- \r
CopyMem (\r
*PktBuf,\r
TxData->FragmentTable[0].FragmentBuffer,\r
// one fragment, copy the data into the packet buffer. Reserve the\r
// media header space if necessary.\r
//\r
- SnpMode = MnpDerviceData->Snp->Mode;\r
- DstPos = MnpDerviceData->TxBuf;\r
-\r
+ SnpMode = MnpDerviceData->Snp->Mode; \r
+ DstPos = *PktBuf;\r
*PktLen = 0;\r
if (TxData->DestinationAddress != NULL) {\r
//\r
}\r
\r
//\r
- // Set the buffer pointer and the buffer length.\r
+ // Set the buffer length.\r
//\r
- *PktBuf = MnpDerviceData->TxBuf;\r
*PktLen += TxData->DataLength + TxData->HeaderLength;\r
}\r
}\r