1 #ifndef __LINUX_ETHERDEVICE_WRAPPER_H
2 #define __LINUX_ETHERDEVICE_WRAPPER_H 1
4 #include_next <linux/etherdevice.h>
5 #include <linux/version.h>
7 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
8 static inline void eth_hw_addr_random(struct net_device *dev)
10 random_ether_addr(dev->dev_addr);
12 #elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
13 static inline void eth_hw_addr_random(struct net_device *dev)
15 dev_hw_addr_random(dev, dev->dev_addr);