Technical information

8-28
AIC-6915 Ethernet LAN Controller Programmer’s Manual
// The index is a multiple of the size of the Transmit Buffer Descriptor.
IndexToDescriptor = TxCompletionDesc->ConsumerIndex/
sizeof(AIC6915_TX_DESC);
TxDesc = Adapter->TxDesc[IndexToDescriptor];
// Return the packet to the operating system.
// This is the packet given to us by the operating system when the
// transmit was first initiated. The packet was stored in the skip field
// at that time.
NdisMSendComplete( Adapter->MiniportAdapterHandle,
TxDesc->Reserved.OwningPacket,
NDIS_STATUS_SUCCESS
);
TxComQConsumerIndex++;
TxComQConsumerIndex %= AIC6915_NUMBER_OF_TX_COMPLETION_DESC;
} // while (TxComQConsumerIndex != TxComQProducerIndex)
// Give the Tx completion descriptors we've processed back to the AIC-6915.
AIC6915_READ_REG(CompletionQ1ConsumerIndex, &CompletionQ1ConsumerReg);
CompletionQ1ConsumerReg.TxCompletionConsumerIndex =
TxComQConsumerIndex;
AIC6915_WRITE_REG(CompletionQ1ConsumerIndex, CompletionQ1ConsumerReg);
// We’re finished with all Transmit Complete processing!