diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/gianfar.c | 7 |
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. */ |
1238 | static void gfar_timeout(struct net_device *dev) | 1238 | static 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 | ||
1347 | static inline void count_errors(unsigned short status, struct gfar_private *priv) | 1345 | static 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); |