aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/rndis_host.c
Commit message (Collapse)AuthorAgeFilesLines
* rndis_host: support WM6 devices as modemsThomas Backlund2008-07-221-0/+4
| | | | | | | | | | | | | | | | | | | | | This patch allows Windows Mobile 6 devices to be used for tethering -- that is, used as modems. It was requested by AdamW in kernel bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=11119 and Mandriva kernel-discuss list. It is tested and confirmed to work by Peterl: http://forum.eeeuser.com/viewtopic.php?pid=323543#p323543 This patch is based on the patch in the above kernel bugzilla, which is from the usb-rndis-lite tree. [ dbrownell@users.sourceforge.net: misc fixes ] Signed-off-by: Thomas Backlund <tmb@mandriva.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* rndis_host: pass buffer length to rndis_commandJussi Kivilinna2008-06-281-7/+7
| | | | | | | | Pass buffer length to rndis_command so that rndis_command can read full response buffer from device instead of max CONTROL_BUFFER_SIZE bytes. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* Merge branch 'upstream-next-davem' of ↵David S. Miller2008-05-291-2/+2
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
| * misc drivers/net endianness noiseAl Viro2008-05-221-2/+2
| | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | rndis_host: increase delay in command response loopPierre Ynard2008-05-221-1/+1
|/ | | | | | | | | | | | | | | | | | Some devices running some WinCE firmware (with SC_* Samsung processors according to the SynCE project, verified on a HTC P3600 device) fail to register because they apparently need extra time to respond correctly to requests. Increase the existing delay to satisfy them. Based on code from the SynCE project, on a suggestion of David Brownell. This patch Works For Me(tm). Signed-off-by: Pierre Ynard <linkfanel@yahoo.fr> Acked-by: David Brownell <david-b@pacbell.net> Cc: Greg KH <greg@kroah.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* Merge branch 'master' of ↵David S. Miller2008-03-271-3/+6
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/usb/rndis_host.c drivers/net/wireless/b43/dma.c net/ipv6/ndisc.c
| * rndis_host: fix oops when query for OID_GEN_PHYSICAL_MEDIUM failsJussi Kivilinna2008-03-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When query for OID_GEN_PHYSICAL_MEDIUM fails, uninitialized pointer 'phym' is being accessed in generic_rndis_bind(), resulting OOPS. Patch fixes phym to be initialized and setup correctly when rndis_query() for physical medium fails. Bug was introduced by following commit: commit 039ee17d1baabaa21783a0d5ab3e8c6d8c794bdf Author: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Date: Sun Jan 27 23:34:33 2008 +0200 Reported-by: Dmitri Monakhov <dmonakhov@openvz.org> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | endianness annotations: rndisAl Viro2008-03-261-1/+2
| | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | misc drivers/net annotationsAl Viro2008-03-261-1/+1
|/ | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* rndis_host: fix transfer size negotiationJean-Christophe Dubois2008-03-171-4/+8
| | | | | | | | | | | | | This patch should resolve a problem that's troubled support for some RNDIS peripherals. It seems to have boiled down to using a variable to establish transfer size limits before it was assigned, which caused those devices to fallback to a default "jumbogram" mode we don't support. Fix by assigning it earlier for RNDIS. Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net> [ cleanups ] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Move usbnet.h and rndis_host.h to include/linux/usbJussi Kivilinna2008-01-311-3/+2
| | | | | | | | | | | Move headers usbnet.h and rndis_host.h to include/linux/usb and fix includes for drivers/net/usb modules. Headers are moved because rndis_wlan will be outside drivers/net/usb in drivers/net/wireless and yet need these headers. 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>
* rndis_host: Add RNDIS physical medium checking into generic_rndis_bind()Jussi Kivilinna2008-01-311-3/+33
| | | | | | | | | | Add RNDIS physical medium checking into generic_rndis_bind() and also make rndis_host to be only bind on every medium except wireless. 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>
* rndis_host: Add link_change function pointer to 'struct rndis_data'.Jussi Kivilinna2008-01-311-4/+20
| | | | | | | | | | Callback to signal link state changes from minidriver to 'subminidrivers'. 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>
* rndis_host: Add early_init function pointer to 'struct rndis_data'.Jussi Kivilinna2008-01-311-0/+6
| | | | | | | | | | | | | | 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>
* rndis_host: export functionsJussi Kivilinna2008-01-311-7/+13
| | | | | | | | | | Export rndis_host functions and also rename rndis_bind() to generic_rndis_bind() for modules using rndis_host as base. 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>
* rndis_host: Split up rndis_host.cJussi Kivilinna2008-01-311-222/+1
| | | | | | | | | | Split up rndis_host.c into rndis_host.h and rndis_base.c. This is done so that rndis_wlan can reuse common parts with rndis_host. 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>
* rndis_host: Fix rndis packet filter flags.Jussi Kivilinna2008-01-311-1/+22
| | | | | | | | | | | RNDIS packet filter flags are not exactly the same as CDC flags so we cannot reuse them. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Bjorge Dijkstra <bjd@jooz.net> 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>
* rndis_host: Halt device if rndis_bind fails.Jussi Kivilinna2008-01-311-3/+9
| | | | | | | | | | | When bind fails after device was initialized, shutdown device properly by sending RNDIS_MSG_HALT. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Bjorge Dijkstra <bjd@jooz.net> 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>
* rndis_host: Use 1KB buffer in rndis_unbindJussi Kivilinna2008-01-311-1/+1
| | | | | | | | | | rndis_command requires the caller to pass in a buffer of at least 1KB. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Bjorge Dijkstra <bjd@jooz.net> 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>
* rndis_host: Fix sparse warningBjorge Dijkstra2008-01-311-1/+1
| | | | | | | | | | rndis_unbind and usbnet_cdc_unbind don't return anything. Signed-off-by: Bjorge Dijkstra <bjd@jooz.net> 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>
* rndis_host: reduce MTU instead of refusing to talk to devices with low max ↵Thomas Sailer2007-10-251-5/+13
| | | | | | | | | | | | | | | | | | | | | packet size This patch makes the host RNDIS driver talk to RNDIS devices with an MTU less than 1.5k, instead of refusing to talk to such a device. Signed-Off-by: Thomas Sailer <t.sailer@alumni.ethz.ch> Acked-by: David Brownell <dbrownell@users.sourceforge.net> -- Hi Jeff, are you the right person to send this to? Nobody else seems to be wanting to forward this to Linus... Thanks, Tom Signed-off-by: Jeff Garzik <jeff@garzik.org>
* USB: handle more rndis_host odditiesDavid Brownell2007-05-221-0/+1
| | | | | | | | | | | | Workaround another device firmware bug, wherein CDC descriptors get placed in a wrong place never previously observed in the wild. Fix a bug where a seeming RNDIS device returns a bogus response during device initialization. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Move USB network drivers to drivers/net/usb.Jeff Garzik2007-05-091-0/+727
It is preferable to group drivers by usage (net, scsi, ATA, ...) than by bus. When reviewing drivers, the [PCI|USB|PCMCIA|...] maintainer is probably less qualified on networking issues than a networking maintainer. Also, from a practical standpoint, chips often appear on multiple buses, which is why we do not put drivers into drivers/pci/net. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>