Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121894
b: refs/heads/master
c: c02373b
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 20, 2008
1 parent a1ee4f7 commit 2a26f55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ccad637b0c57de1825ffd34c311bf71487545ac2
refs/heads/master: c02373bf2759dd210dc8c72c9c9b4a8f1c279cac
12 changes: 8 additions & 4 deletions trunk/drivers/net/loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev)
return 0;
}

static struct net_device_stats *get_stats(struct net_device *dev)
static struct net_device_stats *loopback_get_stats(struct net_device *dev)
{
const struct pcpu_lstats *pcpu_lstats;
struct net_device_stats *stats = &dev->stats;
Expand Down Expand Up @@ -143,13 +143,17 @@ static void loopback_dev_free(struct net_device *dev)
free_netdev(dev);
}

static const struct net_device_ops loopback_ops = {
.ndo_init = loopback_dev_init,
.ndo_get_stats = loopback_get_stats,
};

/*
* The loopback device is special. There is only one instance
* per network namespace.
*/
static void loopback_setup(struct net_device *dev)
{
dev->get_stats = &get_stats;
dev->mtu = (16 * 1024) + 20 + 20 + 12;
dev->hard_start_xmit = loopback_xmit;
dev->hard_header_len = ETH_HLEN; /* 14 */
Expand All @@ -165,8 +169,8 @@ static void loopback_setup(struct net_device *dev)
| NETIF_F_NETNS_LOCAL;
dev->ethtool_ops = &loopback_ethtool_ops;
dev->header_ops = &eth_header_ops;
dev->init = loopback_dev_init;
dev->destructor = loopback_dev_free;
dev->netdev_ops = &loopback_ops;
dev->destructor = loopback_dev_free;
}

/* Setup and register the loopback device. */
Expand Down

0 comments on commit 2a26f55

Please sign in to comment.