[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110312224003.27344.97018.stgit@otae.warmcat.com>
Date: Sat, 12 Mar 2011 22:40:03 +0000
From: Andy Green <andy@...mcat.com>
To: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Cc: patches@...aro.org, Andy Green <andy.green@...aro.org>
Subject: [RFC PATCH 2/3] USBNET: Introduce usbnet platform data
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@...aro.org>
---
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists