Author: cgutman
Date: Wed Oct 1 21:13:19 2008
New Revision: 36621
URL:
http://svn.reactos.org/svn/reactos?rev=36621&view=rev
Log:
- Adapter is PLOGICAL_ADAPTER not PNDIS_MINIPORT_BLOCK
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/hardware.c
branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/hardware.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/hardware.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/hardware.c [iso-8859-1] Wed Oct
1 21:13:19 2008
@@ -57,20 +57,20 @@
NDIS_STATUS
EXPORT
NdisMPciAssignResources(
- IN NDIS_HANDLE MiniportHandle,
+ IN NDIS_HANDLE MiniportAdapterHandle,
IN ULONG SlotNumber,
OUT PNDIS_RESOURCE_LIST *AssignedResources)
{
- PNDIS_MINIPORT_BLOCK MiniportBlock = (PNDIS_MINIPORT_BLOCK)MiniportHandle;
-
- if (MiniportBlock->BusType != PCIBus ||
- MiniportBlock->AllocatedResources == NULL)
+ PLOGICAL_ADAPTER Adapter = MiniportAdapterHandle;
+
+ if (Adapter->NdisMiniportBlock.BusType != PCIBus ||
+ Adapter->NdisMiniportBlock.AllocatedResources == NULL)
{
*AssignedResources = NULL;
return NDIS_STATUS_FAILURE;
}
- *AssignedResources =
&MiniportBlock->AllocatedResources->List[0].PartialResourceList;
+ *AssignedResources =
&Adapter->NdisMiniportBlock.AllocatedResources->List[0].PartialResourceList;
return NDIS_STATUS_SUCCESS;
}
@@ -99,7 +99,7 @@
*/
{
PNDIS_WRAPPER_CONTEXT WrapperContext =
(PNDIS_WRAPPER_CONTEXT)WrapperConfigurationContext;
- PNDIS_MINIPORT_BLOCK MiniportBlock =
WrapperContext->DeviceObject->DeviceExtension;
+ PLOGICAL_ADAPTER Adapter = WrapperContext->DeviceObject->DeviceExtension;
ULONG ResourceListSize;
PAGED_CODE();
@@ -107,7 +107,7 @@
NDIS_DbgPrint(MAX_TRACE, ("Called\n"));
- if (MiniportBlock->AllocatedResources == NULL)
+ if (Adapter->NdisMiniportBlock.AllocatedResources == NULL)
{
NDIS_DbgPrint(MIN_TRACE, ("No allocated resources!\n"));
*Status = NDIS_STATUS_FAILURE;
@@ -116,13 +116,13 @@
ResourceListSize =
FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors) +
- MiniportBlock->AllocatedResources->List[0].PartialResourceList.Count *
+
Adapter->NdisMiniportBlock.AllocatedResources->List[0].PartialResourceList.Count *
sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
if (*BufferSize >= ResourceListSize)
{
RtlCopyMemory(ResourceList,
-
&MiniportBlock->AllocatedResources->List[0].PartialResourceList,
+
&Adapter->NdisMiniportBlock.AllocatedResources->List[0].PartialResourceList,
ResourceListSize);
*BufferSize = ResourceListSize;
*Status = NDIS_STATUS_SUCCESS;
@@ -196,10 +196,10 @@
IN PVOID Buffer,
IN ULONG Length)
{
- PNDIS_MINIPORT_BLOCK Adapter = (PNDIS_MINIPORT_BLOCK)NdisAdapterHandle;
+ PLOGICAL_ADAPTER Adapter = NdisAdapterHandle;
/* Slot number is ignored since W2K for all NDIS drivers. */
return HalGetBusDataByOffset(PCIConfiguration,
- Adapter->BusNumber, Adapter->SlotNumber,
+ Adapter->NdisMiniportBlock.BusNumber,
Adapter->NdisMiniportBlock.SlotNumber,
Buffer, Offset, Length);
}
@@ -216,10 +216,10 @@
IN PVOID Buffer,
IN ULONG Length)
{
- PNDIS_MINIPORT_BLOCK Adapter = (PNDIS_MINIPORT_BLOCK)NdisAdapterHandle;
+ PLOGICAL_ADAPTER Adapter = NdisAdapterHandle;
/* Slot number is ignored since W2K for all NDIS drivers. */
return HalSetBusDataByOffset(PCIConfiguration,
- Adapter->BusNumber, Adapter->SlotNumber,
+ Adapter->NdisMiniportBlock.BusNumber,
Adapter->NdisMiniportBlock.SlotNumber,
Buffer, Offset, Length);
}
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c [iso-8859-1] Wed Oct 1
21:13:19 2008
@@ -216,15 +216,15 @@
* - Called at IRQL = DISPATCH_LEVEL
*/
{
- PNDIS_MINIPORT_BLOCK Adapter = (PNDIS_MINIPORT_BLOCK)Context;
-
- NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
-
- Adapter->MapRegisters[Adapter->CurrentMapRegister].MapRegister =
MapRegisterBase;
+ PLOGICAL_ADAPTER Adapter = Context;
+
+ NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
+
+
Adapter->NdisMiniportBlock.MapRegisters[Adapter->NdisMiniportBlock.CurrentMapRegister].MapRegister
= MapRegisterBase;
NDIS_DbgPrint(MAX_TRACE, ("setting event and leaving.\n"));
- KeSetEvent(Adapter->AllocationEvent, 0, FALSE);
+ KeSetEvent(Adapter->NdisMiniportBlock.AllocationEvent, 0, FALSE);
/* this is only the thing to do for busmaster NICs */
return DeallocateObjectKeepRegisters;