backports: do not call dev_hw_addr_random()
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 8 Dec 2013 15:08:14 +0000 (16:08 +0100)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sun, 8 Dec 2013 18:30:42 +0000 (19:30 +0100)
SLES 11 SP3 does not have dev_hw_addr_random() so this patch includes
the stuff which would be done in dev_hw_addr_random() in
eth_hw_addr_random().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
backport/backport-include/linux/etherdevice.h

index de0744c867a52cbc48a7bf1b212dd7d65fb75000..5a6096d74ddfc45fa54c250eac30553ed8b8ce6f 100644 (file)
@@ -40,7 +40,8 @@ static inline void eth_hw_addr_random(struct net_device *dev)
 #define eth_hw_addr_random LINUX_BACKPORT(eth_hw_addr_random)
 static inline void eth_hw_addr_random(struct net_device *dev)
 {
-       dev_hw_addr_random(dev, dev->dev_addr);
+       dev->addr_assign_type |= NET_ADDR_RANDOM;
+       random_ether_addr(dev->dev_addr);
 }
 #endif