diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-09-13 01:28:03 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-13 01:28:03 +0400 |
commit | b88a762b6062f06d431af0045de4854a758646c0 (patch) | |
tree | f85f579a183fa314ea793e178e28066476f01f7f /net/netrom/nr_dev.c | |
parent | e21ce8c7c013fb223a002c70bb0a547de6c26c12 (diff) | |
download | linux-b88a762b6062f06d431af0045de4854a758646c0.tar.xz |
[NETROM]: Introduct stuct nr_private
NET/ROM's virtual interfaces don't have a proper private data
structure yet. Create struct nr_private and put the statistics there.
Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netrom/nr_dev.c')
-rw-r--r-- | net/netrom/nr_dev.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index 909aa7f50744..4e66eef9a034 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c @@ -160,10 +160,9 @@ static int nr_close(struct net_device *dev) static int nr_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = netdev_priv(dev); - unsigned int len; - - len = skb->len; + struct nr_private *nr = netdev_priv(dev); + struct net_device_stats *stats = &nr->stats; + unsigned int len = skb->len; if (!nr_route_frame(skb, NULL)) { kfree_skb(skb); @@ -179,7 +178,9 @@ static int nr_xmit(struct sk_buff *skb, struct net_device *dev) static struct net_device_stats *nr_get_stats(struct net_device *dev) { - return netdev_priv(dev); + struct nr_private *nr = netdev_priv(dev); + + return &nr->stats; } void nr_setup(struct net_device *dev) |