aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/loopback.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/loopback.c')
-rw-r--r--drivers/net/loopback.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 6df673a058ce..6ba6ed2b480a 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -164,11 +164,9 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
164 return 0; 164 return 0;
165} 165}
166 166
167static struct net_device_stats loopback_stats;
168
169static struct net_device_stats *get_stats(struct net_device *dev) 167static struct net_device_stats *get_stats(struct net_device *dev)
170{ 168{
171 struct net_device_stats *stats = &loopback_stats; 169 struct net_device_stats *stats = &dev->stats;
172 unsigned long bytes = 0; 170 unsigned long bytes = 0;
173 unsigned long packets = 0; 171 unsigned long packets = 0;
174 int i; 172 int i;
@@ -208,7 +206,6 @@ static const struct ethtool_ops loopback_ethtool_ops = {
208struct net_device loopback_dev = { 206struct net_device loopback_dev = {
209 .name = "lo", 207 .name = "lo",
210 .get_stats = &get_stats, 208 .get_stats = &get_stats,
211 .priv = &loopback_stats,
212 .mtu = (16 * 1024) + 20 + 20 + 12, 209 .mtu = (16 * 1024) + 20 + 20 + 12,
213 .hard_start_xmit = loopback_xmit, 210 .hard_start_xmit = loopback_xmit,
214 .hard_header = eth_header, 211 .hard_header = eth_header,