lkml.org 
[lkml]   [2011]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 2/3] USBNET: Introduce usbnet platform data
Date
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 --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,


\
 
 \ /
  Last update: 2011-03-12 23:43    [W:0.032 / U:1.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site