mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 04:14:53 +00:00
[NTOSKRNL] IopGetDeviceProperty: Initialize power data struct and convert flags from device capabilities to power data
This commit is contained in:
parent
3f9f5f7080
commit
06e7233134
1 changed files with 25 additions and 7 deletions
|
@ -365,15 +365,33 @@ IopGetDeviceProperty(PPLUGPLAY_CONTROL_PROPERTY_DATA PropertyData)
|
||||||
// Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities);
|
// Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities);
|
||||||
|
|
||||||
PowerData = (PCM_POWER_DATA)Buffer;
|
PowerData = (PCM_POWER_DATA)Buffer;
|
||||||
|
|
||||||
|
RtlZeroMemory(PowerData, sizeof(CM_POWER_DATA));
|
||||||
PowerData->PD_Size = sizeof(CM_POWER_DATA);
|
PowerData->PD_Size = sizeof(CM_POWER_DATA);
|
||||||
|
// PowerData->PD_MostRecentPowerState;
|
||||||
|
PowerData->PD_Capabilities = PDCAP_D0_SUPPORTED | PDCAP_D3_SUPPORTED;
|
||||||
/*
|
/*
|
||||||
PowerData->PD_MostRecentPowerState;
|
if (DeviceCapabilities.DeviceD1)
|
||||||
PowerData->PD_Capabilities;
|
PowerData->PD_Capabilities |= PDCAP_D1_SUPPORTED;
|
||||||
PowerData->PD_D1Latency;
|
if (DeviceCapabilities.DeviceD2)
|
||||||
PowerData->PD_D2Latency;
|
PowerData->PD_Capabilities |= PDCAP_D2_SUPPORTED;
|
||||||
PowerData->PD_D3Latency;
|
if (DeviceCapabilities.WakeFromD0)
|
||||||
PowerData->PD_PowerStateMapping[POWER_SYSTEM_MAXIMUM];
|
PowerData->PD_Capabilities |= PDCAP_WAKE_FROM_D0_SUPPORTED;
|
||||||
PowerData->PD_DeepestSystemWake;
|
if (DeviceCapabilities.WakeFromD1)
|
||||||
|
PowerData->PD_Capabilities |= PDCAP_WAKE_FROM_D1_SUPPORTED;
|
||||||
|
if (DeviceCapabilities.WakeFromD2)
|
||||||
|
PowerData->PD_Capabilities |= PDCAP_WAKE_FROM_D2_SUPPORTED;
|
||||||
|
if (DeviceCapabilities.WakeFromD3)
|
||||||
|
PowerData->PD_Capabilities |= PDCAP_WAKE_FROM_D3_SUPPORTED;
|
||||||
|
if (DeviceCapabilities.WarmEjectSupported)
|
||||||
|
PowerData->PD_Capabilities |= PDCAP_WARM_EJECT_SUPPORTED;
|
||||||
|
PowerData->PD_D1Latency = DeviceCapabilities.D1Latency;
|
||||||
|
PowerData->PD_D2Latency = DeviceCapabilities.D2Latency;
|
||||||
|
PowerData->PD_D3Latency = DeviceCapabilities.D3Latency;
|
||||||
|
RtlCopyMemory(&PowerData->PD_PowerStateMapping,
|
||||||
|
&DeviceCapabilities.DeviceState,
|
||||||
|
sizeof(DeviceCapabilities.DeviceState));
|
||||||
|
PowerData->PD_DeepestSystemWake = DeviceCapabilities.SystemWake;
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue