VOID
MiniportHandleInterrupt(
IN NDIS_HANDLE MiniportAdapterContext
);
MiniportHandleInterrupt is a required function if a driver’s NIC generates interrupts.
Parameters
MiniportAdapterContext
Specifies the handle to a miniport-allocated context area in which the driver maintains per-NIC state, set up by MiniportInitialize.
Comments
MiniportHandleInterrupt does the deferred processing of all outstanding interrupt operations and starts any new operations. That is, the driver’s MiniportISR or MiniportDisableInterrupt function dismisses the interrupt on the NIC, saves any necessary state about the operation, and returns control as quickly as possible, thereby deferring most interrupt-driven I/O operations to MiniportHandleInterrupt.
MiniportHandleInterrupt carries out most operations to indicate receives on NICs that generate interrupts, including but not limited to the following:
·Adjusting the size of the buffer descriptor(s) to match the size of the received data and chaining the buffer descriptor(s) to the packet descriptor for the indication
·Setting up an array of packet descriptors and setting up any out-of-band information for each packet in the array for the indication or, if the miniport does not support multipacket receive indications, setting up a lookahead buffer
If the driver supports multipacket receives, it must indicate packet arrays in which the packet descriptors were allocated from packet pool and the buffer descriptors chained to those packets were allocated from buffer pool.
·Calling the appropriate Ndis..IndicateReceive function for the received data
MiniportHandleInterrupt also can call NdisSendComplete on packets for which the MiniportSendPackets or Miniport(Wan)Send function returned NDIS_STATUS_PENDING.
If the NIC shares an IRQ, MiniportHandleInterrupt is called only if the MiniportISR function returned InterruptRecognized set to TRUE, thereby indicating that the NIC generated a particular interrupt.
When MiniportHandleInterrupt is called, interrupts are disabled on the NIC, either by the MiniportISR or MiniportDisableInterrupt function. Before it returns control, MiniportHandleInterrupt can re-enable interrupts on the NIC. Otherwise, NDIS calls a driver-supplied MiniportEnableInterrupt function to do so when MiniportHandleInterrupt returns control.
By default, MiniportHandleInterrupt runs at IRQL DISPATCH_LEVEL.
See Also
MiniportDisableInterrupt, MiniportEnableInterrupt, MiniportInitialize, MiniportISR, MiniportSend, MiniportSendPackets, MiniportWanSend, NdisAdjustBufferLength, NdisAllocateBuffer, NdisAllocateMemory, NdisAllocatePacket, NdisMArcIndicateReceive, NdisMEthIndicateReceive, NdisMFddiIndicateReceive, NdisMIndicateReceivePacket, NdisMRegisterInterrupt, NdisMSynchronizeWithInterrupt, NdisMTrIndicateReceive, NdisMWanIndicateReceive, NDIS_PACKET, NDIS_PACKET_OOB_DATA