#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
#include <linux/usb.h>
+#include <linux/etherdevice.h>
/**
* usb_unpoison_anchored_urbs - let an anchor be used successfully again
}
EXPORT_SYMBOL_GPL(usb_unpoison_anchored_urbs);
+/**
+ * eth_mac_addr - set new Ethernet hardware address
+ * @dev: network device
+ * @p: socket address
+ * Change hardware address of device.
+ *
+ * This doesn't change hardware matching, so needs to be overridden
+ * for most real devices.
+ */
+int eth_mac_addr(struct net_device *dev, void *p)
+{
+ struct sockaddr *addr = p;
+
+ if (netif_running(dev))
+ return -EBUSY;
+ if (!is_valid_ether_addr(addr->sa_data))
+ return -EADDRNOTAVAIL;
+ memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
+ return 0;
+}
+EXPORT_SYMBOL(eth_mac_addr);
+/* Source: net/ethernet/eth.c */
+
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) */
} \
)
+extern int eth_mac_addr(struct net_device *dev, void *p);
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) */
#endif /* LINUX_26_29_COMPAT_H */