aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/arlan-main.c
diff options
context:
space:
mode:
authorPaulius Zaleckas <paulius.zaleckas@teltonika.lt>2008-05-06 07:44:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-14 16:29:48 -0400
commit06a5223d68a7c48bf72a05aad533ea0e8a3453be (patch)
tree8a8cf88f58cc07ed8df5f0cd34dbc87ea6882e0c /drivers/net/wireless/arlan-main.c
parent15dbf1b7b7b6ba6e5159dde60e111f617b2c54ea (diff)
arlan: use netstats in net_device structure
Use net_device_stats from net_device structure instead of local. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/arlan-main.c')
-rw-r--r--drivers/net/wireless/arlan-main.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
index dbdfc9e39d20..dec5e874a54d 100644
--- a/drivers/net/wireless/arlan-main.c
+++ b/drivers/net/wireless/arlan-main.c
@@ -125,7 +125,7 @@ static inline int arlan_drop_tx(struct net_device *dev)
125{ 125{
126 struct arlan_private *priv = netdev_priv(dev); 126 struct arlan_private *priv = netdev_priv(dev);
127 127
128 priv->stats.tx_errors++; 128 dev->stats.tx_errors++;
129 if (priv->Conf->tx_delay_ms) 129 if (priv->Conf->tx_delay_ms)
130 { 130 {
131 priv->tx_done_delayed = jiffies + priv->Conf->tx_delay_ms * HZ / 1000 + 1; 131 priv->tx_done_delayed = jiffies + priv->Conf->tx_delay_ms * HZ / 1000 + 1;
@@ -1269,7 +1269,7 @@ static void arlan_tx_done_interrupt(struct net_device *dev, int status)
1269 { 1269 {
1270 IFDEBUG(ARLAN_DEBUG_TX_CHAIN) 1270 IFDEBUG(ARLAN_DEBUG_TX_CHAIN)
1271 printk("arlan intr: transmit OK\n"); 1271 printk("arlan intr: transmit OK\n");
1272 priv->stats.tx_packets++; 1272 dev->stats.tx_packets++;
1273 priv->bad = 0; 1273 priv->bad = 0;
1274 priv->reset = 0; 1274 priv->reset = 0;
1275 priv->retransmissions = 0; 1275 priv->retransmissions = 0;
@@ -1496,7 +1496,7 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short
1496 if (skb == NULL) 1496 if (skb == NULL)
1497 { 1497 {
1498 printk(KERN_ERR "%s: Memory squeeze, dropping packet.\n", dev->name); 1498 printk(KERN_ERR "%s: Memory squeeze, dropping packet.\n", dev->name);
1499 priv->stats.rx_dropped++; 1499 dev->stats.rx_dropped++;
1500 break; 1500 break;
1501 } 1501 }
1502 skb_reserve(skb, 2); 1502 skb_reserve(skb, 2);
@@ -1536,14 +1536,14 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short
1536 } 1536 }
1537 netif_rx(skb); 1537 netif_rx(skb);
1538 dev->last_rx = jiffies; 1538 dev->last_rx = jiffies;
1539 priv->stats.rx_packets++; 1539 dev->stats.rx_packets++;
1540 priv->stats.rx_bytes += pkt_len; 1540 dev->stats.rx_bytes += pkt_len;
1541 } 1541 }
1542 break; 1542 break;
1543 1543
1544 default: 1544 default:
1545 printk(KERN_ERR "arlan intr: received unknown status\n"); 1545 printk(KERN_ERR "arlan intr: received unknown status\n");
1546 priv->stats.rx_crc_errors++; 1546 dev->stats.rx_crc_errors++;
1547 break; 1547 break;
1548 } 1548 }
1549 ARLAN_DEBUG_EXIT("arlan_rx_interrupt"); 1549 ARLAN_DEBUG_EXIT("arlan_rx_interrupt");
@@ -1719,23 +1719,23 @@ static struct net_device_stats *arlan_statistics(struct net_device *dev)
1719 1719
1720 /* Update the statistics from the device registers. */ 1720 /* Update the statistics from the device registers. */
1721 1721
1722 READSHM(priv->stats.collisions, arlan->numReTransmissions, u_int); 1722 READSHM(dev->stats.collisions, arlan->numReTransmissions, u_int);
1723 READSHM(priv->stats.rx_crc_errors, arlan->numCRCErrors, u_int); 1723 READSHM(dev->stats.rx_crc_errors, arlan->numCRCErrors, u_int);
1724 READSHM(priv->stats.rx_dropped, arlan->numFramesDiscarded, u_int); 1724 READSHM(dev->stats.rx_dropped, arlan->numFramesDiscarded, u_int);
1725 READSHM(priv->stats.rx_fifo_errors, arlan->numRXBufferOverflows, u_int); 1725 READSHM(dev->stats.rx_fifo_errors, arlan->numRXBufferOverflows, u_int);
1726 READSHM(priv->stats.rx_frame_errors, arlan->numReceiveFramesLost, u_int); 1726 READSHM(dev->stats.rx_frame_errors, arlan->numReceiveFramesLost, u_int);
1727 READSHM(priv->stats.rx_over_errors, arlan->numRXOverruns, u_int); 1727 READSHM(dev->stats.rx_over_errors, arlan->numRXOverruns, u_int);
1728 READSHM(priv->stats.rx_packets, arlan->numDatagramsReceived, u_int); 1728 READSHM(dev->stats.rx_packets, arlan->numDatagramsReceived, u_int);
1729 READSHM(priv->stats.tx_aborted_errors, arlan->numAbortErrors, u_int); 1729 READSHM(dev->stats.tx_aborted_errors, arlan->numAbortErrors, u_int);
1730 READSHM(priv->stats.tx_carrier_errors, arlan->numStatusTimeouts, u_int); 1730 READSHM(dev->stats.tx_carrier_errors, arlan->numStatusTimeouts, u_int);
1731 READSHM(priv->stats.tx_dropped, arlan->numDatagramsDiscarded, u_int); 1731 READSHM(dev->stats.tx_dropped, arlan->numDatagramsDiscarded, u_int);
1732 READSHM(priv->stats.tx_fifo_errors, arlan->numTXUnderruns, u_int); 1732 READSHM(dev->stats.tx_fifo_errors, arlan->numTXUnderruns, u_int);
1733 READSHM(priv->stats.tx_packets, arlan->numDatagramsTransmitted, u_int); 1733 READSHM(dev->stats.tx_packets, arlan->numDatagramsTransmitted, u_int);
1734 READSHM(priv->stats.tx_window_errors, arlan->numHoldOffs, u_int); 1734 READSHM(dev->stats.tx_window_errors, arlan->numHoldOffs, u_int);
1735 1735
1736 ARLAN_DEBUG_EXIT("arlan_statistics"); 1736 ARLAN_DEBUG_EXIT("arlan_statistics");
1737 1737
1738 return &priv->stats; 1738 return &dev->stats;
1739} 1739}
1740 1740
1741 1741