/** @file\r
Implementation of Managed Network Protocol private services.\r
\r
-Copyright (c) 2005 - 2016, 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
-text of the license may be found at<BR>\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
\r
Status = EFI_SUCCESS;\r
for (Index = 0; Index < Count; Index++) {\r
- TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (sizeof (MNP_TX_BUF_WRAP) + MnpDeviceData->BufferLength - 1);\r
+ TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (OFFSET_OF (MNP_TX_BUF_WRAP, TxBuf) + MnpDeviceData->BufferLength );\r
if (TxBufWrap == NULL) {\r
DEBUG ((EFI_D_ERROR, "MnpAddFreeTxBuf: TxBuf Alloc failed.\n"));\r
\r
\r
/**\r
Allocate a free TX buffer from MnpDeviceData->FreeTxBufList. If there is none\r
- in the queue, first try to recycle some from SNP, then try to allocate some and add \r
+ in the queue, first try to recycle some from SNP, then try to allocate some and add\r
them into the queue, then fetch the NET_BUF from the updated FreeTxBufList.\r
\r
@param[in, out] MnpDeviceData Pointer to the MNP_DEVICE_DATA.\r
EFI_STATUS Status;\r
LIST_ENTRY *Entry;\r
MNP_TX_BUF_WRAP *TxBufWrap;\r
- \r
+\r
NET_CHECK_SIGNATURE (MnpDeviceData, MNP_DEVICE_DATA_SIGNATURE);\r
\r
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
);\r
return;\r
}\r
- \r
+\r
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
InsertTailList (&MnpDeviceData->FreeTxBufList, &TxBufWrap->WrapEntry);\r
TxBufWrap->InUse = FALSE;\r
\r
/**\r
Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
- \r
+\r
@param[in] Entry The entry to be removed.\r
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
\r
LIST_ENTRY *List;\r
EFI_STATUS Status;\r
UINTN ListLength;\r
- \r
+\r
List = &MnpServiceData->ChildrenList;\r
- \r
+\r
Status = NetDestroyLinkList (\r
List,\r
MnpDestoryChildEntry,\r
{\r
EFI_STATUS Status;\r
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;\r
- \r
+\r
Snp = MnpDeviceData->Snp;\r
ASSERT (Snp != NULL);\r
\r