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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

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

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,

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux