]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c
NetLib:
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Driver.c
index d4ea65d723d3e3e61aece2c325ecfab94c3d6455..cffd53e9a8e2030664629388b5c5859e3fc3d5b7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Tcp driver function.\r
 \r
-Copyright (c) 2005 - 2007, Intel Corporation<BR>\r
+Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
 All rights reserved. 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
@@ -303,7 +303,11 @@ Tcp4DriverBindingStart (
   //\r
   // Create a new IP IO to Consume it\r
   //\r
-  TcpServiceData->IpIo = IpIoCreate (This->DriverBindingHandle, ControllerHandle);\r
+  TcpServiceData->IpIo = IpIoCreate (\r
+                           This->DriverBindingHandle,\r
+                           ControllerHandle,\r
+                           IP_VERSION_4\r
+                           );\r
   if (NULL == TcpServiceData->IpIo) {\r
 \r
     DEBUG ((EFI_D_ERROR, "Tcp4DriverBindingStart: Have no enough"\r
@@ -318,8 +322,13 @@ Tcp4DriverBindingStart (
   //\r
   ZeroMem (&OpenData, sizeof (IP_IO_OPEN_DATA));\r
 \r
-  CopyMem (&OpenData.IpConfigData, &mIpIoDefaultIpConfigData, sizeof (OpenData.IpConfigData));\r
-  OpenData.IpConfigData.DefaultProtocol = EFI_IP_PROTO_TCP;\r
+  CopyMem (\r
+    &OpenData.IpConfigData.Ip4CfgData,\r
+    &mIp4IoDefaultIpConfigData,\r
+    sizeof (EFI_IP4_CONFIG_DATA)\r
+    );\r
+\r
+  OpenData.IpConfigData.Ip4CfgData.DefaultProtocol = EFI_IP_PROTO_TCP;\r
 \r
   OpenData.PktRcvdNotify = Tcp4RxCallback;\r
   Status                 = IpIoOpen (TcpServiceData->IpIo, &OpenData);\r