Author: cgutman
Date: Mon Jun 1 23:10:49 2009
New Revision: 41240
URL:
http://svn.reactos.org/svn/reactos?rev=41240&view=rev
Log:
- Register a device interface for each miniport
Modified:
trunk/reactos/drivers/network/ndis/include/ndissys.h
trunk/reactos/drivers/network/ndis/ndis/miniport.c
Modified: trunk/reactos/drivers/network/ndis/include/ndissys.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/inclu…
==============================================================================
--- trunk/reactos/drivers/network/ndis/include/ndissys.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/include/ndissys.h [iso-8859-1] Mon Jun 1 23:10:49
2009
@@ -18,6 +18,7 @@
#include <afilter.h>
#include <atm.h>
#include <ndistapi.h>
+#include <ndisguid.h>
struct _ADAPTER_BINDING;
Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Mon Jun 1 23:10:49
2009
@@ -1913,6 +1913,8 @@
Adapter->NdisMiniportBlock.OldPnPDeviceState =
Adapter->NdisMiniportBlock.PnPDeviceState;
Adapter->NdisMiniportBlock.PnPDeviceState = NdisPnPDeviceStarted;
+ IoSetDeviceInterfaceState(&Adapter->NdisMiniportBlock.SymbolicLinkName, TRUE);
+
Timeout.QuadPart = Int32x32To64(Adapter->NdisMiniportBlock.CheckForHangSeconds,
-1000000);
KeSetTimerEx(&Adapter->NdisMiniportBlock.WakeUpDpcTimer.Timer, Timeout,
Adapter->NdisMiniportBlock.CheckForHangSeconds * 1000,
@@ -1950,6 +1952,8 @@
KeCancelTimer(&Adapter->NdisMiniportBlock.WakeUpDpcTimer.Timer);
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.HaltHandler)(Adapter);
+
+ IoSetDeviceInterfaceState(&Adapter->NdisMiniportBlock.SymbolicLinkName, FALSE);
if (Adapter->NdisMiniportBlock.AllocatedResources)
{
@@ -2220,10 +2224,22 @@
Adapter = (PLOGICAL_ADAPTER)DeviceObject->DeviceExtension;
KeInitializeSpinLock(&Adapter->NdisMiniportBlock.Lock);
InitializeListHead(&Adapter->ProtocolListHead);
+
+ Status = IoRegisterDeviceInterface(PhysicalDeviceObject,
+ &GUID_DEVINTERFACE_NET,
+ NULL,
+
&Adapter->NdisMiniportBlock.SymbolicLinkName);
+
+ if (!NT_SUCCESS(Status))
+ {
+ NDIS_DbgPrint(MIN_TRACE, ("Could not create device interface.\n"));
+ IoDeleteDevice(DeviceObject);
+ RtlFreeUnicodeString(&ExportName);
+ return Status;
+ }
+
Adapter->NdisMiniportBlock.DriverHandle = Miniport;
-
Adapter->NdisMiniportBlock.MiniportName = ExportName;
-
Adapter->NdisMiniportBlock.DeviceObject = DeviceObject;
Adapter->NdisMiniportBlock.PhysicalDeviceObject = PhysicalDeviceObject;
Adapter->NdisMiniportBlock.NextDeviceObject =