]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
NetworkPkg/UefiPxeBcDxe: Fix various typos
[mirror_edk2.git] / NetworkPkg / UefiPxeBcDxe / PxeBcImpl.c
index 13396903f5853176d55667488ff4095641f4842f..5d18207b6ce8bdec04dfac94d8d4612a707d7ae9 100644 (file)
@@ -3,13 +3,7 @@
 \r
   Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\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
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -210,7 +204,7 @@ EfiPxeBcStart (
     //the active state, If the DHCP4 D.O.R.A started by IP4 auto\r
     //configuration and has not been completed, the Dhcp4 state machine\r
     //will not be in the right state for the PXE to start a new round D.O.R.A.\r
-    //so we need to switch it's policy to static.\r
+    //so we need to switch its policy to static.\r
     //\r
     Status = PxeBcSetIp4Policy (Private);\r
     if (EFI_ERROR (Status)) {\r
@@ -637,7 +631,7 @@ EfiPxeBcDiscover (
       }\r
       if (Index != Info->IpCnt) {\r
         //\r
-        // It's invalid if the first server doesn't accecpt any response\r
+        // It's invalid if the first server doesn't accept any response\r
         // but any of the other servers does accept any response.\r
         //\r
         Status = EFI_INVALID_PARAMETER;\r
@@ -849,7 +843,7 @@ EfiPxeBcMtftp (
   VOID                            *Config;\r
   EFI_STATUS                      Status;\r
   EFI_PXE_BASE_CODE_IP_FILTER     IpFilter;\r
-\r
+  UINTN                           WindowSize;\r
 \r
   if ((This == NULL) ||\r
       (Filename == NULL) ||\r
@@ -873,6 +867,11 @@ EfiPxeBcMtftp (
   Private   = PXEBC_PRIVATE_DATA_FROM_PXEBC (This);\r
   Mode      = Private->PxeBc.Mode;\r
 \r
+  //\r
+  // Get PcdPxeTftpWindowSize.\r
+  //\r
+  WindowSize = (UINTN) PcdGet64 (PcdPxeTftpWindowSize);\r
+\r
   if (Mode->UsingIpv6) {\r
     if (!NetIp6IsValidUnicast (&ServerIp->v6)) {\r
       return EFI_INVALID_PARAMETER;\r
@@ -930,6 +929,7 @@ EfiPxeBcMtftp (
                Config,\r
                Filename,\r
                BlockSize,\r
+               (WindowSize > 1) ? &WindowSize : NULL,\r
                BufferSize\r
                );\r
 \r
@@ -944,6 +944,7 @@ EfiPxeBcMtftp (
                Config,\r
                Filename,\r
                BlockSize,\r
+               (WindowSize > 1) ? &WindowSize : NULL,\r
                BufferPtr,\r
                BufferSize,\r
                DontUseBuffer\r
@@ -976,6 +977,7 @@ EfiPxeBcMtftp (
                Config,\r
                Filename,\r
                BlockSize,\r
+               (WindowSize > 1) ? &WindowSize : NULL,\r
                BufferPtr,\r
                BufferSize,\r
                DontUseBuffer\r
@@ -1408,7 +1410,7 @@ EfiPxeBcUdpRead (
 \r
   if (IsMatched) {\r
     //\r
-    // Copy the rececived packet to user if matched by filter.\r
+    // Copy the received packet to user if matched by filter.\r
     //\r
     if (Mode->UsingIpv6) {\r
       Udp6Rx = Udp6Token.Packet.RxData;\r
@@ -1683,7 +1685,7 @@ EfiPxeBcSetIpFilter (
         for (Index = 0; Index < NewFilter->IpCnt; ++Index) {\r
           if (IP4_IS_MULTICAST (EFI_NTOHL (NewFilter->IpList[Index].v4))) {\r
             //\r
-            // Join the mutilcast group.\r
+            // Join the multicast group.\r
             //\r
             Status = Private->Udp4Read->Groups (Private->Udp4Read, TRUE, &NewFilter->IpList[Index].v4);\r
             if (EFI_ERROR (Status)) {\r
@@ -1721,7 +1723,7 @@ EfiPxeBcSetIpFilter (
         for (Index = 0; Index < NewFilter->IpCnt; ++Index) {\r
           if (IP6_IS_MULTICAST (&NewFilter->IpList[Index].v6)) {\r
             //\r
-            // Join the mutilcast group.\r
+            // Join the multicast group.\r
             //\r
             Status = Private->Udp6Read->Groups (Private->Udp6Read, TRUE, &NewFilter->IpList[Index].v6);\r
             if (EFI_ERROR (Status)) {\r