aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring/olympic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tokenring/olympic.c')
-rw-r--r--drivers/net/tokenring/olympic.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index ecb5c7c96910..71fed1e20223 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -187,7 +187,6 @@ static int olympic_close(struct net_device *dev);
187static void olympic_set_rx_mode(struct net_device *dev); 187static void olympic_set_rx_mode(struct net_device *dev);
188static void olympic_freemem(struct net_device *dev) ; 188static void olympic_freemem(struct net_device *dev) ;
189static irqreturn_t olympic_interrupt(int irq, void *dev_id); 189static irqreturn_t olympic_interrupt(int irq, void *dev_id);
190static struct net_device_stats * olympic_get_stats(struct net_device *dev);
191static int olympic_set_mac_address(struct net_device *dev, void *addr) ; 190static int olympic_set_mac_address(struct net_device *dev, void *addr) ;
192static void olympic_arb_cmd(struct net_device *dev); 191static void olympic_arb_cmd(struct net_device *dev);
193static int olympic_change_mtu(struct net_device *dev, int mtu); 192static int olympic_change_mtu(struct net_device *dev, int mtu);
@@ -259,7 +258,6 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device
259 dev->stop=&olympic_close; 258 dev->stop=&olympic_close;
260 dev->do_ioctl=NULL; 259 dev->do_ioctl=NULL;
261 dev->set_multicast_list=&olympic_set_rx_mode; 260 dev->set_multicast_list=&olympic_set_rx_mode;
262 dev->get_stats=&olympic_get_stats ;
263 dev->set_mac_address=&olympic_set_mac_address ; 261 dev->set_mac_address=&olympic_set_mac_address ;
264 SET_NETDEV_DEV(dev, &pdev->dev); 262 SET_NETDEV_DEV(dev, &pdev->dev);
265 263
@@ -785,7 +783,7 @@ static void olympic_rx(struct net_device *dev)
785 } 783 }
786 olympic_priv->rx_ring_last_received += i ; 784 olympic_priv->rx_ring_last_received += i ;
787 olympic_priv->rx_ring_last_received &= (OLYMPIC_RX_RING_SIZE -1) ; 785 olympic_priv->rx_ring_last_received &= (OLYMPIC_RX_RING_SIZE -1) ;
788 olympic_priv->olympic_stats.rx_errors++; 786 dev->stats.rx_errors++;
789 } else { 787 } else {
790 788
791 if (buffer_cnt == 1) { 789 if (buffer_cnt == 1) {
@@ -796,7 +794,7 @@ static void olympic_rx(struct net_device *dev)
796 794
797 if (skb == NULL) { 795 if (skb == NULL) {
798 printk(KERN_WARNING "%s: Not enough memory to copy packet to upper layers. \n",dev->name) ; 796 printk(KERN_WARNING "%s: Not enough memory to copy packet to upper layers. \n",dev->name) ;
799 olympic_priv->olympic_stats.rx_dropped++ ; 797 dev->stats.rx_dropped++;
800 /* Update counters even though we don't transfer the frame */ 798 /* Update counters even though we don't transfer the frame */
801 olympic_priv->rx_ring_last_received += i ; 799 olympic_priv->rx_ring_last_received += i ;
802 olympic_priv->rx_ring_last_received &= (OLYMPIC_RX_RING_SIZE -1) ; 800 olympic_priv->rx_ring_last_received &= (OLYMPIC_RX_RING_SIZE -1) ;
@@ -862,8 +860,8 @@ static void olympic_rx(struct net_device *dev)
862 skb->protocol = tr_type_trans(skb,dev); 860 skb->protocol = tr_type_trans(skb,dev);
863 netif_rx(skb) ; 861 netif_rx(skb) ;
864 } 862 }
865 olympic_priv->olympic_stats.rx_packets++ ; 863 dev->stats.rx_packets++ ;
866 olympic_priv->olympic_stats.rx_bytes += length ; 864 dev->stats.rx_bytes += length ;
867 } /* if skb == null */ 865 } /* if skb == null */
868 } /* If status & 0x3b */ 866 } /* If status & 0x3b */
869 867
@@ -971,8 +969,8 @@ static irqreturn_t olympic_interrupt(int irq, void *dev_id)
971 olympic_priv->tx_ring_last_status++; 969 olympic_priv->tx_ring_last_status++;
972 olympic_priv->tx_ring_last_status &= (OLYMPIC_TX_RING_SIZE-1); 970 olympic_priv->tx_ring_last_status &= (OLYMPIC_TX_RING_SIZE-1);
973 olympic_priv->free_tx_ring_entries++; 971 olympic_priv->free_tx_ring_entries++;
974 olympic_priv->olympic_stats.tx_bytes += olympic_priv->tx_ring_skb[olympic_priv->tx_ring_last_status]->len; 972 dev->stats.tx_bytes += olympic_priv->tx_ring_skb[olympic_priv->tx_ring_last_status]->len;
975 olympic_priv->olympic_stats.tx_packets++ ; 973 dev->stats.tx_packets++ ;
976 pci_unmap_single(olympic_priv->pdev, 974 pci_unmap_single(olympic_priv->pdev,
977 le32_to_cpu(olympic_priv->olympic_tx_ring[olympic_priv->tx_ring_last_status].buffer), 975 le32_to_cpu(olympic_priv->olympic_tx_ring[olympic_priv->tx_ring_last_status].buffer),
978 olympic_priv->tx_ring_skb[olympic_priv->tx_ring_last_status]->len,PCI_DMA_TODEVICE); 976 olympic_priv->tx_ring_skb[olympic_priv->tx_ring_last_status]->len,PCI_DMA_TODEVICE);
@@ -1344,13 +1342,6 @@ static void olympic_srb_bh(struct net_device *dev)
1344 1342
1345} 1343}
1346 1344
1347static struct net_device_stats * olympic_get_stats(struct net_device *dev)
1348{
1349 struct olympic_private *olympic_priv ;
1350 olympic_priv=netdev_priv(dev);
1351 return (struct net_device_stats *) &olympic_priv->olympic_stats;
1352}
1353
1354static int olympic_set_mac_address (struct net_device *dev, void *addr) 1345static int olympic_set_mac_address (struct net_device *dev, void *addr)
1355{ 1346{
1356 struct sockaddr *saddr = addr ; 1347 struct sockaddr *saddr = addr ;