Author: tfaber
Date: Sun Sep 6 14:35:20 2015
New Revision: 69055
URL:
http://svn.reactos.org/svn/reactos?rev=69055&view=rev
Log:
[NDIS]
- Better stub power IRP handling. Failing IRP_MN_SET_POWER is illegal!
CORE-10117
Modified:
trunk/reactos/drivers/network/ndis/ndis/miniport.c
Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Sun Sep 6 14:35:20
2015
@@ -2400,6 +2400,19 @@
NTSTATUS
NTAPI
+NdisIPower(
+ _In_ PDEVICE_OBJECT DeviceObject,
+ _In_ PIRP Irp)
+{
+ PLOGICAL_ADAPTER Adapter = DeviceObject->DeviceExtension;
+
+ PoStartNextPowerIrp(Irp);
+ IoSkipCurrentIrpStackLocation(Irp);
+ return PoCallDriver(Adapter->NdisMiniportBlock.NextDeviceObject, Irp);
+}
+
+NTSTATUS
+NTAPI
NdisIAddDevice(
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject)
@@ -2580,6 +2593,12 @@
{
return NdisIDeviceIoControl(DeviceObject, Irp);
}
+ else if (IrpSp->MajorFunction == IRP_MJ_POWER)
+ {
+ return NdisIPower(DeviceObject, Irp);
+ }
+ NDIS_DbgPrint(MIN_TRACE, ("Unexpected IRP MajorFunction 0x%x\n",
IrpSp->MajorFunction));
+ ASSERT(FALSE);
}
else if (DeviceObject->DeviceType == FILE_DEVICE_NETWORK)
{