[NDIS]
authorThomas Faber <thomas.faber@reactos.org>
Fri, 22 Sep 2017 07:28:29 +0000 (07:28 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 22 Sep 2017 07:28:29 +0000 (07:28 +0000)
- Don't assert on unimplemented ioctl. Print the control code instead.
CORE-7630

svn path=/trunk/; revision=75921

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

index 5cc9201..b20701e 100644 (file)
@@ -2293,13 +2293,15 @@ NdisIDeviceIoControl(
   PLOGICAL_ADAPTER Adapter = (PLOGICAL_ADAPTER)DeviceObject->DeviceExtension;
   PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
   NDIS_STATUS Status = STATUS_NOT_SUPPORTED;
+  ULONG ControlCode;
   ULONG Written;
 
   Irp->IoStatus.Information = 0;
 
   ASSERT(Adapter);
 
-  switch (Stack->Parameters.DeviceIoControl.IoControlCode)
+  ControlCode = Stack->Parameters.DeviceIoControl.IoControlCode;
+  switch (ControlCode)
   {
     case IOCTL_NDIS_QUERY_GLOBAL_STATS:
       Status = MiniQueryInformation(Adapter,
@@ -2311,7 +2313,7 @@ NdisIDeviceIoControl(
       break;
 
     default:
-      ASSERT(FALSE);
+      NDIS_DbgPrint(MIN_TRACE, ("NdisIDeviceIoControl: unsupported control code 0x%lx\n", ControlCode));
       break;
   }