[NDIS]
authorCameron Gutman <aicommander@gmail.com>
Sun, 18 May 2014 08:43:31 +0000 (08:43 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sun, 18 May 2014 08:43:31 +0000 (08:43 +0000)
- Restore the pending NDIS request before calling the completion routine
- Fixes crash with Broadcom 57xx drivers (link detection still not working)

svn path=/trunk/; revision=63348

reactos/drivers/network/ndis/ndis/miniport.c

index 3119e6f..f84df4e 100644 (file)
@@ -1317,10 +1317,11 @@ MiniportWorker(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
             if (NdisStatus == NDIS_STATUS_PENDING)
               break;
 
+            Adapter->NdisMiniportBlock.PendingRequest = (PNDIS_REQUEST)WorkItemContext;
             switch (((PNDIS_REQUEST)WorkItemContext)->RequestType)
               {
                 case NdisRequestQueryInformation:
-                 NdisMQueryInformationComplete((NDIS_HANDLE)Adapter, NdisStatus);
+                  NdisMQueryInformationComplete((NDIS_HANDLE)Adapter, NdisStatus);
                   break;
 
                 case NdisRequestSetInformation:
@@ -1331,6 +1332,7 @@ MiniportWorker(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
                   NDIS_DbgPrint(MIN_TRACE, ("Unknown NDIS request type.\n"));
                   break;
               }
+            Adapter->NdisMiniportBlock.PendingRequest = NULL;
             break;
 
           default: