diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2008-01-26 01:51:28 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-01 06:26:58 +0300 |
commit | 7c39e038fc738012ba36ed222bb62545ee59c012 (patch) | |
tree | 89d295e93ffe70fbc6f498fde466eade8c173d8a /drivers/net/usb/rndis_host.c | |
parent | 476842b1962c7cf5ccea57dcfad26dc77d16e363 (diff) | |
download | linux-7c39e038fc738012ba36ed222bb62545ee59c012.tar.xz |
rndis_host: Add early_init function pointer to 'struct rndis_data'.
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/rndis_host.c')
-rw-r--r-- | drivers/net/usb/rndis_host.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 1d6bf0a28cec..08139030954f 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, |