X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FMnpDxe%2FMnpIo.c;h=56405d62b5e05b1b1f9f6b743576b32301f539ec;hp=ba0f36e710db712a2fc902ccea6d92949009609d;hb=c0fd7f734e2d33e22215899b40a47b843129541d;hpb=2048c585b46d240d76e3097917cbbfe43a7be88e diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c index ba0f36e710..56405d62b5 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c @@ -1,15 +1,8 @@ /** @file Implementation of Managed Network Protocol I/O functions. -Copyright (c) 2005 - 2016, Intel Corporation. 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 -text of the license may be found at
-http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -129,14 +122,14 @@ MnpBuildTxPacket ( UINT16 Index; MNP_DEVICE_DATA *MnpDeviceData; UINT8 *TxBuf; - + MnpDeviceData = MnpServiceData->MnpDeviceData; - + TxBuf = MnpAllocTxBuf (MnpDeviceData); if (TxBuf == NULL) { return EFI_OUT_OF_RESOURCES; } - + // // Reserve space for vlan tag if needed. // @@ -145,14 +138,14 @@ MnpBuildTxPacket ( } else { *PktBuf = TxBuf; } - + if ((TxData->DestinationAddress == NULL) && (TxData->FragmentCount == 1)) { CopyMem ( *PktBuf, TxData->FragmentTable[0].FragmentBuffer, TxData->FragmentTable[0].FragmentLength ); - + *PktLen = TxData->FragmentTable[0].FragmentLength; } else { // @@ -160,7 +153,7 @@ MnpBuildTxPacket ( // one fragment, copy the data into the packet buffer. Reserve the // media header space if necessary. // - SnpMode = MnpDeviceData->Snp->Mode; + SnpMode = MnpDeviceData->Snp->Mode; DstPos = *PktBuf; *PktLen = 0; if (TxData->DestinationAddress != NULL) { @@ -195,7 +188,7 @@ MnpBuildTxPacket ( /** - Synchronously send out the packet. + Synchronously send out the packet. This functon places the packet buffer to SNP driver's tansmit queue. The packet can be considered successfully sent out once SNP acccetp the packet, while the @@ -245,7 +238,7 @@ MnpSyncSendPacket ( goto SIGNAL_TOKEN; } - + if (MnpServiceData->VlanId != 0) { // // Insert VLAN tag @@ -282,9 +275,9 @@ MnpSyncSendPacket ( TxData->SourceAddress, TxData->DestinationAddress, &ProtocolType - ); + ); } - + if (EFI_ERROR (Status)) { Token->Status = EFI_DEVICE_ERROR; }