1. 26 1月, 2016 1 次提交
  2. 18 9月, 2015 1 次提交
    • O
      ath9k_htc: introduce support for different fw versions · e904cf6f
      Oleksij Rempel 提交于
      Current kernel support only one fw name with theoretically only one
      fw version located in “firmware/htc_[9271|7010].fw”. Which is ok so far we
      have only one fw version (1.3). After we realised new fw 1.4, we faced
      compatibility problem which was decided to solve by firmware name and
      location:
      - new firmware is located now in
      	firmware/ath9k_htc/htc_[9271|7010]-1.4.0.fw
      - old version 1.3 should be on old place, so old kernel have no issues
      	with it.
      - new kernels including this patch should be able to try different
      	supported (min..max) fw version.
      - new kernel should be able to support old fw location too. At least for
      	now.
      
      At same time this patch will add new module option which should allow user
      to play with development  fw version without replacing stable one. If user
      will set “ath9k_htc use_dev_fw=1” module will try to find
      firmware/ath9k_htc/htc_[9271|7010]-1.dev.0.fw first and if it fails, use
      stable version: for example...1.4.0.fw.
      Signed-off-by: NOleksij Rempel <linux@rempel-privat.de>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      e904cf6f
  3. 26 2月, 2015 1 次提交
  4. 13 2月, 2014 1 次提交
  5. 16 8月, 2013 1 次提交
    • O
      ath9k_htc: do not use bulk on EP3 and EP4 · 2b721118
      Oleksij Rempel 提交于
      If usb auto suspend is enabled or system run in to suspend/resume
      cycle, ath9k-htc adapter will stop to response. It is reproducible on xhci HCs.
      
      Host part of problem:
      XHCI do timing calculation based on Transfer Type and bInterval,
      immediately after device was detected. Ath9k-htc try to overwrite
      this parameters on module probe and some changes in FW,
      since we do not initiate usb reset from the driver this changes
      are not took to account. So, before any kind of suspend or reset,
      host controller will operate with old parameters. Only after suspend/resume
      and if interface id stay unchanged, new parameters will by applied. Host
      will send bulk data with no intervals (?), which will cause
      overflow on FIFO of EP4.
      
      Firmware part of problem:
      By default, ath9k-htc adapters configured with EP3 and EP4
      as interrupt endpoints. Current firmware will try to overwrite
      ConfigDescriptor to make EP3 and EP4 bulk. FIFO for this endpoints
      stay not reconfigured, so under the hood it is still Int EP.
      
      This patch is revert of 4a0e8ecc commit which trying to
      reduce CPU usage on some systems. Since it will produce more bug
      as fixes, we will need to find other way to fix it.
      
      here is comment from kernel source which has some more explanation:
      * Some buggy high speed devices have bulk endpoints using
      * maxpacket sizes other than 512.  High speed HCDs may not
      * be able to handle that particular bug, so let's warn...
      
      in our case EP3 and EP4 have maxpacket sizes = 64!!!
      Signed-off-by: NOleksij Rempel <linux@rempel-privat.de>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2b721118
  6. 23 7月, 2013 1 次提交
  7. 18 7月, 2013 1 次提交
    • A
      ath9k_htc: fix data race between request_firmware_nowait() callback and suspend() · 9494849e
      Alexey Khoroshilov 提交于
      ath9k_hif_usb_probe() requests firmware asynchronically and
      there is some initialization postponed till firmware is ready.
      In particular, ath9k_hif_usb_firmware_cb() callback initializes
      hif_dev->tx.tx_buf and hif_dev->tx.tx_pending lists.
      
      At the same time, ath9k_hif_usb_suspend() iterates that lists through
      ath9k_hif_usb_dealloc_urbs(). If suspend happens before request_firmware_nowait()
      callback is called, it can lead to oops.
      
      Similar issue could be in ath9k_hif_usb_disconnect(), but it is prevented
      using hif_dev->fw_done completion and HIF_USB_READY flag. The patch extends
      this approach to suspend() as well.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9494849e
  8. 25 6月, 2013 1 次提交
  9. 25 10月, 2012 1 次提交
  10. 25 9月, 2012 1 次提交
    • M
      wireless: ath9k-htc: fix possible use after free · e962610f
      Ming Lei 提交于
      Inside ath9k_hif_usb_firmware_fail(), the instance of
      'struct struct hif_device_usb' may be freed by
      ath9k_hif_usb_disconnect() after
      
      	complete(&hif_dev->fw_done);
      
      But 'hif_dev' is still accessed after the line code
      above is executed.
      
      This patch fixes the issue by not accessing 'hif_dev'
      after 'complete(&hif_dev->fw_done)' inside
      ath9k_hif_usb_firmware_fail().
      
      Cc: ath9k-devel@lists.ath9k.org
      Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
      Cc: Jouni Malinen <jouni@qca.qualcomm.com>
      Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e962610f
  11. 08 9月, 2012 1 次提交
    • M
      wireless: ath9k-htc: only load firmware in need · 32e31de5
      Ming Lei 提交于
      It is not necessary to hold the firmware memory during the whole
      driver lifetime, and obviously it does waste memory. Suppose there
      are 4 ath9k-htc usb dongles working, kernel has to consume about
      4*50KBytes RAM to cache firmware for all dongles. After applying the
      patch, kernel only caches one single firmware image in RAM for
      all ath9k-htc devices just during system suspend/resume cycle.
      
      When system is ready for loading firmware, ath9k-htc can request
      the loading from usersapce. During system resume, ath9k-htc still
      can load the firmware which was cached in kernel memory before
      system suspend.
      
      Cc: ath9k-devel@lists.ath9k.org
      Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
      Cc: Jouni Malinen <jouni@qca.qualcomm.com>
      Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      32e31de5
  12. 19 5月, 2012 1 次提交
    • S
      USB: Disable hub-initiated LPM for comms devices. · e1f12eb6
      Sarah Sharp 提交于
      Hub-initiated LPM is not good for USB communications devices.  Comms
      devices should be able to tell when their link can go into a lower power
      state, because they know when an incoming transmission is finished.
      Ideally, these devices would slam their links into a lower power state,
      using the device-initiated LPM, after finishing the last packet of their
      data transfer.
      
      If we enable the idle timeouts for the parent hubs to enable
      hub-initiated LPM, we will get a lot of useless LPM packets on the bus
      as the devices reject LPM transitions when they're in the middle of
      receiving data.  Worse, some devices might blindly accept the
      hub-initiated LPM and power down their radios while they're in the
      middle of receiving a transmission.
      
      The Intel Windows folks are disabling hub-initiated LPM for all USB
      communications devices under a xHCI USB 3.0 host.  In order to keep
      the Linux behavior as close as possible to Windows, we need to do the
      same in Linux.
      
      Set the disable_hub_initiated_lpm flag for for all USB communications
      drivers.  I know there aren't currently any USB 3.0 devices that
      implement these class specifications, but we should be ready if they do.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: Hansjoerg Lipp <hjlipp@web.de>
      Cc: Tilman Schmidt <tilman@imap.cc>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: Peter Korsgaard <jacmet@sunsite.dk>
      Cc: Jan Dumon <j.dumon@option.com>
      Cc: Petko Manolov <petkan@users.sourceforge.net>
      Cc: Steve Glendinning <steve.glendinning@smsc.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
      Cc: Jouni Malinen <jouni@qca.qualcomm.com>
      Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Cc: Brett Rudley <brudley@broadcom.com>
      Cc: Roland Vossen <rvossen@broadcom.com>
      Cc: Arend van Spriel <arend@broadcom.com>
      Cc: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
      Cc: Kan Yan <kanyan@broadcom.com>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Cc: Ivo van Doorn <IvDoorn@gmail.com>
      Cc: Gertjan van Wingerde <gwingerde@gmail.com>
      Cc: Helmut Schaa <helmut.schaa@googlemail.com>
      Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
      Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: Chaoming Li <chaoming_li@realsil.com.cn>
      Cc: Daniel Drake <dsd@gentoo.org>
      Cc: Ulrich Kunitz <kune@deine-taler.de>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      e1f12eb6
  13. 14 4月, 2012 1 次提交
  14. 07 2月, 2012 1 次提交
  15. 31 1月, 2012 1 次提交
  16. 04 10月, 2011 1 次提交
  17. 19 7月, 2011 2 次提交
  18. 30 6月, 2011 1 次提交
  19. 20 5月, 2011 1 次提交
  20. 15 4月, 2011 1 次提交
    • J
      ath9k: avoid using trinary operator w/ TX_STAT_INC · dfa8fc69
      John W. Linville 提交于
      Otherwise, you get this:
      
        CC [M]  drivers/net/wireless/ath/ath9k/hif_usb.o
      drivers/net/wireless/ath/ath9k/hif_usb.c: In function ‘ath9k_skb_queue_complete’:
      drivers/net/wireless/ath/ath9k/hif_usb.c:230:12: error: expected expression before ‘do’
      make[2]: *** [drivers/net/wireless/ath/ath9k/hif_usb.o] Error 1
      make[1]: *** [drivers/net/wireless/ath/ath9k] Error 2
      make: *** [drivers/net/wireless/ath/] Error 2
      
      The TX_STAT_INC macro should probably be changed to accomodate such
      usage, although using a trinary operator in place of an if-else seems
      questionable to me anyway.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      Acked-by: NSujith Manoharan <Sujith.Manoharan@Atheros.com>
      dfa8fc69
  21. 14 4月, 2011 8 次提交
  22. 13 4月, 2011 1 次提交
  23. 01 3月, 2011 1 次提交
  24. 24 2月, 2011 2 次提交
  25. 05 1月, 2011 1 次提交
  26. 23 12月, 2010 1 次提交
  27. 14 12月, 2010 1 次提交
  28. 09 12月, 2010 1 次提交
  29. 08 12月, 2010 2 次提交
    • S
      ath9k_htc: Fix panic on FW download failure · caa0a99a
      Sujith Manoharan 提交于
      Use the correct error condition exit in case firmware download
      fails for some reason. Not doing so results in a panic:
      
      usb 1-3: ath9k_htc: Transferred FW: ar9271.fw, size: 51280
      usb 1-3: ath9k_htc: Firmware - ar9271.fw download failed
      usb 1-3: ath9k_htc: Target is unresponsive
      Failed to initialize the device
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      Pid: 2823, comm: insmod Tainted: G        W   2.6.37-rc4-wl #11
      Call Trace:
      [<ffffffff81090d7e>] __lock_acquire+0xe3e/0x1d00
      [<ffffffff813a9f14>] ? restore_args+0x0/0x30
      [<ffffffff81058af1>] ? vprintk+0x321/0x500
      [<ffffffff81092290>] lock_acquire+0xa0/0x190
      [<ffffffffa02a0eac>] ? usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
      [<ffffffff813a8ea8>] _raw_spin_lock_irq+0x48/0x60
      [<ffffffffa02a0eac>] ? usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
      [<ffffffff813a53fd>] ? printk+0x3c/0x3f
      [<ffffffffa02a0eac>] usb_kill_anchored_urbs+0x1c/0x80 [usbcore]
      [<ffffffffa0055388>] ath9k_hif_usb_dealloc_urbs+0x18/0x40 [ath9k_htc]
      [<ffffffffa00557d7>] ath9k_hif_usb_probe+0x227/0x3d0 [ath9k_htc]
      [<ffffffffa02a56ac>] usb_probe_interface+0x10c/0x210 [usbcore]
      [<ffffffff812ae826>] driver_probe_device+0x96/0x1c0
      [<ffffffff812ae9f3>] __driver_attach+0xa3/0xb0
      [<ffffffff812ae950>] ? __driver_attach+0x0/0xb0
      [<ffffffff812ad6ae>] bus_for_each_dev+0x5e/0x90
      [<ffffffff812ae4c9>] driver_attach+0x19/0x20
      [<ffffffff812ae038>] bus_add_driver+0x168/0x320
      [<ffffffff812aec71>] driver_register+0x71/0x140
      [<ffffffff811fc338>] ? __raw_spin_lock_init+0x38/0x70
      [<ffffffffa02a438c>] usb_register_driver+0xdc/0x190 [usbcore]
      [<ffffffffa0063000>] ? ath9k_htc_init+0x0/0x4f [ath9k_htc]
      [<ffffffffa005599e>] ath9k_hif_usb_init+0x1e/0x20 [ath9k_htc]
      [<ffffffffa006302b>] ath9k_htc_init+0x2b/0x4f [ath9k_htc]
      [<ffffffff8100212f>] do_one_initcall+0x3f/0x180
      [<ffffffff8109ef9b>] sys_init_module+0xbb/0x200
      [<ffffffff8100bf52>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      caa0a99a
    • S
      ath9k_htc: Cleanup device identification · 0b5ead91
      Sujith Manoharan 提交于
      ath.ko is a common module shared between ath5k, ar9170usb, ath9k and ath9k_htc.
      Adding driver specific data to the shared structure would impact all the
      drivers. Handling USB device recognition for devices specific to ath9k_htc
      can be handled within the driver itself.
      
      Also, AR7010 refers to the processor used in both AR9280/AR9287 based
      devices. Rename the device enumerations accordingly.
      
      While at it, check properly for the bus type when choosing the EEPROM
      base address for UB95.
      Signed-off-by: NSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0b5ead91
  30. 03 12月, 2010 1 次提交