aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 22:06:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 22:06:48 -0400
commitebb3e820b83e426ee331bae6d8fb0e54f472a25d (patch)
tree937725ea5c2af7982d2ee362dee8c78ece37ba9d /drivers/net/gianfar.c
parente5712a6a98862c2bd58a3c1ffc88062da9e2f02c (diff)
parent1a1769f32349a188db48cf81fe306b6f841fc246 (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: WOL bugfix for 3c59x.c skge 1.12 skge: add a debug interface skge: eeprom support skge: internal stats skge: XM PHY handling fixes skge: changing MTU while running causes problems skge: fix ram buffer size calculation gianfar: Fix compile regression caused by 09f75cd7 net: Fix new EMAC driver for NAPI changes bonding: two small fixes for IPoIB support e1000e: don't poke PHY registers to retreive link status e1000e: fix error checks e1000e: Fix debug printk macro tokenring/3c359.c: fixed array index problem [netdrvr] forcedeth: remove in-driver copy of net_device_stats [netdrvr] forcedeth: improved probe info; dev_printk() cleanups forcedeth: fix NAPI rx poll function
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 558440c15b6c..cc288d8f6a53 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1237,8 +1237,6 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)
1237 * starting over will fix the problem. */ 1237 * starting over will fix the problem. */
1238static void gfar_timeout(struct net_device *dev) 1238static void gfar_timeout(struct net_device *dev)
1239{ 1239{
1240 struct gfar_private *priv = netdev_priv(dev);
1241
1242 dev->stats.tx_errors++; 1240 dev->stats.tx_errors++;
1243 1241
1244 if (dev->flags & IFF_UP) { 1242 if (dev->flags & IFF_UP) {
@@ -1344,8 +1342,9 @@ struct sk_buff * gfar_new_skb(struct net_device *dev, struct rxbd8 *bdp)
1344 return skb; 1342 return skb;
1345} 1343}
1346 1344
1347static inline void count_errors(unsigned short status, struct gfar_private *priv) 1345static inline void count_errors(unsigned short status, struct net_device *dev)
1348{ 1346{
1347 struct gfar_private *priv = netdev_priv(dev);
1349 struct net_device_stats *stats = &dev->stats; 1348 struct net_device_stats *stats = &dev->stats;
1350 struct gfar_extra_stats *estats = &priv->extra_stats; 1349 struct gfar_extra_stats *estats = &priv->extra_stats;
1351 1350
@@ -1539,7 +1538,7 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
1539 1538
1540 dev->stats.rx_bytes += pkt_len; 1539 dev->stats.rx_bytes += pkt_len;
1541 } else { 1540 } else {
1542 count_errors(bdp->status, priv); 1541 count_errors(bdp->status, dev);
1543 1542
1544 if (skb) 1543 if (skb)
1545 dev_kfree_skb_any(skb); 1544 dev_kfree_skb_any(skb);