1. 16 1月, 2018 2 次提交
  2. 27 12月, 2017 5 次提交
  3. 27 10月, 2017 2 次提交
    • K
      ath: Convert timers to use timer_setup() · 7ac76764
      Kees Cook 提交于
      In preparation for unconditionally passing the struct timer_list pointer to
      all timer callbacks, switch to using the new timer_setup() and from_timer()
      to pass the timer pointer explicitly.
      
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7ac76764
    • B
      ath10k: fix build errors with !CONFIG_PM · 20665a90
      Brian Norris 提交于
      Build errors have been reported with CONFIG_PM=n:
      
      drivers/net/wireless/ath/ath10k/pci.c:3416:8: error: implicit
      declaration of function 'ath10k_pci_suspend'
      [-Werror=implicit-function-declaration]
      
      drivers/net/wireless/ath/ath10k/pci.c:3428:8: error: implicit
      declaration of function 'ath10k_pci_resume'
      [-Werror=implicit-function-declaration]
      
      These are caused by the combination of the following two commits:
      
      6af1de2e ("ath10k: mark PM functions as __maybe_unused")
      96378bd2 ("ath10k: fix core PCI suspend when WoWLAN is supported but
      disabled")
      
      Both build fine on their own.
      
      But now that ath10k_pci_pm_{suspend,resume}() is compiled
      unconditionally, we should also compile ath10k_pci_{suspend,resume}()
      unconditionally.
      
      And drop the #ifdef around ath10k_pci_hif_{suspend,resume}() too; they
      are trivial (empty), so we're not saving much space by compiling them
      out. And the alternatives would be to sprinkle more __maybe_unused, or
      spread the #ifdef's further.
      
      Build tested with the following combinations:
      CONFIG_PM=y && CONFIG_PM_SLEEP=y
      CONFIG_PM=y && CONFIG_PM_SLEEP=n
      CONFIG_PM=n
      
      Fixes: 96378bd2 ("ath10k: fix core PCI suspend when WoWLAN is supported but disabled")
      Fixes: 096ad2a15fd8 ("Merge branch 'ath-next'")
      Signed-off-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      20665a90
  4. 13 10月, 2017 1 次提交
    • B
      ath10k: fix core PCI suspend when WoWLAN is supported but disabled · 96378bd2
      Brian Norris 提交于
      For devices where the FW supports WoWLAN but user-space has not
      configured it, we don't do any PCI-specific suspend/resume operations,
      because mac80211 doesn't call drv_suspend() when !wowlan. This has
      particularly bad effects for some platforms, because we don't stop the
      power-save timer, and if this timer goes off after the PCI controller
      has suspended the link, Bad Things will happen.
      
      Commit 32faa3f0 ("ath10k: add the PCI PM core suspend/resume ops")
      got some of this right, in that it understood there was a problem on
      non-WoWLAN firmware. But it forgot the $subject case.
      
      Fix this by moving all the PCI driver suspend/resume logic exclusively
      into the driver PM hooks. This shouldn't affect WoWLAN support much
      (this just gets executed later on).
      
      I would just as well kill the entirety of ath10k_hif_suspend(), as it's
      not even implemented on the USB or SDIO drivers. I expect that we don't
      need the callback, except to return "supported" (i.e., 0) or "not
      supported" (i.e., -EOPNOTSUPP).
      
      Fixes: 32faa3f0 ("ath10k: add the PCI PM core suspend/resume ops")
      Fixes: 77258d40 ("ath10k: enable pci soc powersaving")
      Signed-off-by: NBrian Norris <briannorris@chromium.org>
      Cc: Ryan Hsu <ryanhsu@qti.qualcomm.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Michal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      96378bd2
  5. 21 9月, 2017 1 次提交
    • A
      ath10k: mark PM functions as __maybe_unused · 6af1de2e
      Arnd Bergmann 提交于
      When CONFIG_PM_SLEEP is disabled, we get a compile-time
      warning:
      
      drivers/net/wireless/ath/ath10k/pci.c:3417:12: error: 'ath10k_pci_pm_resume' defined but not used [-Werror=unused-function]
       static int ath10k_pci_pm_resume(struct device *dev)
                  ^~~~~~~~~~~~~~~~~~~~
      drivers/net/wireless/ath/ath10k/pci.c:3401:12: error: 'ath10k_pci_pm_suspend' defined but not used [-Werror=unused-function]
       static int ath10k_pci_pm_suspend(struct device *dev)
      
      Rather than fixing the #ifdef, this just marks both functions
      as __maybe_unused, which is a more robust way to do this.
      
      Fixes: 32faa3f0 ("ath10k: add the PCI PM core suspend/resume ops")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      6af1de2e
  6. 01 9月, 2017 1 次提交
    • R
      ath10k: add the PCI PM core suspend/resume ops · 32faa3f0
      Ryan Hsu 提交于
      The actual PCI suspend/resume in ath10k has been handled in wow.c,
      but in the case of the device doesn't support remote wakeup,
      the .hif_suspend() and .hif_resume() will never be handled.
      
        ath10k_wow_op_suspend()
        {
      	if (WARN_ON(!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT,
      		    ar->running_fw->fw_file.fw_features))) {
      		ret = 1;
      		goto exit;
      	}
      
      	....
      
      	ret = ath10k_hif_suspend(ar);
        }
      
      So register the PCI PM core to support the suspend/resume if the device
      doesn't support remote wakeup.
      Signed-off-by: NRyan Hsu <ryanhsu@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      32faa3f0
  7. 08 8月, 2017 1 次提交
  8. 06 7月, 2017 2 次提交
  9. 29 6月, 2017 1 次提交
  10. 01 6月, 2017 1 次提交
  11. 19 4月, 2017 1 次提交
    • R
      ath10k: bump up FW API to 6 · aad1fd7f
      Ryan Hsu 提交于
      For QCA6174 hw3.0, since WLAN.RM.4.4-00022-QCARMSWPZ-2, it starts to
      support the board ID information from otp, with some devices released on
      the market that didn't calibrated with OTP, will have 0 for board ID
      information, which cause the backward compatibility issue and was fixed
      in commit 'd2e202c0 ("ath10k: ignore configuring the incorrect board_id")'
      
      So bump the fw api version to differentiate the latest firmware support.
      Signed-off-by: NRyan Hsu <ryanhsu@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      aad1fd7f
  12. 05 4月, 2017 1 次提交
  13. 16 3月, 2017 1 次提交
  14. 15 2月, 2017 1 次提交
    • K
      ath10k: fix napi crash during rmmod when probe firmware fails · 1427228d
      Kalle Valo 提交于
      This fixes the below crash when ath10k probe firmware fails, NAPI polling tries
      to access a rx ring resource which was never allocated. An easy way to
      reproduce this is easy to remove all the firmware files, load ath10k modules
      and ath10k will crash when calling 'rmmod ath10k_pci'. The fix is to call
      napi_enable() from ath10k_pci_hif_start() so that it matches with
      napi_disable() being called from ath10k_pci_hif_stop().
      
      Big thanks to Mohammed Shafi Shajakhan who debugged this and provided first
      version of the fix. In this patch I just fix the actual problem in pci.c
      instead of having a workaround in core.c.
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP:  __ath10k_htt_rx_ring_fill_n+0x19/0x230 [ath10k_core]
      __ath10k_htt_rx_ring_fill_n+0x19/0x230 [ath10k_core]
      
      Call Trace:
      
      [<ffffffffa113ec62>] ath10k_htt_rx_msdu_buff_replenish+0x42/0x90
      [ath10k_core]
      [<ffffffffa113f393>] ath10k_htt_txrx_compl_task+0x433/0x17d0
      [ath10k_core]
      [<ffffffff8114406d>] ? __wake_up_common+0x4d/0x80
      [<ffffffff811349ec>] ? cpu_load_update+0xdc/0x150
      [<ffffffffa119301d>] ? ath10k_pci_read32+0xd/0x10 [ath10k_pci]
      [<ffffffffa1195b17>] ath10k_pci_napi_poll+0x47/0x110 [ath10k_pci]
      [<ffffffff817863af>] net_rx_action+0x20f/0x370
      Reported-by: NBen Greear <greearb@candelatech.com>
      Fixes: 3c97f5de ("ath10k: implement NAPI support")
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      1427228d
  15. 07 2月, 2017 2 次提交
  16. 31 1月, 2017 1 次提交
  17. 28 1月, 2017 2 次提交
  18. 19 1月, 2017 1 次提交
    • M
      ath10k: dump Copy Engine registers during firmware crash · c75c398b
      Mohammed Shafi Shajakhan 提交于
      Dump Copy Engine source and destination ring addresses.
      This is useful information to debug firmware crashes, assertes or hangs over long run
      assessing the Copy Engine Register status. This also enables dumping CE
      register status in debugfs Crash Dump file.
      
      Screenshot:
      
      ath10k_pci 0000:02:00.0: simulating hard firmware crash
      ath10k_pci 0000:02:00.0: firmware crashed! (uuid 84901ff5-d33c-456e-93ee-0165dea643cf)
      ath10k_pci 0000:02:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
      ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1
      ath10k_pci 0000:02:00.0: firmware ver 10.2.4.70.59-2 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 4159f498
      ath10k_pci 0000:02:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
      ath10k_pci 0000:02:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
      ath10k_pci 0000:02:00.0: firmware register dump:
      ath10k_pci 0000:02:00.0: [00]: 0x4100016C 0x00000000 0x009A0F2A 0x00000000
      ath10k_pci 0000:02:00.0: [04]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [08]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [12]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [16]: 0x00000000 0x00000000 0x00000000 0x009A0F2A
      ath10k_pci 0000:02:00.0: [20]: 0x00000000 0x00401930 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [24]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [28]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [32]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [36]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [40]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [44]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [48]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [52]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [56]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: Copy Engine register dump:
      ath10k_pci 0000:02:00.0: [00]: 0x00057400   7   7   3   3
      ath10k_pci 0000:02:00.0: [01]: 0x00057800  18  18  85  86
      ath10k_pci 0000:02:00.0: [02]: 0x00057c00  49  49  48  49
      ath10k_pci 0000:02:00.0: [03]: 0x00058000  16  16  17  16
      ath10k_pci 0000:02:00.0: [04]: 0x00058400   4   4  44   4
      ath10k_pci 0000:02:00.0: [05]: 0x00058800  12  12  11  12
      ath10k_pci 0000:02:00.0: [06]: 0x00058c00   3   3   3   3
      ath10k_pci 0000:02:00.0: [07]: 0x00059000   0   0   0   0
      ieee80211 phy0: Hardware restart was requested
      ath10k_pci 0000:02:00.0: device successfully recovered
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      [kvalo@qca.qualcomm.com: simplify the implementation]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      c75c398b
  19. 29 12月, 2016 2 次提交
  20. 14 12月, 2016 1 次提交
  21. 13 9月, 2016 2 次提交
  22. 09 9月, 2016 1 次提交
    • R
      ath10k: implement NAPI support · 3c97f5de
      Rajkumar Manoharan 提交于
      Add NAPI support for rx and tx completion. NAPI poll is scheduled
      from interrupt handler. The design is as below
      
       - on interrupt
           - schedule napi and mask interrupts
       - on poll
         - process all pipes (no actual Tx/Rx)
         - process Rx within budget
         - if quota exceeds budget reschedule napi poll by returning budget
         - process Tx completions and update budget if necessary
         - process Tx fetch indications (pull-push)
         - push any other pending Tx (if possible)
         - before resched or napi completion replenish htt rx ring buffer
         - if work done < budget, complete napi poll and unmask interrupts
      
      This change also get rid of two tasklets (intr_tq and txrx_compl_task).
      
      Measured peak throughput with NAPI on IPQ4019 platform in controlled
      environment. No noticeable reduction in throughput is seen and also
      observed improvements in CPU usage. Approx. 15% CPU usage got reduced
      in UDP uplink case.
      
      DL: AP DUT Tx
      UL: AP DUT Rx
      
      IPQ4019 (avg. cpu usage %)
      
      ========
                      TOT              +NAPI
                    ===========      =============
      TCP DL       644 Mbps (42%)    645 Mbps (36%)
      TCP UL       673 Mbps (30%)    675 Mbps (26%)
      UDP DL       682 Mbps (49%)    680 Mbps (49%)
      UDP UL       720 Mbps (28%)    717 Mbps (11%)
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      3c97f5de
  23. 02 9月, 2016 1 次提交
  24. 31 8月, 2016 1 次提交
  25. 08 7月, 2016 1 次提交
  26. 30 6月, 2016 1 次提交
    • M
      ath10k: fix crash during card removal · fb7caaba
      Mohammed Shafi Shajakhan 提交于
      Usually when the firmware crashes we check for the value
      'FW_IND_EVENT_PENDING' in 'FW_INDICATOR_ADDRESS' and proceed with
      disabling the irq and dumping firmware 'crash dump'. Now
      when the PCI card is unplugged from the device the PCI controller
      seems to generate a spurious interrupt after some time which
      was as treated a firmware crash and resulting in the below race
      condition (and eventually crashing the system)
      
      	ath10k_core_unregister -> ath10k_core_free_board_files
      
      	...... device unplug spurious interrupt .........
      
      	ath10k_pci_taklet -> ath10k_pci_fw_crashed_dump  ...etc
      
      Clearly even after the firmware board files related data structure
      is freed up we are getting a spurious interrupt from PCI with 0xfffffff
      in the 'FW_INDICATOR_ADDRESS' resulting in scheduling of the pci tasklet
      and doing a crash dump, printing f/w board related info resulting in the
      below crash. Fix this by detecting this spurious interrupt in ath10k PCI
      irq handler itself and return IRQ_NONE. Thanks to Michal Kazior for
      helping us conclude the most appropriate fix.
      
      Call trace:
      
       EIP is at ath10k_debug_print_board_info+0x39/0xb0
      [ath10k_core]
      EAX: 00000000 EBX: d4de15a0 ECX: 00000000 EDX: 00000064
      ESI: f615ddd0 EDI: f8530000 EBP: f615de3c ESP: f615ddbc
       DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
      CR0: 80050033 CR2: 00000004 CR3: 01c0a000 CR4: 000006f0
      Stack:
       f615ddd0 00000064 f8b4ecdd 00000000 00000000 00412f4e
      00000000 00000000
      00000000 00000000 00000000 00000000 00000000 00000000
      00000000 00000000
       00000000 00000000 00000000 00000000 00000000 00000000
      00000000 00000000
      Call Trace:
        [<f8b1f517>] ath10k_print_driver_info+0x17/0x30
      [ath10k_core]
      [<f875463a>] ath10k_pci_fw_crashed_dump+0x7a/0xe0
      [ath10k_pci]
      [<f87549d0>] ath10k_pci_tasklet+0x70/0x90 [ath10k_pci]
      [<c106151e>] tasklet_action+0x9e/0xb0
      
      Cc: Michal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      fb7caaba
  27. 07 6月, 2016 2 次提交
  28. 02 6月, 2016 1 次提交