aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri_sbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/myri_sbus.c')
-rw-r--r--drivers/net/myri_sbus.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index 331b76c49561..35c4c598c8d2 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -353,7 +353,7 @@ static void myri_tx(struct myri_eth *mp, struct net_device *dev)
353 sbus_unmap_single(mp->myri_sdev, dma_addr, skb->len, SBUS_DMA_TODEVICE); 353 sbus_unmap_single(mp->myri_sdev, dma_addr, skb->len, SBUS_DMA_TODEVICE);
354 dev_kfree_skb(skb); 354 dev_kfree_skb(skb);
355 mp->tx_skbs[entry] = NULL; 355 mp->tx_skbs[entry] = NULL;
356 mp->enet_stats.tx_packets++; 356 dev->stats.tx_packets++;
357 entry = NEXT_TX(entry); 357 entry = NEXT_TX(entry);
358 } 358 }
359 mp->tx_old = entry; 359 mp->tx_old = entry;
@@ -434,20 +434,20 @@ static void myri_rx(struct myri_eth *mp, struct net_device *dev)
434 RX_ALLOC_SIZE, SBUS_DMA_FROMDEVICE); 434 RX_ALLOC_SIZE, SBUS_DMA_FROMDEVICE);
435 if (len < (ETH_HLEN + MYRI_PAD_LEN) || (skb->data[0] != MYRI_PAD_LEN)) { 435 if (len < (ETH_HLEN + MYRI_PAD_LEN) || (skb->data[0] != MYRI_PAD_LEN)) {
436 DRX(("ERROR[")); 436 DRX(("ERROR["));
437 mp->enet_stats.rx_errors++; 437 dev->stats.rx_errors++;
438 if (len < (ETH_HLEN + MYRI_PAD_LEN)) { 438 if (len < (ETH_HLEN + MYRI_PAD_LEN)) {
439 DRX(("BAD_LENGTH] ")); 439 DRX(("BAD_LENGTH] "));
440 mp->enet_stats.rx_length_errors++; 440 dev->stats.rx_length_errors++;
441 } else { 441 } else {
442 DRX(("NO_PADDING] ")); 442 DRX(("NO_PADDING] "));
443 mp->enet_stats.rx_frame_errors++; 443 dev->stats.rx_frame_errors++;
444 } 444 }
445 445
446 /* Return it to the LANAI. */ 446 /* Return it to the LANAI. */
447 drop_it: 447 drop_it:
448 drops++; 448 drops++;
449 DRX(("DROP ")); 449 DRX(("DROP "));
450 mp->enet_stats.rx_dropped++; 450 dev->stats.rx_dropped++;
451 sbus_dma_sync_single_for_device(mp->myri_sdev, 451 sbus_dma_sync_single_for_device(mp->myri_sdev,
452 sbus_readl(&rxd->myri_scatters[0].addr), 452 sbus_readl(&rxd->myri_scatters[0].addr),
453 RX_ALLOC_SIZE, 453 RX_ALLOC_SIZE,
@@ -527,8 +527,8 @@ static void myri_rx(struct myri_eth *mp, struct net_device *dev)
527 netif_rx(skb); 527 netif_rx(skb);
528 528
529 dev->last_rx = jiffies; 529 dev->last_rx = jiffies;
530 mp->enet_stats.rx_packets++; 530 dev->stats.rx_packets++;
531 mp->enet_stats.rx_bytes += len; 531 dev->stats.rx_bytes += len;
532 next: 532 next:
533 DRX(("NEXT\n")); 533 DRX(("NEXT\n"));
534 entry = NEXT_RX(entry); 534 entry = NEXT_RX(entry);
@@ -596,7 +596,7 @@ static void myri_tx_timeout(struct net_device *dev)
596 596
597 printk(KERN_ERR "%s: transmit timed out, resetting\n", dev->name); 597 printk(KERN_ERR "%s: transmit timed out, resetting\n", dev->name);
598 598
599 mp->enet_stats.tx_errors++; 599 dev->stats.tx_errors++;
600 myri_init(mp, 0); 600 myri_init(mp, 0);
601 netif_wake_queue(dev); 601 netif_wake_queue(dev);
602} 602}
@@ -806,9 +806,6 @@ static int myri_change_mtu(struct net_device *dev, int new_mtu)
806 return 0; 806 return 0;
807} 807}
808 808
809static struct net_device_stats *myri_get_stats(struct net_device *dev)
810{ return &(((struct myri_eth *)dev->priv)->enet_stats); }
811
812static void myri_set_multicast(struct net_device *dev) 809static void myri_set_multicast(struct net_device *dev)
813{ 810{
814 /* Do nothing, all MyriCOM nodes transmit multicast frames 811 /* Do nothing, all MyriCOM nodes transmit multicast frames
@@ -1060,7 +1057,6 @@ static int __devinit myri_ether_init(struct sbus_dev *sdev)
1060 dev->hard_start_xmit = &myri_start_xmit; 1057 dev->hard_start_xmit = &myri_start_xmit;
1061 dev->tx_timeout = &myri_tx_timeout; 1058 dev->tx_timeout = &myri_tx_timeout;
1062 dev->watchdog_timeo = 5*HZ; 1059 dev->watchdog_timeo = 5*HZ;
1063 dev->get_stats = &myri_get_stats;
1064 dev->set_multicast_list = &myri_set_multicast; 1060 dev->set_multicast_list = &myri_set_multicast;
1065 dev->irq = sdev->irqs[0]; 1061 dev->irq = sdev->irqs[0];
1066 1062