mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Green <andy@warmcat.com>
To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Cc: patches@linaro.org, Andy Green <andy.green@linaro.org>
Subject: [RFC PATCH 2/3] USBNET: Introduce usbnet platform data
Date: Sat, 12 Mar 2011 22:40:03 +0000	[thread overview]
Message-ID: <20110312224003.27344.97018.stgit@otae.warmcat.com> (raw)
In-Reply-To: <20110312223643.27344.72406.stgit@otae.warmcat.com>

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,


  parent reply	other threads:[~2011-03-12 22:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 22:39 [RFC PATCH 0/3] USB: async platform_data support for usb and usbnet Andy Green
2011-03-12 22:39 ` [RFC PATCH 1/3] USB HOST CORE:probed devices collect any platform_data waiting for them Andy Green
2011-03-12 22:40 ` Andy Green [this message]
2011-03-12 22:40 ` [RFC PATCH 3/3] USBNET: Use usbnet platform data if it is present Andy Green

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110312224003.27344.97018.stgit@otae.warmcat.com \
    --to=andy@warmcat.com \
    --cc=andy.green@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=patches@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome