mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[NDISUIO]
- Forgot a file svn path=/branches/wlan-bringup/; revision=54817
This commit is contained in:
@@ -27,19 +27,8 @@ FindAdapterContextByName(PNDIS_STRING DeviceName)
|
||||
/* Check if the device name matches */
|
||||
if (RtlEqualUnicodeString(&AdapterContext->DeviceName, DeviceName, TRUE))
|
||||
{
|
||||
KeAcquireSpinLockAtDpcLevel(&AdapterContext->Spinlock);
|
||||
|
||||
/* Check that it's not being destroyed */
|
||||
if (AdapterContext->OpenCount > 0)
|
||||
{
|
||||
KeReleaseSpinLockFromDpcLevel(&AdapterContext->Spinlock);
|
||||
KeReleaseSpinLock(&GlobalAdapterListLock, OldIrql);
|
||||
return AdapterContext;
|
||||
}
|
||||
else
|
||||
{
|
||||
KeReleaseSpinLockFromDpcLevel(&Adaptercontext->Spinlock);
|
||||
}
|
||||
KeReleaseSpinLock(&GlobalAdapterListLock, OldIrql);
|
||||
return AdapterContext;
|
||||
}
|
||||
|
||||
CurrentEntry = CurrentEntry->Flink;
|
||||
@@ -50,24 +39,10 @@ FindAdapterContextByName(PNDIS_STRING DeviceName)
|
||||
}
|
||||
|
||||
VOID
|
||||
ReferenceAdapterContext(PNDISUIO_ADAPTER_CONTEXT AdapterContext, BOOLEAN Locked)
|
||||
ReferenceAdapterContext(PNDISUIO_ADAPTER_CONTEXT AdapterContext)
|
||||
{
|
||||
KIRQL OldIrql;
|
||||
|
||||
/* Lock if needed */
|
||||
if (!Locked)
|
||||
{
|
||||
KeAcquireSpinLock(&AdapterContext->Spinlock, &OldIrql);
|
||||
}
|
||||
|
||||
/* Increment the open count */
|
||||
AdapterContext->OpenCount++;
|
||||
|
||||
/* Unlock if needed */
|
||||
if (!Locked)
|
||||
{
|
||||
KeReleaseSpinLock(&AdapterContext->Spinlock, OldIrql);
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
|
||||
Reference in New Issue
Block a user