summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ar9170/usb.c
AgeCommit message (Collapse)Author
2011-04-07ar9170usb: purge obsolete driverChristian Lamparter
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-02wireless: Remove unnecessary casts of usb_get_intfdataJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-10-05ar9170: Remove MODULE_FIRMWARE references to two-stage firmwareBen Hutchings
The combined firmware ar9170.fw is preferred and supports all devices. References to the older two-stage firmware are unnecessary. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-26ar9170usb: fix read from freed driver contextChristian Lamparter
Commit "ar9170: wait for asynchronous firmware loading" introduced a bug, which is triggered by fatal errors while the driver is initializing the device. BUG: unable to handle kernel paging request at 6b6b6bf7 IP: [<c117b567>] kobject_put+0x7/0x70 *pde = 00000000 Oops: 0000 [#1] PREEMPT last sysfs file: /sys/devices/platform/hdaps/position Modules linked in: ar9170usb [...] Pid: 6246, comm: firmware/ar9170 Not tainted 2.6.34-wl #54 EIP: 0060:[<c117b567>] EFLAGS: 00010206 CPU: 0 EIP is at kobject_put+0x7/0x70 EAX: 6b6b6bd7 EBX: f4d3d0e0 ECX: f5ba9124 EDX: f6af2a7c ESI: 00000000 EDI: f4d3d0e0 EBP: 00000000 ESP: f5e98f9c DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 Process firmware/ar9170 (pid: 6246) Stack: c12532ed 00000246 f5bfaa70 f8487353 f4d3d0e0 Call Trace: [<c12532ed>] ? device_release_driver+0x1d/0x30 [<f8487353>] ? ar9170_usb_firmware_failed+0x43/0x70 [ar9170usb] [<c125983c>] ? request_firmware_work_func+0x2c/0x70 [<c1259810>] ? request_firmware_work_func+0x0/0x70 [<c10413f4>] ? kthread+0x74/0x80 [<c1041380>] ? kthread+0x0/0x80 [<c1003136>] ? kernel_thread_helper+0x6/0x10 Code: 40 d3 f2 ff 85 c0 89 c3 74 0a ba 44 86 4c c1 e8 [...] EIP: [<c117b567>] kobject_put+0x7/0x70 SS:ESP 0068:f5e98f9c CR2: 000000006b6b6bf7 ---[ end trace e81abb992434b410 ]--- Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits) USB: remove unused usb_buffer_alloc and usb_buffer_free macros usb: musb: update gfp/slab.h includes USB: ftdi_sio: fix legacy SIO-device header USB: kl5usb105: reimplement using generic framework USB: kl5usb105: minor clean ups USB: kl5usb105: fix memory leak USB: io_ti: use kfifo to implement write buffering USB: io_ti: remove unsused private counter USB: ti_usb: use kfifo to implement write buffering USB: ir-usb: fix incorrect write-buffer length USB: aircable: fix incorrect write-buffer length USB: safe_serial: straighten out read processing USB: safe_serial: reimplement read using generic framework USB: safe_serial: reimplement write using generic framework usb-storage: always print quirks USB: usb-storage: trivial debug improvements USB: oti6858: use port write fifo USB: oti6858: use kfifo to implement write buffering USB: cypress_m8: use kfifo to implement write buffering USB: cypress_m8: remove unused drain define ... Fix up conflicts (due to usb_buffer_alloc/free renaming) in drivers/input/tablet/acecad.c drivers/input/tablet/kbtab.c drivers/input/tablet/wacom_sys.c drivers/media/video/gspca/gspca.c sound/usb/usbaudio.c
2010-05-20USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-17Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2010-05-12ar9170usb: add vendor and device ID for Qwest/Actiontec 802AIN Wireless N ↵Steve Tanner
USB Network Adapter * add support for the Qwest/Actiontec 802AIN Wireless N USB Network Adapter. lsusb identifies the device as: "ID 1668:1200 Actiontec Electronics, Inc. [hex]" usb_modeswitch package and appropriate rules are required to switch the device from "ID 0ace:20ff ZyDas" Changes-licensed-under: GPL Signed-off-by: Steve Tanner <steve.tanner@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-12Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wireless/ath/ar9170/usb.c drivers/scsi/iscsi_tcp.c net/ipv4/ipmr.c
2010-05-11ar9170: fix for driver-core ABI changeStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-10Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2010-05-10Merge branch 'wireless-2.6' into wireless-next-2.6Reinette Chatre
Conflicts: drivers/net/wireless/iwlwifi/iwl-dev.h
2010-05-07ar9170: wait for asynchronous firmware loadingChristian Lamparter
This patch fixes a regression introduced by the following patch: "ar9170: load firmware asynchronously" When we kick off a firmware loading request and then unbind, or disconnect the usb device right away, we get into trouble: > ------------[ cut here ]------------ > WARNING: at lib/kref.c:44 kref_get+0x1c/0x20() > Hardware name: 18666GU > Modules linked in: ar9170usb [...] > Pid: 6588, comm: firmware/ar9170 Not tainted 2.6.34-rc5-wl #43 > Call Trace: > [<c102b05e>] ? warn_slowpath_common+0x6e/0xb0 > [<c117c93c>] ? kref_get+0x1c/0x20 > [<c102b0b3>] ? warn_slowpath_null+0x13/0x20 > [<c117c93c>] ? kref_get+0x1c/0x20 > [<c117bb2f>] ? kobject_get+0xf/0x20 > [<c124d630>] ? get_device+0x10/0x20 > [<c124e5a0>] ? device_add+0x60/0x530 > [<c117b8b5>] ? kobject_init+0x25/0xa0 > [<c12569f9>] ? _request_firmware+0x139/0x3e0 > [<c1256cc0>] ? request_firmware_work_func+0x20/0x70 > [<c1256ca0>] ? request_firmware_work_func+0x0/0x70 > [<c103ff24>] ? kthread+0x74/0x80 > [<c103feb0>] ? kthread+0x0/0x80 > [<c1003136>] ? kernel_thread_helper+0x6/0x10 >---[ end trace 2d50bd818f64a1b7 ]--- - followed by a random Oops - Avoid that by waiting for the firmware loading to finish (whether successfully or not) before the unbind in ar9170_usb_disconnect. Reported-by: Johannes Berg <johannes@sipsolutions.net> Bug-fixed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-15Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wireless/ath/ath5k/phy.c drivers/net/wireless/wl12xx/wl1271_main.c
2010-04-14ar9170usb: add a couple more USB IDsChristian Lamparter
This patch adds the following 5 entries to the usbid device table: * Netgear WNA1000 * Proxim ORiNOCO Dual Band 802.11n USB Adapter * 3Com Dual Band 802.11n USB Adapter * H3C Dual Band 802.11n USB Adapter * WNC Generic 11n USB dongle CC: <stable@kernel.org> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits) smc91c92_cs: fix the problem of "Unable to find hardware address" r8169: clean up my printk uglyness net: Hook up cxgb4 to Kconfig and Makefile cxgb4: Add main driver file and driver Makefile cxgb4: Add remaining driver headers and L2T management cxgb4: Add packet queues and packet DMA code cxgb4: Add HW and FW support code cxgb4: Add register, message, and FW definitions netlabel: Fix several rcu_dereference() calls used without RCU read locks bonding: fix potential deadlock in bond_uninit() net: check the length of the socket address passed to connect(2) stmmac: add documentation for the driver. stmmac: fix kconfig for crc32 build error be2net: fix bug in vlan rx path for big endian architecture be2net: fix flashing on big endian architectures be2net: fix a bug in flashing the redboot section bonding: bond_xmit_roundrobin() fix drivers/net: Add missing unlock net: gianfar - align BD ring size console messages net: gianfar - initialize per-queue statistics ...
2010-03-30setup correct int pipe type in ar9170_usb_exec_cmdValentin Longchamp
An int urb is constructed but we fill it in with a bulk pipe type. Commit f661c6f8c67bd55e93348f160d590ff9edf08904 implemented a pipe type check when CONFIG_USB_DEBUG is enabled. The check failed for all the ar9170 usb transfers and the driver could not configure the wifi dongle. This went unnoticed until now because most people don't have CONFIG_USB_DEBUG enabled. Signed-off-by: Valentin Longchamp <valentin.longchamp@epfl.ch> Cc: Stable <stable@kernel.org> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30ar9170: add support for NEC WL300NU-G USB dongleBen Konrath
This patch adds support for the NEC WL300NU-G USB wifi dongle. Signed-off-by: Ben Konrath <ben@bagu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-02ar9170: load firmware asynchronouslyJohannes Berg
This converts ar9170 to load firmware asynchronously out of ->probe() and only register with mac80211 when all firmware has been loaded successfully. If, on the other hand, any firmware fails to load, it will now unbind from the device. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-22ar9170usb: add Sphairon Homelink 1202 USB IDStefan Seyfried
Signed-off-by: Stefan Seyfried <seife@sphairon.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-18ar9170: Add support for D-Link DWA 160 A2Thomas Klute
At least two revisions of the D-Link DWA 160 exist, called A1 and A2. A1 (USB-ID 07d1:3c10) is already listed in usb.c as D-Link DWA 160A. A2 (USB-ID 07d1:3a09) works if added to ar9170_usb_ids. I didn't do much testing until now, but I was able to connect to APs using WPA or WEP and transmit data. Summary: * Add model revision number to the comment for D-Link DWA 160 A1 (07d1:3c10) * Add support for D-Link DWA 160 A2 (07d1:3a09) Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27ar9170usb: atomic pending urbs counterChristian Lamparter
This patch follows "ar9170: atomic pending A-MPDU counter" idea and converts another critical counter to atomic_*. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-23ar9170usb: add usbid for TP-Link TL-WN821N v2Christian Lamparter
This patch adds the usbid for TP-Link TL-WN821N v2. Cc: stable@kernel.org Reported-by: Fabian Lenz <lenz_fabian@yahoo.de> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-12Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: arch/microblaze/include/asm/socket.h
2009-08-10ar9170usb: fix spurious firmware related messageChristian Lamparter
When ar9170-2.fw was missing, the driver erroneously complained about missing the initialization values file ar9170-1.fw... Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10ar9170usb: module link in sysfsChristian Lamparter
Andrey Yurovsky reported that the driver forwarded erroneously the parent device structure instead of the real thing, which of course led to some dodgy sysfs links (at least?). Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10ar9170: xmit code revampChristian Lamparter
This patch is a back-port from aggregation testing code. In the past, we didn't limit the amount of active tx urbs. However, ar9170 only has a limited buffer reserved for pending data frames. This wasn't much of a problem with the slower 802.11b/g. We simply stopped the full queue and moved on to something different in the mean time. But - as you guessed it - this simple approach stands in way for a decent aggregation implementation. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03ar9170usb: more minor fixesChristian Lamparter
This patch contains a few more mostly random fixes for the USB front-end. 1. handle irq command response, instead of printing it to the console. 2. remove fixed FIXME. (real fix: "ar9170usb: reset device on resume". ) 3. some more one-liner. - get rid of a useless "return;" - add a few branch prediction hints in hot-paths etc. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03ar9170: add AVM FRITZ devicesLuis R. Rodriguez
This adds: USB 0x057C:0x8401 AVM FRITZ!WLAN USB Stick N USB 0x057C:0x8402 AVM FRITZ!WLAN USB Stick N 2.4 These devices require the 1-stage firmware, if not present we don't continue. Cc: Peter Grabienski <Peter.Grabienski@Atheros.com> Cc: Stephen Chen <Stephen.Chen@Atheros.com> Cc: Michael Fortin <Michael.Fortin@Atheros.com> Cc: Johnny Cheng <Johnny.Cheng@Atheros.com> Cc: Yuan-Gu Wei <Yuan-Gu.Wei@atheros.com> Cc: Joerg Albert <jal2@gmx.de> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-03ar9170: add support for 1-stage firmwareLuis R. Rodriguez
You can get the stage 1 firmware from here: http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/ar9170.fw md5sum: 34feec4ec0eae3bb92c7c1ea2dfb4530 sha1sum: 6e5250498b815c2940d97242de31e054ae44e079 Its license: http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/LICENSE This is a new firmware, tested with WNDA3100. Cc: Peter Grabienski <Peter.Grabienski@Atheros.com> Cc: Stephen Chen <Stephen.Chen@Atheros.com> Cc: Michael Fortin <Michael.Fortin@Atheros.com> Cc: Johnny Cheng <Johnny.Cheng@Atheros.com> Cc: Yuan-Gu Wei <Yuan-Gu.Wei@atheros.com> Cc: Joerg Albert <jal2@gmx.de> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06ar9170: fix build when !CONFIG_PMAlexander Beregalov
Fix this build error when CONFIG_PM is not set: drivers/net/wireless/ath/ar9170/usb.c: In function 'ar9170_usb_probe': drivers/net/wireless/ath/ar9170/usb.c:692: error: 'struct usb_device' has no member named 'reset_resume' Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06ar9170: wrong test on outlen in ar9170_usb_exec_cmd() ?Roel Kluin
remove redundant test: outlen is unsigned Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06ar9170usb: reset device on resumeChristian Lamparter
This patch takes care of an outstanding comment in "[PATCH] ar9170usb: fix hang on resume" commit message. >However, the device does not accept the firmware on resume. >and it will exit with: > >> firmware part 1 upload failed (-71). >> device is in a bad state. please reconnect it! Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Christian Lamparter <chunkeey@web.de> Tested-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22atheros: put atheros wireless drivers into ath/Luis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>