kernels/linux-2.4.0/drivers/acorn/net/ether3.c
/*
 * Update stats for the transmitted packet(s)
 */
Update stats for the transmitted packet(s)
Update stats for the transmitted packet ( s )
static void
ether3_tx(struct net_device *dev, struct dev_priv *priv)
{
	unsigned int tx_tail = priv->tx_tail;
	int max_work = 14;
	do {
	    	unsigned long status;
	    	ether3_setbuffer(dev, buffer_read, tx_tail * 0x600);
    		status = ether3_readlong(dev);
		if ((status & (TXSTAT_DONE | TXHDR_TRANSMIT)) !=
		    (TXSTAT_DONE | TXHDR_TRANSMIT))
			break;
		if (!(status & (TXSTAT_BABBLED | TXSTAT_16COLLISIONS)))
			priv->stats.tx_packets++;
		else {
			priv->stats.tx_errors ++;
			if (status & TXSTAT_16COLLISIONS) priv->stats.collisions += 16;
			if (status & TXSTAT_BABBLED) priv->stats.tx_fifo_errors ++;
		}
		tx_tail = (tx_tail + 1) & 15;
	} while (--max_work);
	if (priv->tx_tail != tx_tail) {
		priv->tx_tail = tx_tail;
		netif_wake_queue(dev);
	}
}
static void ether3_tx ( struct net_device * dev , struct dev_priv * priv ) { unsigned int tx_tail = priv -> tx_tail ; int max_work = 14 ; do { unsigned long status ; ether3_setbuffer ( dev , buffer_read , tx_tail * 0x600 ) ; status = ether3_readlong ( dev ) ; if ( ( status & ( TXSTAT_DONE | TXHDR_TRANSMIT ) ) != ( TXSTAT_DONE | TXHDR_TRANSMIT ) ) break ; if ( ! ( status & ( TXSTAT_BABBLED | TXSTAT_16COLLISIONS ) ) ) priv -> stats . tx_packets ++ ; else { priv -> stats . tx_errors ++ ; if ( status & TXSTAT_16COLLISIONS ) priv -> stats . collisions += 16 ; if ( status & TXSTAT_BABBLED ) priv -> stats . tx_fifo_errors ++ ; } tx_tail = ( tx_tail + 1 ) & 15 ; } while ( -- max_work ) ; if ( priv -> tx_tail != tx_tail ) { priv -> tx_tail = tx_tail ; netif_wake_queue ( dev ) ; } }
Update stats for the transmitted packet(s)
Update stats for the transmitted packet ( s )
/*
	    	 * Read the packet header
    		 */ /*
		 * Check to see if this packet has been transmitted
		 */ /*
		 * Update errors
		 */