kernels/linux-2.4.0/drivers/net/3c527.c
/**
 *	mc32_flush_tx_ring:
 *	@lp: Local data of 3c527 to flush the tx ring of
 *
 *	We have to consider two cases here. We want to free the pending
 *	buffers only. If the ring buffer head is past the start then the
 *	ring segment we wish to free wraps through zero.
 */
@lp: Local data of 3c527 to flush the tx ring of

We have to consider two cases here. We want to free the pending
buffers only. If the ring buffer head is past the start then the
ring segment we wish to free wraps through zero.
@lp : Local data of 3c527 to flush the tx ring of We have to consider two cases here . We want to free the pending buffers only . If the ring buffer head is past the start then the ring segment we wish to free wraps through zero .
static void mc32_flush_tx_ring(struct mc32_local *lp)
{
	int i;
	if(lp->tx_skb_top <= lp->tx_skb_end)
	{
		for(i=lp->tx_skb_top;i<lp->tx_skb_end;i++)
			dev_kfree_skb(lp->tx_skb[i]);
	}
	else
	{
		for(i=0;i<lp->tx_skb_end;i++)
			dev_kfree_skb(lp->tx_skb[i]);
		for(i=lp->tx_skb_top;i<TX_RING_MAX;i++)
			dev_kfree_skb(lp->tx_skb[i]);
	}
}
static void mc32_flush_tx_ring ( struct mc32_local * lp ) { int i ; if ( lp -> tx_skb_top <= lp -> tx_skb_end ) { for ( i = lp -> tx_skb_top ; i < lp -> tx_skb_end ; i ++ ) dev_kfree_skb ( lp -> tx_skb [ i ] ) ; } else { for ( i = 0 ; i < lp -> tx_skb_end ; i ++ ) dev_kfree_skb ( lp -> tx_skb [ i ] ) ; for ( i = lp -> tx_skb_top ; i < TX_RING_MAX ; i ++ ) dev_kfree_skb ( lp -> tx_skb [ i ] ) ; } }
mc32_flush_tx_ring:
      @lp: Local data of 3c527 to flush the tx ring of
mc32_flush_tx_ring : @lp : Local data of 3c527 to flush the tx ring of