Author: cgutman
Date: Thu May 21 04:54:10 2009
New Revision: 41024
URL:
http://svn.reactos.org/svn/reactos?rev=41024&view=rev
Log:
- The slot number passed directly to
NdisImmediateReadPciSlotInformation/NdisImmediateWritePciSlotInformation is ignored
according to MSDN so store a valid slot number in the wrapper context to use instead
Modified:
trunk/reactos/drivers/network/ndis/include/miniport.h
trunk/reactos/drivers/network/ndis/ndis/hardware.c
trunk/reactos/drivers/network/ndis/ndis/miniport.c
Modified: trunk/reactos/drivers/network/ndis/include/miniport.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/inclu…
==============================================================================
--- trunk/reactos/drivers/network/ndis/include/miniport.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/include/miniport.h [iso-8859-1] Thu May 21 04:54:10
2009
@@ -80,6 +80,7 @@
HANDLE RegistryHandle;
PDEVICE_OBJECT DeviceObject;
ULONG BusNumber;
+ ULONG SlotNumber;
} NDIS_WRAPPER_CONTEXT, *PNDIS_WRAPPER_CONTEXT;
#define GET_MINIPORT_DRIVER(Handle)((PNDIS_M_DRIVER_BLOCK)Handle)
Modified: trunk/reactos/drivers/network/ndis/ndis/hardware.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/hardware.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/hardware.c [iso-8859-1] Thu May 21 04:54:10
2009
@@ -28,8 +28,9 @@
IN ULONG Length)
{
PNDIS_WRAPPER_CONTEXT WrapperContext =
(PNDIS_WRAPPER_CONTEXT)WrapperConfigurationContext;
+ /* Slot number is ignored. */
return HalGetBusDataByOffset(PCIConfiguration, WrapperContext->BusNumber,
- SlotNumber, Buffer, Offset, Length);
+ WrapperContext->SlotNumber, Buffer, Offset, Length);
}
@@ -46,8 +47,9 @@
IN ULONG Length)
{
PNDIS_WRAPPER_CONTEXT WrapperContext =
(PNDIS_WRAPPER_CONTEXT)WrapperConfigurationContext;
+ /* Slot number is ignored. */
return HalSetBusDataByOffset(PCIConfiguration, WrapperContext->BusNumber,
- SlotNumber, Buffer, Offset, Length);
+ WrapperContext->SlotNumber, Buffer, Offset, Length);
}
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] Thu May 21 04:54:10
2009
@@ -1817,6 +1817,8 @@
Adapter->NdisMiniportBlock.SlotNumber = SlotNumber.u.AsULONG;
}
+ WrapperContext.SlotNumber = Adapter->NdisMiniportBlock.SlotNumber;
+
NdisCloseConfiguration(ConfigHandle);
/* Set handlers (some NDIS macros require these) */