From patchwork Sat Mar 12 22:40:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 533 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:23 -0000 Delivered-To: patches@linaro.org Received: by 10.224.45.75 with SMTP id d11cs13582qaf; Sat, 12 Mar 2011 14:40:07 -0800 (PST) Received: by 10.227.202.80 with SMTP id fd16mr3879690wbb.229.1299969607241; Sat, 12 Mar 2011 14:40:07 -0800 (PST) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id l2si10970635wba.28.2011.03.12.14.40.06 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:40:07 -0800 (PST) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.50 as permitted sender) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.50 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by mail-ww0-f50.google.com with SMTP id 33so4664559wwc.31 for ; Sat, 12 Mar 2011 14:40:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=gx9C/U6jdp/PwZcZaqjKXm29QPU1/xesot3Ztusk5q4=; b=XeLVSJtxjpyScQrOFIMaNYyluIp7cvEuAkp84MW10h8ex4HTXGnAdLsS4JHboiZ5W4 +l1fzRsyPiPNWrom635bBDqOADQe5517GOrGzRzMSKt2wOczwI0Iuyrwb7DXVdgDlrhx iyYjwOg3UHq5lmEP3AYuA/KNA3tzZHba9v+Y8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=jC7MoAF+ACxfpmquH4XikV6BInHF6JNOk5yDDZBy45hZ+V9vM9RSAlnjoUSoFgRVjs YiDaS8Ene/phmIqjxzLcuYUNCScJI1NAE67KyUHd+t/vbf1mTbEctm+1M5tpVYAlNcHF 6nrO/ikyDFHVu6Ewh0kOgeI5n6VP0kZp27ll8= Received: by 10.216.4.83 with SMTP id 61mr849880wei.67.1299969606403; Sat, 12 Mar 2011 14:40:06 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id c54sm2971094wer.6.2011.03.12.14.40.05 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:40:06 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [RFC PATCH 2/3] USBNET: Introduce usbnet platform data To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: patches@linaro.org, Andy Green Date: Sat, 12 Mar 2011 22:40:03 +0000 Message-ID: <20110312224003.27344.97018.stgit@otae.warmcat.com> In-Reply-To: <20110312223643.27344.72406.stgit@otae.warmcat.com> References: <20110312223643.27344.72406.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 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 --- 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,