ProtocolStatusComplete

VOID
    ProtocolStatusComplete(

        IN NDIS_HANDLE  ProtocolBindingContext
        );

ProtocolStatusComplete is a required driver function that completes a status-change operation initiated when the underlying driver called NdisMIndicateStatus.

Parameters

ProtocolBindingContext
Specifies the handle to a protocol-allocated context area in which the protocol driver maintains per-binding runtime state. The driver supplied this handle when it called NdisOpenAdapter.

Comments

ProtocolStatusComplete performs whatever postprocessing is necessary after one or more calls to the ProtocolStatus function. A call to ProtocolStatusComplete indicates that the protocol can resume normal operations on the binding after taking into account the preceding status change(s) indicated to its ProtocolStatus function. For example, if the protocol previously called NdisReset and it returned NDIS_STATUS_PENDING, both ProtocolResetComplete and ProtocolStatusComplete are called when the protocol-initiated reset operation is begun and completed.

The underlying miniport’s call to NdisMIndicateStatusComplete causes NDIS to call the ProtocolStatusComplete function. Interrupts are enabled on the underlying NIC when this call occurs. Consequently, the ProtocolReceivePacket or ProtocolReceive functions can be called to process receive indications while ProtocolStatusComplete is running in SMP machines. In some circumstances, the underlying driver can call NdisMIndicateStatus, thereby causing a call to the ProtocolStatus function while ProtocolStatusComplete is running.

The ProtocolStatusComplete function of an NDIS intermediate driver cannot simply forward completion indications to still higher-level protocols. Such an attempt can cause a deadlock. Instead, such a driver must call NdisIMSwitchToMiniport to forward the indication from the appropriate context. If NdisIMSwitchToMiniport returns FALSE, the driver must call NdisIMQueueMiniportCallback and forward the indication from the protocol-supplied MiniportCallback function.

By default, ProtocolStatusComplete runs at IRQL DISPATCH_LEVEL in an arbitrary thread context.

See Also

MiniportReset, NdisIMQueueMiniportCallback, NdisIMSwitchToMiniport, NdisMIndicateStatusComplete, NdisReset, ProtocolReceive, ProtocolReceivePacket, ProtocolStatus