summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
93d3b91)
- Forgot a file
svn path=/branches/wlan-bringup/; revision=54817
/* Check if the device name matches */
if (RtlEqualUnicodeString(&AdapterContext->DeviceName, DeviceName, TRUE))
{
/* 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;
}
CurrentEntry = CurrentEntry->Flink;
-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++;
/* Increment the open count */
AdapterContext->OpenCount++;
-
- /* Unlock if needed */
- if (!Locked)
- {
- KeReleaseSpinLock(&AdapterContext->Spinlock, OldIrql);
- }