]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
BaseTools:Change the path of the file that Binary Cache
[mirror_edk2.git] / MdeModulePkg / Universal / Network / MnpDxe / MnpConfig.c
index d1a4cb5dd2a3103727e833cad59d05e9a9b17a42..5906ad546fb2a8b6c1266292abde92810ab2b2b4 100644 (file)
@@ -1,15 +1,8 @@
 /** @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
@@ -235,7 +228,7 @@ MnpAddFreeTxBuf (
 \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
@@ -255,7 +248,7 @@ MnpAddFreeTxBuf (
 \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
@@ -274,7 +267,7 @@ MnpAllocTxBuf (
   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
@@ -369,7 +362,7 @@ MnpFreeTxBuf (
       );\r
     return;\r
   }\r
-  \r
+\r
   OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
   InsertTailList (&MnpDeviceData->FreeTxBufList, &TxBufWrap->WrapEntry);\r
   TxBufWrap->InUse = FALSE;\r
@@ -877,7 +870,7 @@ MnpDestroyServiceData (
 \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
@@ -917,9 +910,9 @@ MnpDestroyServiceChild (
   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
@@ -1160,7 +1153,7 @@ MnpStopSnp (
 {\r
   EFI_STATUS  Status;\r
   EFI_SIMPLE_NETWORK_PROTOCOL     *Snp;\r
-  \r
+\r
   Snp = MnpDeviceData->Snp;\r
   ASSERT (Snp != NULL);\r
 \r