]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/TcpDxe/TcpDispatcher.c
NetworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / TcpDxe / TcpDispatcher.c
index d4bc8ace5597604a0b6e0279efdaa64289690307..86beaf8cc513a37722131fd0727f2f6964316b01 100644 (file)
@@ -2,15 +2,9 @@
   The implementation of a dispatch routine for processing TCP requests.\r
 \r
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 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
@@ -360,7 +354,7 @@ TcpAttachPcb (
   } else {\r
     IpProtocolGuid = &gEfiIp6ProtocolGuid;\r
   }\r
-  \r
+\r
   Tcb = AllocateZeroPool (sizeof (TCP_CB));\r
 \r
   if (Tcb == NULL) {\r
@@ -398,7 +392,7 @@ TcpAttachPcb (
     IpIoRemoveIp (IpIo, Tcb->IpInfo);\r
     return Status;\r
   }\r
-  \r
+\r
   InitializeListHead (&Tcb->List);\r
   InitializeListHead (&Tcb->SndQue);\r
   InitializeListHead (&Tcb->RcvQue);\r
@@ -423,14 +417,7 @@ TcpDetachPcb (
 {\r
   TCP_PROTO_DATA   *ProtoData;\r
   TCP_CB           *Tcb;\r
-  EFI_GUID         *IpProtocolGuid;\r
 \r
-  if (Sk->IpVersion == IP_VERSION_4) {\r
-    IpProtocolGuid = &gEfiIp4ProtocolGuid;\r
-  } else {\r
-    IpProtocolGuid = &gEfiIp6ProtocolGuid;\r
-  }\r
-  \r
   ProtoData = (TCP_PROTO_DATA *) Sk->ProtoReserved;\r
   Tcb       = ProtoData->TcpPcb;\r
 \r
@@ -438,16 +425,6 @@ TcpDetachPcb (
 \r
   TcpFlushPcb (Tcb);\r
 \r
-  //\r
-  // Close the IP protocol.\r
-  //\r
-  gBS->CloseProtocol (\r
-         Tcb->IpInfo->ChildHandle,\r
-         IpProtocolGuid,\r
-         ProtoData->TcpService->IpIo->Image,\r
-         Sk->SockHandle\r
-         );\r
-  \r
   IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo);\r
 \r
   FreePool (Tcb);\r