aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c523.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/3c523.c')
-rw-r--r--drivers/net/3c523.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c
index 239fc42fb8df..dc6e474229b1 100644
--- a/drivers/net/3c523.c
+++ b/drivers/net/3c523.c
@@ -202,7 +202,6 @@ static void elmc_xmt_int(struct net_device *dev);
202static void elmc_rnr_int(struct net_device *dev); 202static void elmc_rnr_int(struct net_device *dev);
203 203
204struct priv { 204struct priv {
205 struct net_device_stats stats;
206 unsigned long base; 205 unsigned long base;
207 char *memtop; 206 char *memtop;
208 unsigned long mapped_start; /* Start of ioremap */ 207 unsigned long mapped_start; /* Start of ioremap */
@@ -989,18 +988,18 @@ static void elmc_rcv_int(struct net_device *dev)
989 skb->protocol = eth_type_trans(skb, dev); 988 skb->protocol = eth_type_trans(skb, dev);
990 netif_rx(skb); 989 netif_rx(skb);
991 dev->last_rx = jiffies; 990 dev->last_rx = jiffies;
992 p->stats.rx_packets++; 991 dev->stats.rx_packets++;
993 p->stats.rx_bytes += totlen; 992 dev->stats.rx_bytes += totlen;
994 } else { 993 } else {
995 p->stats.rx_dropped++; 994 dev->stats.rx_dropped++;
996 } 995 }
997 } else { 996 } else {
998 printk(KERN_WARNING "%s: received oversized frame.\n", dev->name); 997 printk(KERN_WARNING "%s: received oversized frame.\n", dev->name);
999 p->stats.rx_dropped++; 998 dev->stats.rx_dropped++;
1000 } 999 }
1001 } else { /* frame !(ok), only with 'save-bad-frames' */ 1000 } else { /* frame !(ok), only with 'save-bad-frames' */
1002 printk(KERN_WARNING "%s: oops! rfd-error-status: %04x\n", dev->name, status); 1001 printk(KERN_WARNING "%s: oops! rfd-error-status: %04x\n", dev->name, status);
1003 p->stats.rx_errors++; 1002 dev->stats.rx_errors++;
1004 } 1003 }
1005 p->rfd_top->status = 0; 1004 p->rfd_top->status = 0;
1006 p->rfd_top->last = RFD_SUSP; 1005 p->rfd_top->last = RFD_SUSP;
@@ -1018,7 +1017,7 @@ static void elmc_rnr_int(struct net_device *dev)
1018{ 1017{
1019 struct priv *p = (struct priv *) dev->priv; 1018 struct priv *p = (struct priv *) dev->priv;
1020 1019
1021 p->stats.rx_errors++; 1020 dev->stats.rx_errors++;
1022 1021
1023 WAIT_4_SCB_CMD(); /* wait for the last cmd */ 1022 WAIT_4_SCB_CMD(); /* wait for the last cmd */
1024 p->scb->cmd = RUC_ABORT; /* usually the RU is in the 'no resource'-state .. abort it now. */ 1023 p->scb->cmd = RUC_ABORT; /* usually the RU is in the 'no resource'-state .. abort it now. */
@@ -1046,24 +1045,24 @@ static void elmc_xmt_int(struct net_device *dev)
1046 printk(KERN_WARNING "%s: strange .. xmit-int without a 'COMPLETE'\n", dev->name); 1045 printk(KERN_WARNING "%s: strange .. xmit-int without a 'COMPLETE'\n", dev->name);
1047 } 1046 }
1048 if (status & STAT_OK) { 1047 if (status & STAT_OK) {
1049 p->stats.tx_packets++; 1048 dev->stats.tx_packets++;
1050 p->stats.collisions += (status & TCMD_MAXCOLLMASK); 1049 dev->stats.collisions += (status & TCMD_MAXCOLLMASK);
1051 } else { 1050 } else {
1052 p->stats.tx_errors++; 1051 dev->stats.tx_errors++;
1053 if (status & TCMD_LATECOLL) { 1052 if (status & TCMD_LATECOLL) {
1054 printk(KERN_WARNING "%s: late collision detected.\n", dev->name); 1053 printk(KERN_WARNING "%s: late collision detected.\n", dev->name);
1055 p->stats.collisions++; 1054 dev->stats.collisions++;
1056 } else if (status & TCMD_NOCARRIER) { 1055 } else if (status & TCMD_NOCARRIER) {
1057 p->stats.tx_carrier_errors++; 1056 dev->stats.tx_carrier_errors++;
1058 printk(KERN_WARNING "%s: no carrier detected.\n", dev->name); 1057 printk(KERN_WARNING "%s: no carrier detected.\n", dev->name);
1059 } else if (status & TCMD_LOSTCTS) { 1058 } else if (status & TCMD_LOSTCTS) {
1060 printk(KERN_WARNING "%s: loss of CTS detected.\n", dev->name); 1059 printk(KERN_WARNING "%s: loss of CTS detected.\n", dev->name);
1061 } else if (status & TCMD_UNDERRUN) { 1060 } else if (status & TCMD_UNDERRUN) {
1062 p->stats.tx_fifo_errors++; 1061 dev->stats.tx_fifo_errors++;
1063 printk(KERN_WARNING "%s: DMA underrun detected.\n", dev->name); 1062 printk(KERN_WARNING "%s: DMA underrun detected.\n", dev->name);
1064 } else if (status & TCMD_MAXCOLL) { 1063 } else if (status & TCMD_MAXCOLL) {
1065 printk(KERN_WARNING "%s: Max. collisions exceeded.\n", dev->name); 1064 printk(KERN_WARNING "%s: Max. collisions exceeded.\n", dev->name);
1066 p->stats.collisions += 16; 1065 dev->stats.collisions += 16;
1067 } 1066 }
1068 } 1067 }
1069 1068
@@ -1215,12 +1214,12 @@ static struct net_device_stats *elmc_get_stats(struct net_device *dev)
1215 ovrn = p->scb->ovrn_errs; 1214 ovrn = p->scb->ovrn_errs;
1216 p->scb->ovrn_errs -= ovrn; 1215 p->scb->ovrn_errs -= ovrn;
1217 1216
1218 p->stats.rx_crc_errors += crc; 1217 dev->stats.rx_crc_errors += crc;
1219 p->stats.rx_fifo_errors += ovrn; 1218 dev->stats.rx_fifo_errors += ovrn;
1220 p->stats.rx_frame_errors += aln; 1219 dev->stats.rx_frame_errors += aln;
1221 p->stats.rx_dropped += rsc; 1220 dev->stats.rx_dropped += rsc;
1222 1221
1223 return &p->stats; 1222 return &dev->stats;
1224} 1223}
1225 1224
1226/******************************************************** 1225/********************************************************