次の方法で共有


Handling OID_PNP_XXX Queries and Sets (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

The virtual miniport of an intermediate driver must export MiniportQueryInformation and MiniportSetInformation functions. NDIS calls the intermediate driver's MiniportQueryInformation or MiniportSetInformation function when an overlying driver bound to the intermediate driver's virtual miniport calls NdisRequest to query or set information objects (OID_XXX), or NDIS can also call MiniportQueryInformation or MiniportSetInformation on its own behalf. For more information about miniport driver handling of sets and queries to information objects, see Obtaining and Setting Miniport Driver Information and NDIS Support for WMI.

The intermediate driver is not required to maintain information about the capabilities of the underlying miniport driver. However, the intermediate driver can query or set OID_XXX maintained by the underlying miniport driver with NdisRequest (if the intermediate driver has a connectionless lower edge) or with NdisCoRequest (if the intermediate driver has a connection-oriented lower edge).

An intermediate driver should handle queries and sets as follows:

  • OID_PNP_CAPABILITIES

    The intermediate driver forwards OID_PNP_CAPABILITIES requests to the underlying miniport driver. The response from the underlying miniport driver must be modified before forwarding the response at the intermediate driver's upper edge. If the underlying NIC is PM-aware, the intermediate driver must return NDIS_STATUS_SUCCESS to a query of OID_PNP_CAPABILITIES. In the NDIS_PM_WAKE_UP_CAPABILITIES structure returned by this OID, the intermediate driver must specify a device power state of NdisDeviceStateUnspecified for each wake-up capability:

    • MinMagicPacketWakeUp
    • MinPatternWakeUp
    • MinLinkChangeWakeUp

    Such a response indicates that the intermediate driver is PM-aware but is incapable of waking up the system.

    If the underlying NIC is not PM-aware, the intermediate driver must return NDIS_STATUS_NOT_SUPPORTED to a query of OID_PNP_CAPABILITIES.

  • OID_PNP_QUERY_POWER and OID_PNP_SET_POWER

    The intermediate driver must always return NDIS_STATUS_SUCCESS to a query of OID_PNP_QUERY_POWER or a set of OID_PNP_SET_POWER. The intermediate driver must never propagate either of these OID requests to the underlying miniport driver.

  • "Wake-up OIDs"

    If the underlying NIC is PM-aware, the intermediate driver must pass to the underlying miniport driver (by calling NdisRequest or NdisCoRequest) the following OID_PNP_ XXX relating to wake-up events:

    OID_PNP_ENABLE_WAKE_UP

    OID_PNP_ADD_WAKE_UP_PATTERN

    OID_PNP_REMOVE_WAKE_UP_PATTERN

    OID_PNP_WAKE_UP_PATTERN_LIST

    OID_PNP_WAKE_UP_ERROR

    OID_PNP_WAKE_UP_OK

The intermediate driver must also propagate the underlying miniport driver's response to these OIDs to the overlying protocol drivers.

If the underlying NIC is not PM-aware, the intermediate driver should return NDIS_STATUS_NOT_SUPPORTED in response to a query or set of these OIDs.

 

 

Send comments about this topic to Microsoft