kernels/linux-2.4.0/drivers/net/tlan.c
/***************************************************************
	 *	TLan_GetStats
	 *  
	 *	Returns:
	 *		A pointer to the device's statistics structure.
	 *	Parms:
	 *		dev	The device structure to return the
	 *			stats for.
	 *
	 *	This function updates the devices statistics by reading
	 *	the TLAN chip's onboard registers.  Then it returns the
	 *	address of the statistics structure.
	 *
	 **************************************************************/


A pointer to the device's statistics structure.
Parms:
dev     The device structure to return the
stats for.

This function updates the devices statistics by reading
the TLAN chip's onboard registers.  Then it returns the
address of the statistics structure.
A pointer to the device ' s statistics structure . Parms : dev The device structure to return the stats for . This function updates the devices statistics by reading the TLAN chip ' s onboard registers . Then it returns the address of the statistics structure .
static struct net_device_stats *TLan_GetStats( struct net_device *dev )
{
	TLanPrivateInfo	*priv = (TLanPrivateInfo *) dev->priv;
	int i;
	TLan_ReadAndClearStats( dev, TLAN_RECORD );
	TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE:  %s EOC count = %d\n", dev->name, priv->rxEocCount );
	TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT:  %s Busy count = %d\n", dev->name, priv->txBusyCount );
	if ( debug & TLAN_DEBUG_GNRL ) {
		TLan_PrintDio( dev->base_addr );
		TLan_PhyPrint( dev );		
	}
	if ( debug & TLAN_DEBUG_LIST ) {
		for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ )
			TLan_PrintList( priv->rxList + i, "RX", i );
		for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ )
			TLan_PrintList( priv->txList + i, "TX", i );
	}
	return ( &( (TLanPrivateInfo *) dev->priv )->stats );
}
static struct net_device_stats * TLan_GetStats ( struct net_device * dev ) { TLanPrivateInfo * priv = ( TLanPrivateInfo * ) dev -> priv ; int i ; TLan_ReadAndClearStats ( dev , TLAN_RECORD ) ; TLAN_DBG ( TLAN_DEBUG_RX , " \n " , dev -> name , priv -> rxEocCount ) ; TLAN_DBG ( TLAN_DEBUG_TX , " \n " , dev -> name , priv -> txBusyCount ) ; if ( debug & TLAN_DEBUG_GNRL ) { TLan_PrintDio ( dev -> base_addr ) ; TLan_PhyPrint ( dev ) ; } if ( debug & TLAN_DEBUG_LIST ) { for ( i = 0 ; i < TLAN_NUM_RX_LISTS ; i ++ ) TLan_PrintList ( priv -> rxList + i , " " , i ) ; for ( i = 0 ; i < TLAN_NUM_TX_LISTS ; i ++ ) TLan_PrintList ( priv -> txList + i , " " , i ) ; } return ( & ( ( TLanPrivateInfo * ) dev -> priv ) -> stats ) ; }
TLan_GetStats
TLan_GetStats
/* Should only read stats if open ? */