NDIS6.30 driver, why there is no PowerManagement tab on ModernStandby platform.

Fay Zhang 0 Reputation points
2023-01-12T03:19:33.7166667+00:00
Hi ,

    I'm writting NDIS6.30 miniport driver for ethernet NIC, running on windows10/11 ModernStandby platform.But I can't find PowerManagement tab on Device Property from DeviceManager unless I add the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PlatformAoAcOverride = 0.

    Without this registry, I can't find PowerManagement tab on Device Property  from DeviceManager. OS doesn't issue OID_PM_PARAMETERS to enable Wake On Lan.

    My miniport driver implements these power management relevant OIDs:

OID_PM_HARDWARE_CAPABILITIES,

OID_PM_ADD_WOL_PATTERN,

OID_PM_REMOVE_WOL_PATTERN,

OID_PM_PARAMETERS,

OID_PM_WOL_PATTERN_LIST,

OID_PM_ADD_PROTOCOL_OFFLOAD,

OID_PM_REMOVE_PROTOCOL_OFFLOAD,

OID_PM_PROTOCOL_OFFLOAD_LIST

    From OID_PM_HARDWARE_CAPABILITIES, my miniport driver reports:

    IN PNDIS_PM_CAPABILITIES   pPMCapabilities;

    NdisZeroMemory(pPMCapabilities, NDIS_SIZEOF_NDIS_PM_CAPABILITIES_REVISION_2);

    pPMCapabilities->Header.Revision = NDIS_PM_CAPABILITIES_REVISION_2;

    pPMCapabilities->Header.Type = NDIS_OBJECT_TYPE_DEFAULT;

    pPMCapabilities->Header.Size = NDIS_SIZEOF_NDIS_PM_CAPABILITIES_REVISION_2;

    pPMCapabilities->SupportedWoLPacketPatterns |= NDIS_PM_WOL_BITMAP_PATTERN_SUPPORTED;

    pPMCapabilities->SupportedWoLPacketPatterns |= NDIS_PM_WOL_MAGIC_PACKET_SUPPORTED;

    pPMCapabilities->SupportedWoLPacketPatterns |= NDIS_PM_WOL_IPV4_TCP_SYN_SUPPORTED;

    pPMCapabilities->SupportedWoLPacketPatterns |= NDIS_PM_WOL_IPV6_TCP_SYN_SUPPORTED;

    pPMCapabilities->SupportedWoLPacketPatterns |= NDIS_PM_WOL_IPV4_DEST_ADDR_WILDCARD_SUPPORTED;

    pPMCapabilities->SupportedWoLPacketPatterns |= NDIS_PM_WOL_IPV6_DEST_ADDR_WILDCARD_SUPPORTED;

    pPMCapabilities->NumTotalWoLPatterns = pPoMgmt->MaxPatternCount;

    pPMCapabilities->MaxWoLPatternSize = MAX_PATTERN_SIZE; // maximum bytes that can be compared against a pattern.

    pPMCapabilities->MaxWoLPatternOffset = 0; // strting from MAC header, how many bytes in the packet can be examined.

    pPMCapabilities->MaxWoLPacketSaveBuffer = MAX_WPI_LENGTH_SIZE; // how many bytes of WOL packet can be saved to a buffer and indicated up.

    pPMCapabilities->MinMagicPacketWakeUp = NdisDeviceStateD3;

    pPMCapabilities->MinPatternWakeUp = NdisDeviceStateD3; 

    pPMCapabilities->MinLinkChangeWakeUp = NdisDeviceStateD0;

    pPMCapabilities->SupportedProtocolOffloads |= NDIS_PM_PROTOCOL_OFFLOAD_ARP_SUPPORTED;

    pPMCapabilities->NumArpOffloadIPv4Addresses = MAX_LPP_ARP_OFFLOAD_COUNT;

    pPMCapabilities->SupportedProtocolOffloads |= NDIS_PM_PROTOCOL_OFFLOAD_NS_SUPPORTED;

    pPMCapabilities->NumNSOffloadIPv6Addresses = MAX_LPP_NS_OFFLOAD_COUNT;

    pPMCapabilities->Flags |= NDIS_PM_WAKE_PACKET_INDICATION_SUPPORTED;

    pPMCapabilities->MediaSpecificWakeUpEvents = 0;

From MiniportInitialize I report the same capability, too:

    GeneralAttributes.PowerManagementCapabilitiesEx = &PMCapabilities;

    ...... // Other initialization.

     NdisMSetMiniportAttributes(MiniportAdapterHandle,  (PNDIS_MINIPORT_ADAPTER_ATTRIBUTES)&GeneralAttributes);

    But unfortunately, with this NDIS6.30 miniport driver, I can't find PowerManagement tab on Device Property  from DeviceManager unless I add the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PlatformAoAcOverride = 0.

  After adding this registry, I can see PowerManagement tab. OID_PM_PARAMETERS will be issued when I put os to hibernate. And WakeOnLan works well.

  But this registery will disable ModerStandby. This is unacceptable. 

  Any suggestions how I can get the PowerManagement tab from DeviceManager on ModernStandby platform with my NDIS6.30 miniport NIC driver will be so appreciated. 

    Or any special keywords I should put in inf ?

    Thanks a lot in advance.

Best Regards,

Fay Zhang.

PS: this question is moved from 
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Fay Zhang 0 Reputation points
    2023-01-12T07:43:02.07+00:00

    User's image

    Attatched the WakeOnLan workflow here. Thanks a lot.

    0 comments No comments

  2. Fay Zhang 0 Reputation points
    2023-01-12T07:55:22.22+00:00
    May I know how I can get the PowerManagement tab from DeviceManager on this ModernStandby platform with my NDIS6.30 miniport NIC driver? 
    
    Or, how to make OS issue OID_PM_PARAMETERS before sleep without the PowerManagement tab? 
    
    Any suggestion will be very appreciated.
    

    Thanks in advance.

    Fay Zhang

    0 comments No comments

  3. Fay Zhang 0 Reputation points
    2023-01-12T16:15:15.7066667+00:00

    Is there any tool to trace/monitor NDIS OID? I search from wdk folder but not found.

    Thanks you very much for your input.

    BR,

    Fay Zhang

    0 comments No comments

  4. Fay Zhang 0 Reputation points
    2023-01-15T08:08:21.1633333+00:00
    We did some experiments:
    1. After adding the registry 
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PlatformAoAcOverride = 0 to disable ModernStandby, whether OS issues OS_PM_PARAMETERS to enable WoL:
    S3: Yes. S4: Yes.
    
    2. After removing the registry 
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PlatformAoAcOverride = 0 to enable ModernStandby, whether OS issues OS_PM_PARAMETERS to enable WoL:
    S3: Yes. S4: No
    
    	I'm not sure whether this is BIOS behavior. Is that possible checking ACPI table to find out why WoL is disabled in S4 (OS Hibernate) mode while WoL is ensabled in S3 (OS sleep) mode?
    
    Thanks a lot in advance
    Fay Zhang
    
    0 comments No comments

  5. Fay Zhang 0 Reputation points
    2023-02-09T04:48:11+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.