1. 23 Nov, 2016 5 commits
    • Michal Kazior's avatar
      ath10k: fix null deref on wmi-tlv when trying spectral scan · 18ae68ff
      Michal Kazior authored
      WMI ops wrappers did not properly check for null
      function pointers for spectral scan. This caused
      null dereference crash with WMI-TLV based firmware
      which doesn't implement spectral scan.
      
      The crash could be triggered with:
      
        ip link set dev wlan0 up
        echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
      
      The crash looked like this:
      
        [  168.031989] BUG: unable to handle kernel NULL pointer dereference at           (null)
        [  168.037406] IP: [<          (null)>]           (null)
        [  168.040395] PGD cdd4067 PUD fa0f067 PMD 0
        [  168.043303] Oops: 0010 [#1] SMP
        [  168.045377] Modules linked in: ath10k_pci(O) ath10k_core(O) ath mac80211 cfg80211 [last unloaded: cfg80211]
        [  168.051560] CPU: 1 PID: 1380 Comm: bash Tainted: G        W  O    4.8.0 #78
        [  168.054336] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
        [  168.059183] task: ffff88000c460c00 task.stack: ffff88000d4bc000
        [  168.061736] RIP: 0010:[<0000000000000000>]  [<          (null)>]           (null)
        ...
        [  168.100620] Call Trace:
        [  168.101910]  [<ffffffffa03b9566>] ? ath10k_spectral_scan_config+0x96/0x200 [ath10k_core]
        [  168.104871]  [<ffffffff811386e2>] ? filemap_fault+0xb2/0x4a0
        [  168.106696]  [<ffffffffa03b97e6>] write_file_spec_scan_ctl+0x116/0x280 [ath10k_core]
        [  168.109618]  [<ffffffff812da3a1>] full_proxy_write+0x51/0x80
        [  168.111443]  [<ffffffff811957b8>] __vfs_write+0x28/0x120
        [  168.113090]  [<ffffffff812f1a2d>] ? security_file_permission+0x3d/0xc0
        [  168.114932]  [<ffffffff8109b912>] ? percpu_down_read+0x12/0x60
        [  168.116680]  [<ffffffff811965f8>] vfs_write+0xb8/0x1a0
        [  168.118293]  [<ffffffff81197966>] SyS_write+0x46/0xa0
        [  168.119912]  [<ffffffff818f2972>] entry_SYSCALL_64_fastpath+0x1a/0xa4
        [  168.121737] Code:  Bad RIP value.
        [  168.123318] RIP  [<          (null)>]           (null)
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      18ae68ff
    • Pedersen, Thomas's avatar
      ath10k: remove set/get_tsf ieee80211_ops · f6f64cfb
      Pedersen, Thomas authored
      Neither of these did the right thing:
      
      - get_tsf just returned 0
      - set_tsf assumed a simple offset was applied against
        get_tsf(), which works, except in the case of
        calculating TSF from rx_mactime (actual TSF).
      
      Just remove them for now. We can reimplement set_tsf in
      terms of TSF increment/decrement in the future if get_tsf
      is ever supported by FW.
      Signed-off-by: default avatarThomas Pedersen <twp@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      f6f64cfb
    • Pedersen, Thomas's avatar
      ath10k: implement offset_tsf ieee80211_op · 973324ff
      Pedersen, Thomas authored
      Current set_tsf is implemented in terms of TSF_INCREMENT
      only. Instead support new WMI command TSF_DECREMENT and
      export these through offset_tsf. Advantage is we get
      more accurate TSF adjustments, and don't calculate wrong
      offset in case absolute TSF was calculated from rx_mactime
      (actual TSF).
      
      The new WMI command is available in firmware
      10.4-3.2.1-00033 for QCA4019 chips. Old drivers on new
      firmware or vice versa shouldn't  be a problem since
      get/set tsf logic was already broken.
      Signed-off-by: default avatarThomas Pedersen <twp@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      973324ff
    • Rajkumar Manoharan's avatar
      ath10k: advertize hardware packet loss mechanism · ff32eeb8
      Rajkumar Manoharan authored
      Indicate hardware (or firmware) supports that CQM packet-loss report
      will be generated based on station kickout algorithm. As of now mac80211
      tracks connection loss by missing msdu counts (50) whereas ath10k
      firmware tracks them by missing ppdus (+ BAR tries). While firmware is
      trying to adapt its rate table, mac80211 might send out low_ack event to
      hostapd. This is causing frequent connect and disconnect iteration under
      noisy environment or when station is roaming around.
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      ff32eeb8
    • Kalle Valo's avatar
      Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git · e644b88e
      Kalle Valo authored
      ath.git patches for 4.10. Major changes:
      
      ath9k
      
      * add device tree bindings
      * switch to use mac80211 intermediate software queues to reduce
        latency and fix bufferbloat
      e644b88e
  2. 19 Nov, 2016 15 commits
  3. 18 Nov, 2016 3 commits
  4. 17 Nov, 2016 17 commits