aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mv643xx_eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r--drivers/net/mv643xx_eth.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 2a808e265a3e..35781616eb23 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -63,7 +63,6 @@ static unsigned int mv643xx_eth_port_disable_rx(unsigned int port_num);
63static int mv643xx_eth_open(struct net_device *); 63static int mv643xx_eth_open(struct net_device *);
64static int mv643xx_eth_stop(struct net_device *); 64static int mv643xx_eth_stop(struct net_device *);
65static int mv643xx_eth_change_mtu(struct net_device *, int); 65static int mv643xx_eth_change_mtu(struct net_device *, int);
66static struct net_device_stats *mv643xx_eth_get_stats(struct net_device *);
67static void eth_port_init_mac_tables(unsigned int eth_port_num); 66static void eth_port_init_mac_tables(unsigned int eth_port_num);
68#ifdef MV643XX_NAPI 67#ifdef MV643XX_NAPI
69static int mv643xx_poll(struct napi_struct *napi, int budget); 68static int mv643xx_poll(struct napi_struct *napi, int budget);
@@ -341,7 +340,7 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)
341 340
342 if (cmd_sts & ETH_ERROR_SUMMARY) { 341 if (cmd_sts & ETH_ERROR_SUMMARY) {
343 printk("%s: Error in TX\n", dev->name); 342 printk("%s: Error in TX\n", dev->name);
344 mp->stats.tx_errors++; 343 dev->stats.tx_errors++;
345 } 344 }
346 345
347 spin_unlock_irqrestore(&mp->lock, flags); 346 spin_unlock_irqrestore(&mp->lock, flags);
@@ -388,7 +387,7 @@ static void mv643xx_eth_free_all_tx_descs(struct net_device *dev)
388static int mv643xx_eth_receive_queue(struct net_device *dev, int budget) 387static int mv643xx_eth_receive_queue(struct net_device *dev, int budget)
389{ 388{
390 struct mv643xx_private *mp = netdev_priv(dev); 389 struct mv643xx_private *mp = netdev_priv(dev);
391 struct net_device_stats *stats = &mp->stats; 390 struct net_device_stats *stats = &dev->stats;
392 unsigned int received_packets = 0; 391 unsigned int received_packets = 0;
393 struct sk_buff *skb; 392 struct sk_buff *skb;
394 struct pkt_info pkt_info; 393 struct pkt_info pkt_info;
@@ -1192,7 +1191,7 @@ static void eth_tx_submit_descs_for_skb(struct mv643xx_private *mp,
1192static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev) 1191static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
1193{ 1192{
1194 struct mv643xx_private *mp = netdev_priv(dev); 1193 struct mv643xx_private *mp = netdev_priv(dev);
1195 struct net_device_stats *stats = &mp->stats; 1194 struct net_device_stats *stats = &dev->stats;
1196 unsigned long flags; 1195 unsigned long flags;
1197 1196
1198 BUG_ON(netif_queue_stopped(dev)); 1197 BUG_ON(netif_queue_stopped(dev));
@@ -1228,23 +1227,6 @@ static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
1228 return 0; /* success */ 1227 return 0; /* success */
1229} 1228}
1230 1229
1231/*
1232 * mv643xx_eth_get_stats
1233 *
1234 * Returns a pointer to the interface statistics.
1235 *
1236 * Input : dev - a pointer to the required interface
1237 *
1238 * Output : a pointer to the interface's statistics
1239 */
1240
1241static struct net_device_stats *mv643xx_eth_get_stats(struct net_device *dev)
1242{
1243 struct mv643xx_private *mp = netdev_priv(dev);
1244
1245 return &mp->stats;
1246}
1247
1248#ifdef CONFIG_NET_POLL_CONTROLLER 1230#ifdef CONFIG_NET_POLL_CONTROLLER
1249static void mv643xx_netpoll(struct net_device *netdev) 1231static void mv643xx_netpoll(struct net_device *netdev)
1250{ 1232{
@@ -1339,7 +1321,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
1339 dev->open = mv643xx_eth_open; 1321 dev->open = mv643xx_eth_open;
1340 dev->stop = mv643xx_eth_stop; 1322 dev->stop = mv643xx_eth_stop;
1341 dev->hard_start_xmit = mv643xx_eth_start_xmit; 1323 dev->hard_start_xmit = mv643xx_eth_start_xmit;
1342 dev->get_stats = mv643xx_eth_get_stats;
1343 dev->set_mac_address = mv643xx_eth_set_mac_address; 1324 dev->set_mac_address = mv643xx_eth_set_mac_address;
1344 dev->set_multicast_list = mv643xx_eth_set_rx_mode; 1325 dev->set_multicast_list = mv643xx_eth_set_rx_mode;
1345 1326