NdisMFreeMapRegisters

VOID
   NdisMFreeMapRegisters(
       IN
NDIS_HANDLE MiniportAdapterHandle
       );

NdisMFreeMapRegisters releases a set of map registers that were allocated during initialization with NdisMAllocateMapRegisters by a busmaster DMA NIC driver.

Parameters

MiniportAdapterHandle

Specifies the handle originally input to MiniportInitialize.

Comments

If it has already made a successful call to NdisMAllocateMapRegisters, the NIC driver of a busmaster DMA device calls NdisMFreeMapRegisters if any of the following occurs:

·Its MiniportInitialize function is unable to initialize the NIC, so this function must release all existing claims on hardware resources for that NIC before it returns control.

·The NIC for which the miniport allocated the map registers is being removed.

·The driver is being unloaded, either because the system is shutting down or because the user reconfigured the network components used in the machine.

As soon as it calls NdisMFreeMapRegisters, the driver of a busmaster DMA NIC can no longer use the map registers it previously allocated.

NdisMFreeMapRegisters can be called only from a NIC driver’s MiniportInitialize and MiniportHalt functions.

Callers of NdisMFreeMapRegisters run at IRQL PASSIVE_LEVEL.

See Also

MiniportHalt, MiniportInitialize, NdisMAllocateMapRegisters, NdisMFreeSharedMemory