WlanAssert rule (ndis)

The WlanAssert rule includes a set of checks validated inside the WDIWIFI driver.

The following violations are possible:

  • TxPeerBacklogStub: IHV WDI miniport called datapath after datapath deinitialization - This rule applies to Peer-Queuing mode only. When the Miniport has been halted or reset, WDI will call the IHV driver's CloseAdapterHandler function which will require the driver to cleanup its state and not call any data callbacks after that. These asserts will be invoked if the driver happens to call any of the data handlers such as TxTransferCompleteIndication, TxSendPauseIndication, or TxReleaseFrameIndication after the Close, or if there still any outstanding Tx frames after the Close.

  • TxAbortStub: IHV WDI miniport called datapath after datapath deinitialization - This rule applies to Peer-Queuing mode only. When the Miniport has been halted or reset, WDI will call the IHV driver's CloseAdapterHandler function which will require the driver to cleanup its state and not call any data callbacks after that. These asserts will be invoked if the driver happens to call any of the data handlers such as TxTransferCompleteIndication, TxSendPauseIndication, or TxReleaseFrameIndication after the Close, or if there still any outstanding Tx frames after the Close.

  • WDIWIFI driver being unloaded with mismatched calls to NdisMDeregisterWdiMiniportDriver and NdisMRegisterWdiMiniportDriver - This Assert is invoked if the IHV driver's call to NdisMRegisterWdiMiniportDriver failed, but the IHV driver still calls the NdisMDeregisterWdiMiniportDriver handler.

  • The IhvWdiVersion is too low for the passed MiniportDataHandler Revision - WDI will get the IHV driver's WDI version by calling OID_WDI_GET_ADAPTER_CAPABILITIES, and it will then call the driver's TalTxRxInitializeHandler handler to get the WdiCharacteristics, where the driver can update the WDI Handler Revision if needed. This Assert will be hit if the driver's WDI version is less than or equal to WDI_VERSION_1_1_0, but the driver's WdiCharacteristics, Revision is set to a version greater than NDIS_OBJECT_TYPE_MINIPORT_WDI_DATA_HANDLERS_REVISION_1.

  • The MiniportDataHandler Revision is too low for the IhvWdiVersion - WDI will get the IHV driver's WDI version by calling OID_WDI_GET_ADAPTER_CAPABILITIES, and it will then call the driver's TalTxRxInitializeHandler handler to get the WdiCharacteristics, where the driver can update the WDI Handler Revision if needed. This Assert will be hit if the driver's WDI version is greater than WDI_VERSION_1_1_0, but the driver's WdiCharacteristics, Revision is set to a version less than NDIS_OBJECT_TYPE_MINIPORT_WDI_DATA_HANDLERS_REVISION_2.

The violation text will be provided as parameter two in the 0xC4 bug check.

Driver model: NDIS

Bug check(s) found with this rule: Bug Check 0xC4: DRIVER_VERIFIER_DETECTED_VIOLATION ( 0x00093004)

How to test

At run time

Run Driver Verifier and select the NDIS/WIFI verification option.

Applies to

TxTransferCompleteIndication

TxSendPauseIndication

TxReleaseFrameIndication

OID_WDI_GET_ADAPTER_CAPABILITIES

MINIPORT_HALT callback function

MINIPORT_SHUTDOWN callback function

NdisMRegisterWdiMiniportDriver

NdisMDeregisterWdiMiniportDriver

See also

WDI IHV driver interfaces

General Connection Operation Guidelines

OID_DOT11_RESET_REQUEST

NDIS_STATUS_DOT11_ASSOCIATION_START