From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
To: linux-wireless@vger.kernel.org
Cc: bjd@jooz.net, dbrownell@users.sourceforge.net, netdev@vger.kernel.org
Subject: [PATCH 10/14] [rndis_host] Add rndis_early_init function pointer to 'struct rndis_data'.
Date: Sun, 20 Jan 2008 02:14:38 +0200 [thread overview]
Message-ID: <20080120001438.25718.96722.stgit@fate.lan> (raw)
Function pointer is for rndis minidrivers that need to do work on device right
after RNDIS_INIT. For example setting device specific configuration parameters
with OID_GEN_RNDIS_CONFIG_PARAMETER.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
drivers/net/usb/rndis_host.c | 6 ++++++
drivers/net/usb/usbnet.h | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 1d6bf0a..22e5ca1 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -336,6 +336,12 @@ int generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf)
dev->hard_mtu, tmp, dev->rx_urb_size,
1 << le32_to_cpu(u.init_c->packet_alignment));
+ /* module has some device initialization code needs to be done right
+ * after RNDIS_INIT */
+ if (dev->driver_info->rndis_early_init &&
+ dev->driver_info->rndis_early_init(dev) != 0)
+ goto halt_fail_and_release;
+
/* Get designated host ethernet address */
reply_len = ETH_ALEN;
retval = rndis_query(dev, intf, u.buf, OID_802_3_PERMANENT_ADDRESS,
diff --git a/drivers/net/usb/usbnet.h b/drivers/net/usb/usbnet.h
index 0b4bf09..2bc5f76 100644
--- a/drivers/net/usb/usbnet.h
+++ b/drivers/net/usb/usbnet.h
@@ -116,6 +116,9 @@ struct driver_info {
struct sk_buff *(*tx_fixup)(struct usbnet *dev,
struct sk_buff *skb, gfp_t flags);
+ /* rndis minidriver early initialization code, can sleep */
+ int (*rndis_early_init)(struct usbnet *dev);
+
/* for new devices, use the descriptor-reading code instead */
int in; /* rx endpoint */
int out; /* tx endpoint */
next reply other threads:[~2008-01-20 0:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-20 0:14 Jussi Kivilinna [this message]
2008-01-25 1:10 ` [PATCH 10/14] [rndis_host] Add rndis_early_init function pointer to 'struct rndis_data' David Brownell
2008-01-25 1:10 ` David Brownell
2008-01-25 13:14 ` Jussi Kivilinna
2008-01-25 13:14 ` Jussi Kivilinna
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=20080120001438.25718.96722.stgit@fate.lan \
--to=jussi.kivilinna@mbnet.fi \
--cc=bjd@jooz.net \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.