aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/rndis_host.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-02-17drivers/net/usb: Use netif_<level> logging facilitiesJoe Perches1-8/+6
Convert from: if (netif_msg_<foo>(priv)) dev_<level>(dev... to netif_<level>(priv, foo, dev... Also convert a few: if (i < REG_TIMEOUT) { etc... return ret; } to if (i >= REG_TIMEOUT) goto fail; etc... return ret; Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-17usbnet: Convert dev(dbg|err|warn|info) macros to netdev_<level>Joe Perches1-5/+5
These macros are too similar to the dev_<level> equivalents but take a usbnet * argument. Convert them to the recently introduced netdev_<level> macros and remove the old macros. The old macros had "\n" appended to the format string. Add the "\n" to the converted uses. Some existing uses of the dev<foo> macros in cdc_eem.c probably mistakenly had trailing "\n". No "\n" added there. Fix net1080 this/other log message inversion. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-03drivers/net: Move && and || to end of previous lineJoe Perches1-5/+5
Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-30USB: rndis_host: debug info clobbered before it is loggedGeorge Nassar1-3/+3
The MTU throttle-down if a RNDIS device doesn't support a particular packet size is being incorrectly logged. The attempted packet size is being clobbered before it gets logged. First patch; please inform if I'm doing this incorrectly. Diff'd against latest official source as per the FAQ; forward port to current git version is straightforward. Signed-off-by: George Nassar <george.nassar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-07rndis_host: support ETHTOOL_GPERMADDRJohn W. Linville1-0/+1
Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-04rndis_host: allow rndis_wlan to see all indicationsJussi Kivilinna1-21/+29
Allow rndis_wlan to see all indications. Currently rndis_host lets rndis_wlan to know about link state changes only, but there is whole set of other 802.11-specific indications that rndis_wlan should handle properly. So rename link_change() to indication() and convert rndis_wlan to use it. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-30rndis_host: Use netdev stats structureHerbert Xu1-1/+1
Now that netdev has its own stats structure we should use that instead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21usbnet: convert rndis driver to net_device_opsStephen Hemminger1-1/+12
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-14rndis: remove private wrapper of __constant_cpu_to_le32Harvey Harrison1-14/+11
Use cpu_to_le32 directly as it handles constant folding now, replace direct uses of __constant_cpu_to_{endian} as well. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-22rndis_host: support WM6 devices as modemsThomas Backlund1-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>
2008-06-28rndis_host: pass buffer length to rndis_commandJussi Kivilinna1-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>
2008-05-29Merge branch 'upstream-next-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6David S. Miller1-2/+2
2008-05-22misc drivers/net endianness noiseAl Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-22rndis_host: increase delay in command response loopPierre Ynard1-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>
2008-03-27Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-3/+6
Conflicts: drivers/net/usb/rndis_host.c drivers/net/wireless/b43/dma.c net/ipv6/ndisc.c
2008-03-26endianness annotations: rndisAl Viro1-1/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26misc drivers/net annotationsAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-25rndis_host: fix oops when query for OID_GEN_PHYSICAL_MEDIUM failsJussi Kivilinna1-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>
2008-03-17rndis_host: fix transfer size negotiationJean-Christophe Dubois1-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>
2008-01-31Move usbnet.h and rndis_host.h to include/linux/usbJussi Kivilinna1-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>
2008-01-31rndis_host: Add RNDIS physical medium checking into generic_rndis_bind()Jussi Kivilinna1-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>
2008-01-31rndis_host: Add link_change function pointer to 'struct rndis_data'.Jussi Kivilinna1-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>
2008-01-31rndis_host: Add early_init function pointer to 'struct rndis_data'.Jussi Kivilinna1-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>
2008-01-31rndis_host: export functionsJussi Kivilinna1-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>
2008-01-31rndis_host: Split up rndis_host.cJussi Kivilinna1-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>
2008-01-31rndis_host: Fix rndis packet filter flags.Jussi Kivilinna1-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>
2008-01-31rndis_host: Halt device if rndis_bind fails.Jussi Kivilinna1-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>
2008-01-31rndis_host: Use 1KB buffer in rndis_unbindJussi Kivilinna1-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>
2008-01-31rndis_host: Fix sparse warningBjorge Dijkstra1-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>
2007-10-25rndis_host: reduce MTU instead of refusing to talk to devices with low max packet sizeThomas Sailer1-5/+13
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>
2007-05-22USB: handle more rndis_host odditiesDavid Brownell1-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>
2007-05-09Move USB network drivers to drivers/net/usb.Jeff Garzik1-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>