linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / rose / rose_dev.c
index 7c279e2..d297af7 100644 (file)
@@ -6,6 +6,7 @@
  *
  * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
  */
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/kernel.h>
@@ -59,7 +60,6 @@ static int rose_rebuild_header(struct sk_buff *skb)
        struct net_device_stats *stats = netdev_priv(dev);
        unsigned char *bp = (unsigned char *)skb->data;
        struct sk_buff *skbn;
-       unsigned int len;
 
 #ifdef CONFIG_INET
        if (arp_find(bp + 7, skb)) {
@@ -76,8 +76,6 @@ static int rose_rebuild_header(struct sk_buff *skb)
 
        kfree_skb(skb);
 
-       len = skbn->len;
-
        if (!rose_route_frame(skbn, NULL)) {
                kfree_skb(skbn);
                stats->tx_errors++;
@@ -85,7 +83,7 @@ static int rose_rebuild_header(struct sk_buff *skb)
        }
 
        stats->tx_packets++;
-       stats->tx_bytes += len;
+       stats->tx_bytes += skbn->len;
 #endif
        return 1;
 }
@@ -137,6 +135,7 @@ static struct net_device_stats *rose_get_stats(struct net_device *dev)
 
 void rose_setup(struct net_device *dev)
 {
+       SET_MODULE_OWNER(dev);
        dev->mtu                = ROSE_MAX_PACKET_SIZE - 2;
        dev->hard_start_xmit    = rose_xmit;
        dev->open               = rose_open;