]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/hdlc_raw_eth.c
ath5k: Restore saved initval after POST
[linux-2.6-omap-h63xx.git] / drivers / net / wan / hdlc_raw_eth.c
index 1a69a9aaa9b95fae17ffc077a1d8100dd612f414..26dee600506f71b942ffd78687e5c2378304a9ba 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/init.h>
 #include <linux/skbuff.h>
 #include <linux/pkt_sched.h>
-#include <linux/random.h>
 #include <linux/inetdevice.h>
 #include <linux/lapb.h>
 #include <linux/rtnetlink.h>
@@ -34,7 +33,7 @@ static int eth_tx(struct sk_buff *skb, struct net_device *dev)
                int len = skb->len;
                if (skb_tailroom(skb) < pad)
                        if (pskb_expand_head(skb, 0, pad, GFP_ATOMIC)) {
-                               hdlc_stats(dev)->tx_dropped++;
+                               dev->stats.tx_dropped++;
                                dev_kfree_skb(skb);
                                return 0;
                        }
@@ -59,7 +58,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
        raw_hdlc_proto new_settings;
        hdlc_device *hdlc = dev_to_hdlc(dev);
        int result;
-       void *old_ch_mtu;
+       int (*old_ch_mtu)(struct net_device *, int);
        int old_qlen;
 
        switch (ifr->ifr_settings.type) {
@@ -96,7 +95,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
                if (result)
                        return result;
 
-               result = attach_hdlc_protocol(dev, &proto, NULL,
+               result = attach_hdlc_protocol(dev, &proto,
                                              sizeof(raw_hdlc_proto));
                if (result)
                        return result;
@@ -107,8 +106,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr)
                ether_setup(dev);
                dev->change_mtu = old_ch_mtu;
                dev->tx_queue_len = old_qlen;
-               memcpy(dev->dev_addr, "\x00\x01", 2);
-                get_random_bytes(dev->dev_addr + 2, ETH_ALEN - 2);
+               random_ether_addr(dev->dev_addr);
                netif_dormant_off(dev);
                return 0;
        }