MacRemoveAdapter

VOID
    MacRemoveAdapter(
        IN NDIS_HANDLE  MacAdapterContext
        );

MacRemoveAdapter is called by NDIS to remove a network interface card that the NIC driver has registered.

Parameters

MacAdapterContext
Specifies the context that the NIC driver associates with the network interface card.

Comments

When MacRemoveAdapter is called, NDIS guarantees that all open bindings for the NIC are closed and prevents further opens of the NIC.

MacRemoveAdapter releases the NIC-specific resources allocated by the MacAddAdapter function during initialization.

The driver rejects any incoming requests for the NIC being removed with NDIS_STATUS_ADAPTER_REMOVED. Resource removal includes disabling interrupts on the NIC, canceling any queued timers, and releasing all corresponding NIC-specific resources that the driver allocated, such as calling NdisRemoveInterrupt.

When the driver has finished releasing resources, it calls NdisDeregisterAdapter to complete the NIC-removal operation.

MacRemoveAdapter runs at IRQL PASSIVE_LEVEL.

See Also

MacAddAdapter, MacInterruptServiceRoutine, NdisCancelTimer, NdisDeregisterAdapter, NdisRemoveInterrupt