diff options
Diffstat (limited to 'drivers/net/tlan.c')
-rw-r--r-- | drivers/net/tlan.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index d1633fbf46ce..c14d2919c48a 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -1276,7 +1276,7 @@ static struct net_device_stats *TLan_GetStats( struct net_device *dev ) | |||
1276 | TLan_PrintList( priv->txList + i, "TX", i ); | 1276 | TLan_PrintList( priv->txList + i, "TX", i ); |
1277 | } | 1277 | } |
1278 | 1278 | ||
1279 | return ( &( (TLanPrivateInfo *) netdev_priv(dev) )->stats ); | 1279 | return &dev->stats; |
1280 | 1280 | ||
1281 | } /* TLan_GetStats */ | 1281 | } /* TLan_GetStats */ |
1282 | 1282 | ||
@@ -1434,7 +1434,7 @@ static u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int ) | |||
1434 | if ( tmpCStat & TLAN_CSTAT_EOC ) | 1434 | if ( tmpCStat & TLAN_CSTAT_EOC ) |
1435 | eoc = 1; | 1435 | eoc = 1; |
1436 | 1436 | ||
1437 | priv->stats.tx_bytes += head_list->frameSize; | 1437 | dev->stats.tx_bytes += head_list->frameSize; |
1438 | 1438 | ||
1439 | head_list->cStat = TLAN_CSTAT_UNUSED; | 1439 | head_list->cStat = TLAN_CSTAT_UNUSED; |
1440 | netif_start_queue(dev); | 1440 | netif_start_queue(dev); |
@@ -1564,7 +1564,7 @@ static u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) | |||
1564 | skb_reserve(skb, 2); | 1564 | skb_reserve(skb, 2); |
1565 | t = (void *) skb_put(skb, frameSize); | 1565 | t = (void *) skb_put(skb, frameSize); |
1566 | 1566 | ||
1567 | priv->stats.rx_bytes += head_list->frameSize; | 1567 | dev->stats.rx_bytes += head_list->frameSize; |
1568 | 1568 | ||
1569 | memcpy( t, head_buffer, frameSize ); | 1569 | memcpy( t, head_buffer, frameSize ); |
1570 | skb->protocol = eth_type_trans( skb, dev ); | 1570 | skb->protocol = eth_type_trans( skb, dev ); |
@@ -1586,7 +1586,7 @@ static u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) | |||
1586 | pci_unmap_single(priv->pciDev, head_list->buffer[0].address, TLAN_MAX_FRAME_SIZE, PCI_DMA_FROMDEVICE); | 1586 | pci_unmap_single(priv->pciDev, head_list->buffer[0].address, TLAN_MAX_FRAME_SIZE, PCI_DMA_FROMDEVICE); |
1587 | skb_trim( skb, frameSize ); | 1587 | skb_trim( skb, frameSize ); |
1588 | 1588 | ||
1589 | priv->stats.rx_bytes += frameSize; | 1589 | dev->stats.rx_bytes += frameSize; |
1590 | 1590 | ||
1591 | skb->protocol = eth_type_trans( skb, dev ); | 1591 | skb->protocol = eth_type_trans( skb, dev ); |
1592 | netif_rx( skb ); | 1592 | netif_rx( skb ); |
@@ -2142,7 +2142,6 @@ static void TLan_PrintList( TLanList *list, char *type, int num) | |||
2142 | 2142 | ||
2143 | static void TLan_ReadAndClearStats( struct net_device *dev, int record ) | 2143 | static void TLan_ReadAndClearStats( struct net_device *dev, int record ) |
2144 | { | 2144 | { |
2145 | TLanPrivateInfo *priv = netdev_priv(dev); | ||
2146 | u32 tx_good, tx_under; | 2145 | u32 tx_good, tx_under; |
2147 | u32 rx_good, rx_over; | 2146 | u32 rx_good, rx_over; |
2148 | u32 def_tx, crc, code; | 2147 | u32 def_tx, crc, code; |
@@ -2179,18 +2178,18 @@ static void TLan_ReadAndClearStats( struct net_device *dev, int record ) | |||
2179 | loss = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); | 2178 | loss = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); |
2180 | 2179 | ||
2181 | if ( record ) { | 2180 | if ( record ) { |
2182 | priv->stats.rx_packets += rx_good; | 2181 | dev->stats.rx_packets += rx_good; |
2183 | priv->stats.rx_errors += rx_over + crc + code; | 2182 | dev->stats.rx_errors += rx_over + crc + code; |
2184 | priv->stats.tx_packets += tx_good; | 2183 | dev->stats.tx_packets += tx_good; |
2185 | priv->stats.tx_errors += tx_under + loss; | 2184 | dev->stats.tx_errors += tx_under + loss; |
2186 | priv->stats.collisions += multi_col + single_col + excess_col + late_col; | 2185 | dev->stats.collisions += multi_col + single_col + excess_col + late_col; |
2187 | 2186 | ||
2188 | priv->stats.rx_over_errors += rx_over; | 2187 | dev->stats.rx_over_errors += rx_over; |
2189 | priv->stats.rx_crc_errors += crc; | 2188 | dev->stats.rx_crc_errors += crc; |
2190 | priv->stats.rx_frame_errors += code; | 2189 | dev->stats.rx_frame_errors += code; |
2191 | 2190 | ||
2192 | priv->stats.tx_aborted_errors += tx_under; | 2191 | dev->stats.tx_aborted_errors += tx_under; |
2193 | priv->stats.tx_carrier_errors += loss; | 2192 | dev->stats.tx_carrier_errors += loss; |
2194 | } | 2193 | } |
2195 | 2194 | ||
2196 | } /* TLan_ReadAndClearStats */ | 2195 | } /* TLan_ReadAndClearStats */ |