mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
[NDIS]
- Fix a critical bug in NdisMGetDmaAlignment which was causing every NIC driver calling this function to crash because we thought we were passed an NDIS_DMA_BLOCK handle when in fact we receive an NDIS_MINIPORT_BLOCK handle - Fixes RTL8169 and 3Com NICs (and probably several more) [bug 6651 and bug 4330] svn path=/trunk/; revision=54372
This commit is contained in:
@@ -831,6 +831,7 @@ EXPORT
|
||||
NdisMReadDmaCounter(
|
||||
IN NDIS_HANDLE MiniportDmaHandle)
|
||||
{
|
||||
/* NOTE: Unlike NdisMGetDmaAlignment() below, this is a handle to the DMA block */
|
||||
PNDIS_DMA_BLOCK DmaBlock = MiniportDmaHandle;
|
||||
PDMA_ADAPTER AdapterObject = (PDMA_ADAPTER)DmaBlock->SystemAdapterObject;
|
||||
|
||||
@@ -846,10 +847,11 @@ NdisMReadDmaCounter(
|
||||
ULONG
|
||||
EXPORT
|
||||
NdisMGetDmaAlignment(
|
||||
IN NDIS_HANDLE MiniportDmaHandle)
|
||||
IN NDIS_HANDLE MiniportAdapterHandle)
|
||||
{
|
||||
PNDIS_DMA_BLOCK DmaBlock = MiniportDmaHandle;
|
||||
PDMA_ADAPTER AdapterObject = (PDMA_ADAPTER)DmaBlock->SystemAdapterObject;
|
||||
/* NOTE: Unlike NdisMReadDmaCounter() above, this is a handle to the NDIS miniport block */
|
||||
PLOGICAL_ADAPTER Adapter = MiniportAdapterHandle;
|
||||
PDMA_ADAPTER AdapterObject = (PDMA_ADAPTER)Adapter->NdisMiniportBlock.SystemAdapterObject;
|
||||
|
||||
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user