]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/hdlc_raw_eth.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / wan / hdlc_raw_eth.c
index 8895394e60062071fc986a7b0acd4218fdbe3ef4..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;
                        }
@@ -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;
        }