From bf1400b9ad386fef057b6f6e666d0d40b987bb2a Mon Sep 17 00:00:00 2001 From: sfu5 Date: Thu, 25 Apr 2013 01:18:58 +0000 Subject: [PATCH] Get ParentDevicePath by using attribute EFI_OPEN_PROTOCOL_GET_PROTOCOL instead of BY_CHILD. Signed-off-by: Fu Siyuan Reviewed-by: Ye Ting Reviewed-by: Ouyang Qian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14313 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Network/Tcp4Dxe/Tcp4Driver.c | 14 ++------------ NetworkPkg/TcpDxe/TcpDriver.c | 14 ++------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c index 76eac722cb..29a0cf76c2 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c @@ -1,7 +1,7 @@ /** @file Tcp driver function. -Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -607,7 +607,7 @@ Tcp4CreateSocketCallback ( (VOID **) &This->ParentDevicePath, TcpServiceData->DriverBindingHandle, This->SockHandle, - EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER + EFI_OPEN_PROTOCOL_GET_PROTOCOL ); if (EFI_ERROR (Status)) { gBS->CloseProtocol ( @@ -648,16 +648,6 @@ Tcp4DestroySocketCallback ( // RemoveEntryList (&This->Link); - // - // Close the device path protocol - // - gBS->CloseProtocol ( - TcpServiceData->ControllerHandle, - &gEfiDevicePathProtocolGuid, - TcpServiceData->DriverBindingHandle, - This->SockHandle - ); - // // Close the Ip4 protocol. // diff --git a/NetworkPkg/TcpDxe/TcpDriver.c b/NetworkPkg/TcpDxe/TcpDriver.c index 74af7969f7..f6cbcfee52 100644 --- a/NetworkPkg/TcpDxe/TcpDriver.c +++ b/NetworkPkg/TcpDxe/TcpDriver.c @@ -1,7 +1,7 @@ /** @file The driver binding and service binding protocol for the TCP driver. - Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -717,7 +717,7 @@ TcpCreateSocketCallback ( (VOID **) &This->ParentDevicePath, TcpServiceData->DriverBindingHandle, This->SockHandle, - EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER + EFI_OPEN_PROTOCOL_GET_PROTOCOL ); if (EFI_ERROR (Status)) { gBS->CloseProtocol ( @@ -765,16 +765,6 @@ TcpDestroySocketCallback ( // RemoveEntryList (&This->Link); - // - // Close the device path protocol - // - gBS->CloseProtocol ( - TcpServiceData->ControllerHandle, - &gEfiDevicePathProtocolGuid, - TcpServiceData->DriverBindingHandle, - This->SockHandle - ); - // // Close the IP protocol. // -- 2.39.2