netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, bjd@jooz.net
Subject: Re: [PATCH 10/14] [rndis_host] Add early_init function pointer to 'struct rndis_data'.
Date: Sun, 27 Jan 2008 08:14:43 -0800	[thread overview]
Message-ID: <200801270814.43760.david-b@pacbell.net> (raw)
In-Reply-To: <20080125225128.11716.59998.stgit@fate.lan>

On Friday 25 January 2008, Jussi Kivilinna wrote:
> Function pointer is for 'subminidrivers' that need to do work on device 
> right after minidriver has initialized hardware.
> 
> For example, rndis_wlan setting device specific configuration parameters
> with OID_GEN_RNDIS_CONFIG_PARAMETER right after rndis_host has 
> initialized hardware with RNDIS_INIT.
> 
> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>

Acked-by: David Brownell <dbrownell@users.sourceforge.net>

... though I'm not sure I'd coin a term like "subminidriver".  ;)


> ---
> 
>  drivers/net/usb/rndis_host.c |    6 ++++++
>  drivers/net/usb/usbnet.h     |    5 +++++
>  2 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
> index 1d6bf0a..0813903 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->early_init &&
> +			dev->driver_info->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..25b63d3 100644
> --- a/drivers/net/usb/usbnet.h
> +++ b/drivers/net/usb/usbnet.h
> @@ -116,6 +116,11 @@ struct driver_info {
>  	struct sk_buff	*(*tx_fixup)(struct usbnet *dev,
>  				struct sk_buff *skb, gfp_t flags);
>  
> +	/* early initialization code, can sleep. This is for minidrivers
> +	 * having 'subminidrivers' that need to do extra initialization
> +	 * right after minidriver have initialized hardware. */
> +	int	(*early_init)(struct usbnet *dev);
> +
>  	/* for new devices, use the descriptor-reading code instead */
>  	int		in;		/* rx endpoint */
>  	int		out;		/* tx endpoint */
> 



  reply	other threads:[~2008-01-27 16:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 22:50 [PATCH 00/14][v3]: Driver for Wireless RNDIS USB devices Jussi Kivilinna
     [not found] ` <20080125225032.11716.77713.stgit-q/85JClnwdg@public.gmane.org>
2008-01-25 22:50   ` [PATCH 01/14] Fix sparse warning: returning void-valued expression Jussi Kivilinna
2008-01-25 22:50   ` [PATCH 02/14] [cdc_ether] Hardwire CDC descriptors when missing Jussi Kivilinna
2008-01-25 22:50   ` [PATCH 04/14] [rndis_host] Halt device if rndis_bind fails Jussi Kivilinna
2008-01-25 22:51   ` [PATCH 06/14] [usbnet] Use wlan device name for RNDIS wireless devices Jussi Kivilinna
2008-01-25 22:51   ` [PATCH 07/14] [rndis_host] Split up rndis_host.c Jussi Kivilinna
2008-01-25 22:51   ` [PATCH 10/14] [rndis_host] Add early_init function pointer to 'struct rndis_data' Jussi Kivilinna
2008-01-27 16:14     ` David Brownell [this message]
     [not found]       ` <200801270814.43760.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-01-27 19:11         ` Jussi Kivilinna
2008-01-25 22:51   ` [PATCH 12/14] [rndis_host] Add RNDIS physical medium checking into generic_rndis_bind() Jussi Kivilinna
     [not found]     ` <20080125225139.11716.91641.stgit-q/85JClnwdg@public.gmane.org>
2008-01-27 16:29       ` David Brownell
2008-01-27 19:05         ` Jussi Kivilinna
2008-01-27 19:51           ` David Brownell
2008-01-25 23:09   ` [PATCH 00/14][v3]: Driver for Wireless RNDIS USB devices David Brownell
     [not found]     ` <200801251509.24377.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-01-26 12:21       ` Jussi Kivilinna
2008-01-25 22:50 ` [PATCH 03/14] [rndis_host] Use 1KB buffer in rndis_unbind Jussi Kivilinna
2008-01-25 22:51 ` [PATCH 05/14] [rndis_host] Fix rndis packet filter flags Jussi Kivilinna
2008-01-25 22:51 ` [PATCH 08/14] [rndis_host] export functions Jussi Kivilinna
2008-01-25 22:51 ` [PATCH 09/14] [usbnet] add driver_priv pointer to 'struct usbnet' Jussi Kivilinna
2008-01-25 22:51 ` [PATCH 11/14] [rndis_host] Add link_change function pointer to 'struct rndis_data' Jussi Kivilinna
     [not found]   ` <20080125225134.11716.2264.stgit-q/85JClnwdg@public.gmane.org>
2008-01-27 16:15     ` David Brownell
2008-01-25 22:51 ` [PATCH 13/14] Move usbnet.h and rndis_host.h to include/linux/usb Jussi Kivilinna
2008-01-27 16:36   ` David Brownell
2008-01-25 22:51 ` [PATCH 14/14] Add new driver 'rndis_wlan' for wireless RNDIS devices Jussi Kivilinna
2008-01-27 16:43   ` David Brownell

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=200801270814.43760.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=bjd@jooz.net \
    --cc=jussi.kivilinna@mbnet.fi \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).