Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=33036807b32d5ed1f4fdfe2d5e6bab2bb260b9f7
Commit:     33036807b32d5ed1f4fdfe2d5e6bab2bb260b9f7
Parent:     87a596e0b8bc344bd6bfebe83b56d11fb79ee23a
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 10 13:25:40 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:28:52 2007 -0700

    [NET]: loopback driver can use loopback_dev integrated net_device_stats
    
    Rusty added a new 'stats' field to struct net_device.
    
    loopback driver can use it instead of declaring another struct
    net_device_stats This saves some memory.
    
    Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/loopback.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 6df673a..6ba6ed2 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)
        return 0;
 }
 
-static struct net_device_stats loopback_stats;
-
 static struct net_device_stats *get_stats(struct net_device *dev)
 {
-       struct net_device_stats *stats = &loopback_stats;
+       struct net_device_stats *stats = &dev->stats;
        unsigned long bytes = 0;
        unsigned long packets = 0;
        int i;
@@ -208,7 +206,6 @@ static const struct ethtool_ops loopback_ethtool_ops = {
 struct net_device loopback_dev = {
        .name                   = "lo",
        .get_stats              = &get_stats,
-       .priv                   = &loopback_stats,
        .mtu                    = (16 * 1024) + 20 + 20 + 12,
        .hard_start_xmit        = loopback_xmit,
        .hard_header            = eth_header,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to