1 #ifndef LINUX_3_0_COMPAT_H
2 #define LINUX_3_0_COMPAT_H
4 #include <linux/version.h>
6 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
9 * since commit 1c5cae815d19ffe02bdfda1260949ef2b1806171
10 * "net: call dev_alloc_name from register_netdevice" dev_alloc_name is
11 * called automatically. This is not implemented in older kernel
12 * versions so it will result in device wrong names.
14 static inline int register_netdevice_name(struct net_device *dev)
18 if (strchr(dev->name, '%')) {
19 err = dev_alloc_name(dev, dev->name);
24 return register_netdevice(dev);
27 #define register_netdevice(dev) register_netdevice_name(dev)
29 /* BCMA core, see drivers/bcma/ */
31 /* Broadcom's specific AMBA core, see drivers/bcma/ */
32 struct bcma_device_id {
38 #define BCMA_CORE(_manuf, _id, _rev, _class) \
39 { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, }
40 #define BCMA_CORETABLE_END \
43 #define BCMA_ANY_MANUF 0xFFFF
44 #define BCMA_ANY_ID 0xFFFF
45 #define BCMA_ANY_REV 0xFF
46 #define BCMA_ANY_CLASS 0xFF
47 #endif /* BCMA_CORE */
49 int mac_pton(const char *s, u8 *mac);
51 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)) */
53 #endif /* LINUX_3_0_COMPAT_H */