]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/SnpDxe/Transmit.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / Network / SnpDxe / Transmit.c
index 73461bce42f4ae6ede98719e96117fac26dd5571..44fdd71f41a8e6dcbec26a01bbcb262eda26fbb8 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
     Implementation of transmitting a packet.\r
 /** @file\r
     Implementation of transmitting a packet.\r
\r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed \r
-and made available under the terms and conditions of the BSD License which \r
-accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
 \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) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 \r
 **/\r
 \r
@@ -186,7 +180,6 @@ PxeTransmit (
   (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb);\r
 \r
   DEBUG ((EFI_D_NET, "\nexit Snp->undi.transmit()  "));\r
   (*Snp->IssueUndi32Command) ((UINT64) (UINTN) &Snp->Cdb);\r
 \r
   DEBUG ((EFI_D_NET, "\nexit Snp->undi.transmit()  "));\r
-  DEBUG ((EFI_D_NET, "\nSnp->Cdb.StatCode == %r", Snp->Cdb.StatCode));\r
 \r
   //\r
   // we will unmap the buffers in get_status call, not here\r
 \r
   //\r
   // we will unmap the buffers in get_status call, not here\r
@@ -199,63 +192,68 @@ PxeTransmit (
   case PXE_STATCODE_QUEUE_FULL:\r
   case PXE_STATCODE_BUSY:\r
     Status = EFI_NOT_READY;\r
   case PXE_STATCODE_QUEUE_FULL:\r
   case PXE_STATCODE_BUSY:\r
     Status = EFI_NOT_READY;\r
+    DEBUG (\r
+      (EFI_D_NET,\r
+      "\nSnp->undi.transmit()  %xh:%xh\n",\r
+      Snp->Cdb.StatFlags,\r
+      Snp->Cdb.StatCode)\r
+      );\r
     break;\r
 \r
   default:\r
     break;\r
 \r
   default:\r
+    DEBUG (\r
+      (EFI_D_ERROR,\r
+      "\nSnp->undi.transmit()  %xh:%xh\n",\r
+      Snp->Cdb.StatFlags,\r
+      Snp->Cdb.StatCode)\r
+      );\r
     Status = EFI_DEVICE_ERROR;\r
   }\r
 \r
     Status = EFI_DEVICE_ERROR;\r
   }\r
 \r
-  DEBUG (\r
-    (EFI_D_ERROR,\r
-    "\nSnp->undi.transmit()  %xh:%xh\n",\r
-    Snp->Cdb.StatFlags,\r
-    Snp->Cdb.StatCode)\r
-    );\r
-\r
   return Status;\r
 }\r
 \r
 /**\r
   Places a packet in the transmit queue of a network interface.\r
   return Status;\r
 }\r
 \r
 /**\r
   Places a packet in the transmit queue of a network interface.\r
-  \r
+\r
   This function places the packet specified by Header and Buffer on the transmit\r
   This function places the packet specified by Header and Buffer on the transmit\r
-  queue. If HeaderSize is nonzero and HeaderSize is not equal to \r
-  This->Mode->MediaHeaderSize, then EFI_INVALID_PARAMETER will be returned. If \r
+  queue. If HeaderSize is nonzero and HeaderSize is not equal to\r
+  This->Mode->MediaHeaderSize, then EFI_INVALID_PARAMETER will be returned. If\r
   BufferSize is less than This->Mode->MediaHeaderSize, then EFI_BUFFER_TOO_SMALL\r
   BufferSize is less than This->Mode->MediaHeaderSize, then EFI_BUFFER_TOO_SMALL\r
-  will be returned. If Buffer is NULL, then EFI_INVALID_PARAMETER will be \r
+  will be returned. If Buffer is NULL, then EFI_INVALID_PARAMETER will be\r
   returned. If HeaderSize is nonzero and DestAddr or Protocol is NULL, then\r
   EFI_INVALID_PARAMETER will be returned. If the transmit engine of the network\r
   returned. If HeaderSize is nonzero and DestAddr or Protocol is NULL, then\r
   EFI_INVALID_PARAMETER will be returned. If the transmit engine of the network\r
-  interface is busy, then EFI_NOT_READY will be returned. If this packet can be \r
-  accepted by the transmit engine of the network interface, the packet contents \r
-  specified by Buffer will be placed on the transmit queue of the network \r
-  interface, and EFI_SUCCESS will be returned. GetStatus() can be used to \r
-  determine when the packet has actually been transmitted. The contents of the \r
-  Buffer must not be modified until the packet has actually been transmitted. \r
+  interface is busy, then EFI_NOT_READY will be returned. If this packet can be\r
+  accepted by the transmit engine of the network interface, the packet contents\r
+  specified by Buffer will be placed on the transmit queue of the network\r
+  interface, and EFI_SUCCESS will be returned. GetStatus() can be used to\r
+  determine when the packet has actually been transmitted. The contents of the\r
+  Buffer must not be modified until the packet has actually been transmitted.\r
   The Transmit() function performs nonblocking I/O. A caller who wants to perform\r
   The Transmit() function performs nonblocking I/O. A caller who wants to perform\r
-  blocking I/O, should call Transmit(), and then GetStatus() until the \r
+  blocking I/O, should call Transmit(), and then GetStatus() until the\r
   transmitted buffer shows up in the recycled transmit buffer.\r
   If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.\r
 \r
   @param This       A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.\r
   transmitted buffer shows up in the recycled transmit buffer.\r
   If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.\r
 \r
   @param This       A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.\r
-  @param HeaderSize The size, in bytes, of the media header to be filled in by the \r
+  @param HeaderSize The size, in bytes, of the media header to be filled in by the\r
                     Transmit() function. If HeaderSize is nonzero, then it must\r
                     be equal to This->Mode->MediaHeaderSize and the DestAddr and\r
                     Protocol parameters must not be NULL.\r
   @param BufferSize The size, in bytes, of the entire packet (media header and\r
                     data) to be transmitted through the network interface.\r
                     Transmit() function. If HeaderSize is nonzero, then it must\r
                     be equal to This->Mode->MediaHeaderSize and the DestAddr and\r
                     Protocol parameters must not be NULL.\r
   @param BufferSize The size, in bytes, of the entire packet (media header and\r
                     data) to be transmitted through the network interface.\r
-  @param Buffer     A pointer to the packet (media header followed by data) to be \r
-                    transmitted. This parameter cannot be NULL. If HeaderSize is \r
+  @param Buffer     A pointer to the packet (media header followed by data) to be\r
+                    transmitted. This parameter cannot be NULL. If HeaderSize is\r
                     zero, then the media header in Buffer must already be filled\r
                     zero, then the media header in Buffer must already be filled\r
-                    in by the caller. If HeaderSize is nonzero, then the media \r
+                    in by the caller. If HeaderSize is nonzero, then the media\r
                     header will be filled in by the Transmit() function.\r
                     header will be filled in by the Transmit() function.\r
-  @param SrcAddr    The source HW MAC address. If HeaderSize is zero, then this \r
-                    parameter is ignored. If HeaderSize is nonzero and SrcAddr \r
-                    is NULL, then This->Mode->CurrentAddress is used for the \r
+  @param SrcAddr    The source HW MAC address. If HeaderSize is zero, then this\r
+                    parameter is ignored. If HeaderSize is nonzero and SrcAddr\r
+                    is NULL, then This->Mode->CurrentAddress is used for the\r
                     source HW MAC address.\r
                     source HW MAC address.\r
-  @param DestAddr   The destination HW MAC address. If HeaderSize is zero, then \r
+  @param DestAddr   The destination HW MAC address. If HeaderSize is zero, then\r
                     this parameter is ignored.\r
                     this parameter is ignored.\r
-  @param Protocol   The type of header to build. If HeaderSize is zero, then this \r
-                    parameter is ignored. See RFC 1700, section "Ether Types," \r
+  @param Protocol   The type of header to build. If HeaderSize is zero, then this\r
+                    parameter is ignored. See RFC 1700, section "Ether Types,"\r
                     for examples.\r
 \r
   @retval EFI_SUCCESS           The packet was placed on the transmit queue.\r
                     for examples.\r
 \r
   @retval EFI_SUCCESS           The packet was placed on the transmit queue.\r