diff mbox

[RFC,2/3] USBNET: Introduce usbnet platform data

Message ID 20110312224003.27344.97018.stgit@otae.warmcat.com
State New
Headers show

Commit Message

Andy Green March 12, 2011, 10:40 p.m. UTC
This defines optional platform_data for usbnet.  It allows
you to force eth%d name usage based on board-level knowledge
that it is soldered to a board and wired to an RJ45 on the board,
and to set the MAC address to a specific value from board
definition file.

Signed-off-by: Andy Green <andy.green@linaro.org>
---

 include/linux/usb/usbnet.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 44842c8..ad6ad94 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -195,6 +195,14 @@  struct skb_data {	/* skb->cb is one of these */
 	size_t			length;
 };
 
+#define USBNET_PLATDATA_FLAG__FORCE_ETH_IFNAME BIT(0)
+#define USBNET_PLATDATA_FLAG__USE_MAC BIT(1)
+
+struct usbnet_platform_data {
+	u8 mac[ETH_ALEN];
+	u32 flags;
+};
+
 extern int usbnet_open(struct net_device *net);
 extern int usbnet_stop(struct net_device *net);
 extern netdev_tx_t usbnet_start_xmit(struct sk_buff *skb,