diff options
author | Krzysztof Halasa <khc@pm.waw.pl> | 2008-02-01 22:39:50 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-02-05 13:31:40 -0500 |
commit | 47eaa267a5db1729d238f977364e297b8963e115 (patch) | |
tree | d0185dcffbbb272ac422a00a9c0e44cf7850438b /drivers/net/wan/hdlc_fr.c | |
parent | 40d25142f2ef27084fc317ac8bb5bae460c8ea72 (diff) | |
download | linux-47eaa267a5db1729d238f977364e297b8963e115.tar.gz linux-47eaa267a5db1729d238f977364e297b8963e115.tar.bz2 linux-47eaa267a5db1729d238f977364e297b8963e115.zip |
Generic HDLC - use random_ether_addr()
Generic HDLC now uses random_ether_addr() for generating MAC addresse
for Ethernet-alike interfaces.
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/wan/hdlc_fr.c')
-rw-r--r-- | drivers/net/wan/hdlc_fr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 2bd609c27068..c4ab0326f911 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -42,7 +42,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> @@ -1120,10 +1119,9 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type) return -ENOBUFS; } - if (type == ARPHRD_ETHER) { - memcpy(dev->dev_addr, "\x00\x01", 2); - get_random_bytes(dev->dev_addr + 2, ETH_ALEN - 2); - } else { + if (type == ARPHRD_ETHER) + random_ether_addr(dev->dev_addr); + else { *(__be16*)dev->dev_addr = htons(dlci); dlci_to_q922(dev->broadcast, dlci); } |