mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +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:
parent
edc6eb9eca
commit
6735cfc56e
1 changed files with 5 additions and 3 deletions
|
@ -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"));
|
||||
|
||||
|
|
Loading…
Reference in a new issue