3.6 Shutdown Handler

All NIC drivers should register a shutdown handler during initialization. The definition of MiniportShutdown is:

VOID
    MiniportShutdown(
        IN PVOID ShutdownContext
        );

A driver’s shutdown handler should at least do the following:

The shutdown handler can be called as a result of a user operation, in which case it runs at IRQL PASSIVE_LEVEL. It can also be called as a result of an unrecoverable system error. If so, MiniportShutdown can be running at any IRQL. Only NdisXxx functions that can be called at any IRQL are safe to call from MiniportShutdown.