1. 30 12月, 2016 4 次提交
    • R
      ath10k: recal the txpower when removing interface · d679fa1b
      Ryan Hsu 提交于
      The txpower is being recalculated when adding interface to make sure
      txpower won't overshoot the spec, and when removing the interface,
      the txpower should again to be recalculated to restore the correct value
      from the active interface list.
      
      Following is one of the scenario
      	vdev0 is created as STA and connected: txpower:23
      	vdev1 is created as P2P_DEVICE for control interface: txpower:0
      	vdev2 is created as p2p go/gc interface: txpower is 21
      
      So the vdev2@txpower:21 will be set to firmware when vdev2 is created.
      When we tear down the vdev2, the txpower needs to be recalculated to
      re-set it to vdev0@txpower:23 as vdev0/vdev1 are the active interface.
      
      	ath10k_pci mac vdev 0 peer create 8c:fd:f0:01:62:98
      	ath10k_pci mac vdev_id 0 txpower 23
      	... (adding interface)
      	ath10k_pci mac vdev create 2 (add interface) type 1 subtype 3
      	ath10k_pci mac vdev_id 2 txpower 21
      	ath10k_pci mac txpower 21
      	... (removing interface)
      	ath10k_pci mac vdev 2 delete (remove interface)
      	ath10k_pci vdev 1 txpower 0
      	ath10k_pci vdev 0 txpower 23
      	ath10k_pci mac txpower 23
      Signed-off-by: NRyan Hsu <ryanhsu@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      d679fa1b
    • A
      ath10k: support dev_coredump for crash dump · 727000e6
      Arun Khandavalli 提交于
      Whenever firmware crashes, and both CONFIG_ATH10K_DEBUGFS and
      CONFIG_ALLOW_DEV_COREDUMP are enabled, dump information about the crash via a
      devcoredump device. Dump can be read from userspace for further analysis from:
      
      /sys/class/devcoredump/devcd*/data
      
      As until now we have provided the firmware crash dump file via fw_crash_dump
      debugfs keep it still available but deprecate and a warning print that the user
      should switch to using dev_coredump.
      
      Future improvement would be not to depend on CONFIG_ATH10K_DEBUGFS, as there
      might be systems which want to get the firmware crash dump but not enable
      debugfs. How to handle memory consumption is also something which needs to be
      taken into account.
      Signed-off-by: NArun Khandavalli <akhandav@qti.qualcomm.com>
      [kvalo@qca.qualcomm.com: rebase, fixes, improve commit log]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      727000e6
    • R
      ath10k: fix incorrect txpower set by P2P_DEVICE interface · 88407beb
      Ryan Hsu 提交于
      Ath10k reports the phy capability that supports P2P_DEVICE interface.
      
      When we use the P2P supported wpa_supplicant to start connection, it'll
      create two interfaces, one is wlan0 (vdev_id=0) and one is P2P_DEVICE
      p2p-dev-wlan0 which is for p2p control channel (vdev_id=1).
      
      	ath10k_pci mac vdev create 0 (add interface) type 2 subtype 0
      	ath10k_add_interface: vdev_id: 0, txpower: 0, bss_power: 0
      	...
      	ath10k_pci mac vdev create 1 (add interface) type 2 subtype 1
      	ath10k_add_interface: vdev_id: 1, txpower: 0, bss_power: 0
      
      And the txpower in per vif bss_conf will only be set to valid tx power when
      the interface is assigned with channel_ctx.
      
      But this P2P_DEVICE interface will never be used for any connection, so
      that the uninitialized bss_conf.txpower=0 is assinged to the
      arvif->txpower when interface created.
      
      Since the txpower configuration is firmware per physical interface.
      So the smallest txpower of all vifs will be the one limit the tx power
      of the physical device, that causing the low txpower issue on other
      active interfaces.
      
      	wlan0: Limiting TX power to 21 (24 - 3) dBm
      	ath10k_pci mac vdev_id 0 txpower 21
      	ath10k_mac_txpower_recalc: vdev_id: 1, txpower: 0
      	ath10k_mac_txpower_recalc: vdev_id: 0, txpower: 21
      	ath10k_pci mac txpower 0
      
      This issue only happens when we use the wpa_supplicant that supports
      P2P or if we use the iw tool to create the control P2P_DEVICE interface.
      Signed-off-by: NRyan Hsu <ryanhsu@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      88407beb
    • C
      ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats() · 097e46d2
      Christian Lamparter 提交于
      ath10k_wmi_tlv_op_pull_fw_stats() uses tb = ath10k_wmi_tlv_parse_alloc(...)
      function, which allocates memory. If any of the three error-paths are
      taken, this tb needs to be freed.
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      097e46d2
  2. 29 12月, 2016 5 次提交
  3. 15 12月, 2016 1 次提交
    • M
      ath10k: Avoid potential page alloc BUG_ON in tx free path · 02a9e08d
      Mohammed Shafi Shajakhan 提交于
      'ath10k_htt_tx_free_cont_txbuf' and 'ath10k_htt_tx_free_cont_frag_desc'
      have NULL pointer checks to avoid crash if they are called twice
      but this is as of now not sufficient as these pointers are not assigned
      to NULL once the contiguous DMA memory allocation is freed, fix this.
      Though this may not be hit with the explicity check of state variable
      'tx_mem_allocated' check, good to have this addressed as well.
      
      Below BUG_ON is hit when the above scenario is simulated
      with kernel debugging enabled
      
       page:f6d09a00 count:0 mapcount:-127 mapping:  (null)
      index:0x0
       flags: 0x40000000()
       page dumped because: VM_BUG_ON_PAGE(page_ref_count(page)
      == 0)
       ------------[ cut here ]------------
       kernel BUG at ./include/linux/mm.h:445!
       invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
       EIP is at put_page_testzero.part.88+0xd/0xf
       Call Trace:
        [<c118a2cc>] __free_pages+0x3c/0x40
        [<c118a30e>] free_pages+0x3e/0x50
        [<c10222b4>] dma_generic_free_coherent+0x24/0x30
        [<f8c1d9a8>] ath10k_htt_tx_free_cont_txbuf+0xf8/0x140
      
        [<f8c1e2a9>] ath10k_htt_tx_destroy+0x29/0xa0
      
        [<f8c143e0>] ath10k_core_destroy+0x60/0x80 [ath10k_core]
        [<f8acd7e9>] ath10k_pci_remove+0x79/0xa0 [ath10k_pci]
        [<c13ed7a8>] pci_device_remove+0x38/0xb0
        [<c14d3492>] __device_release_driver+0x72/0x100
        [<c14d36b7>] driver_detach+0x97/0xa0
        [<c14d29c0>] bus_remove_driver+0x40/0x80
        [<c14d427a>] driver_unregister+0x2a/0x60
        [<c13ec768>] pci_unregister_driver+0x18/0x70
        [<f8aced4f>] ath10k_pci_exit+0xd/0x2be [ath10k_pci]
        [<c1101e78>] SyS_delete_module+0x158/0x210
        [<c11b34f1>] ? __might_fault+0x41/0xa0
        [<c11b353b>] ? __might_fault+0x8b/0xa0
        [<c1001a4b>] do_fast_syscall_32+0x9b/0x1c0
        [<c178da34>] sysenter_past_esp+0x45/0x74
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      02a9e08d
  4. 01 12月, 2016 4 次提交
    • B
      ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL · 43ca92d3
      Ben Greear 提交于
      These memory chunks are often used as 'swap' by the NIC,
      so it will be both reading and writing to these areas.
      
      This seems to fix errors like this on my x86-64 machine:
      
      kernel: DMAR: DMAR:[DMA Write] Request device [05:00.0] fault addr ff5de000
              DMAR:[fault reason 05] PTE Write access is not set
      Tested-by: NMarek Behun <kabel@blackhole.sk>
      Signed-off-by: NBen Greear <greearb@candelatech.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      43ca92d3
    • M
      ath10k: fix Tx DMA alloc failure during continuous wifi down/up · 9ec34a86
      Mohammed Shafi Shajakhan 提交于
      With maximum number of vap's configured in a two radio supported
      systems of ~256 Mb RAM, doing a continuous wifi down/up and
      intermittent traffic streaming from the connected stations results
      in failure to allocate contiguous memory for tx buffers. This results
      in the disappearance of all VAP's and a manual reboot is needed as
      this is not a crash (or) OOM(for OOM killer to be invoked). To address
      this allocate contiguous memory for tx buffers one time and re-use them
      until the modules are unloaded but this results in a slight increase in
      memory footprint of ath10k when the wifi is down, but the modules are
      still loaded. Also as of now we use a separate bool 'tx_mem_allocated'
      to keep track of the one time memory allocation, as we cannot come up
      with something like 'ath10k_tx_{register,unregister}' before
      'ath10k_probe_fw' is called as 'ath10k_htt_tx_alloc_cont_frag_desc'
      memory allocation is dependent on the hw_param 'continuous_frag_desc'
      
      a) memory footprint of ath10k without the change
      
      lsmod | grep ath10k
      ath10k_core           414498  1 ath10k_pci
      ath10k_pci             38236  0
      
      b) memory footprint of ath10k with the change
      
      ath10k_core           414980  1 ath10k_pci
      ath10k_pci             38236  0
      
      Memory Failure Call trace:
      
      hostapd: page allocation failure: order:6, mode:0xd0
       [<c021f150>] (__dma_alloc_buffer.isra.23) from
      [<c021f23c>] (__alloc_remap_buffer.isra.26+0x14/0xb8)
      [<c021f23c>] (__alloc_remap_buffer.isra.26) from
      [<c021f664>] (__dma_alloc+0x224/0x2b8)
      [<c021f664>] (__dma_alloc) from [<c021f810>]
      (arm_dma_alloc+0x84/0x90)
      [<c021f810>] (arm_dma_alloc) from [<bf954764>]
      (ath10k_htt_tx_alloc+0xe0/0x2e4 [ath10k_core])
      [<bf954764>] (ath10k_htt_tx_alloc [ath10k_core]) from
      [<bf94e6ac>] (ath10k_core_start+0x538/0xcf8 [ath10k_core])
      [<bf94e6ac>] (ath10k_core_start [ath10k_core]) from
      [<bf947eec>] (ath10k_start+0xbc/0x56c [ath10k_core])
      [<bf947eec>] (ath10k_start [ath10k_core]) from
      [<bf8a7a04>] (drv_start+0x40/0x5c [mac80211])
      [<bf8a7a04>] (drv_start [mac80211]) from [<bf8b7cf8>]
      (ieee80211_do_open+0x170/0x82c [mac80211])
      [<bf8b7cf8>] (ieee80211_do_open [mac80211]) from
      [<c056afc8>] (__dev_open+0xa0/0xf4)
      [21053.491752] Normal: 641*4kB (UEMR) 505*8kB (UEMR) 330*16kB (UEMR)
      126*32kB (UEMR) 762*64kB (UEMR) 237*128kB (UEMR) 1*256kB (M) 0*512kB
      0*1024kB 0*2048kB 0*4096kB = 95276kB
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      9ec34a86
    • M
      ath10k: fix soft lockup during firmware crash/hw-restart · c2cac2f7
      Mohammed Shafi Shajakhan 提交于
      During firmware crash (or) user requested manual restart
      the system gets into a soft lock up state because of the
      below root cause.
      
      During user requested hardware restart / firmware crash
      the system goes into a soft lockup state as 'napi_synchronize'
      is called after 'napi_disable' (which sets 'NAPI_STATE_SCHED'
      bit) and it sleeps into infinite loop as it waits for
      'NAPI_STATE_SCHED' to be cleared. This condition is hit because
      'ath10k_hif_stop' is called twice as below (resulting in calling
      'napi_synchronize' after 'napi_disable')
      
      'ath10k_core_restart' -> 'ath10k_hif_stop' (ATH10K_STATE_ON) ->
      -> 'ieee80211_restart_hw' -> 'ath10k_start' -> 'ath10k_halt' ->
      'ath10k_core_stop' -> 'ath10k_hif_stop' (ATH10K_STATE_RESTARTING)
      
      Fix this by calling 'ath10k_halt' in ath10k_core_restart itself
      as it makes more sense before informing mac80211 to restart h/w
      Also remove 'ath10k_halt' in ath10k_start for the state of 'restarting'
      
      Fixes: 3c97f5de ("ath10k: implement NAPI support")
      Cc: <stable@vger.kernel.org> # v4.9
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      c2cac2f7
    • E
      ath10k: fix TLV set regdomain command · 4e322f7d
      Erik Stromdahl 提交于
      There is a typo bug in the current implementation of
      ath10k_wmi_tlv_op_gen_pdev_set_rd.
      The conformance test limits are not set up properly.
      
      The two arguments ctl2g and ctl5g were not used at all.
      Instead, the regdomain arguments rd2g and rd5g were used
      for the ctl settings as well.
      Signed-off-by: NErik Stromdahl <erik.stromdahl@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      4e322f7d
  5. 24 11月, 2016 3 次提交
  6. 23 11月, 2016 5 次提交
    • M
      ath10k: add spectral scan support to wmi-tlv · 5a401f36
      Michal Kazior 提交于
      Command structure and event flow doesn't seem to
      be any different compared to existing
      implementation for other firmware branches.
      
      This patch effectively adds in-driver support for
      spectral scanning on QCA61x4 and QCA9377.
      
      Tested QCA9377 w/ WLAN.TF.1.0-00267-1.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      5a401f36
    • M
      ath10k: fix null deref on wmi-tlv when trying spectral scan · 18ae68ff
      Michal Kazior 提交于
      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: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      18ae68ff
    • P
      ath10k: remove set/get_tsf ieee80211_ops · f6f64cfb
      Pedersen, Thomas 提交于
      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: NThomas Pedersen <twp@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f6f64cfb
    • P
      ath10k: implement offset_tsf ieee80211_op · 973324ff
      Pedersen, Thomas 提交于
      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: NThomas Pedersen <twp@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      973324ff
    • R
      ath10k: advertize hardware packet loss mechanism · ff32eeb8
      Rajkumar Manoharan 提交于
      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: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ff32eeb8
  7. 15 11月, 2016 4 次提交
  8. 19 10月, 2016 1 次提交
  9. 13 10月, 2016 3 次提交
    • V
      ath10k: fix kernel panic due to race in accessing arvif list · ebaa4b16
      Vasanthakumar Thiagarajan 提交于
      arvifs list is traversed within data_lock spin_lock in tasklet
      context to fill channel information from the corresponding vif.
      This means any access to arvifs list for add/del operations
      should also be protected with the same spin_lock to avoid the
      race. Fix this by performing list add/del on arvfis within the
      data_lock. This could fix kernel panic something like the below.
      
       LR is at ath10k_htt_rx_pktlog_completion_handler+0x100/0xb6c [ath10k_core]
       PC is at ath10k_htt_rx_pktlog_completion_handler+0x1c0/0xb6c [ath10k_core]
       Internal error: Oops: 17 [#1] PREEMPT SMP ARM
       [<bf4857f4>] (ath10k_htt_rx_pktlog_completion_handler+0x2f4/0xb6c [ath10k_core])
       [<bf487540>] (ath10k_htt_txrx_compl_task+0x8b4/0x1188 [ath10k_core])
       [<c00312d4>] (tasklet_action+0x8c/0xec)
       [<c00309a8>] (__do_softirq+0xdc/0x208)
       [<c0030d6c>] (irq_exit+0x84/0xe0)
       [<c005db04>] (__handle_domain_irq+0x80/0xa0)
       [<c00085c4>] (gic_handle_irq+0x38/0x5c)
       [<c0009640>] (__irq_svc+0x40/0x74)
      
      (gdb) list *(ath10k_htt_rx_pktlog_completion_handler+0x1c0)
      0x136c0 is in ath10k_htt_rx_h_channel (drivers/net/wireless/ath/ath10k/htt_rx.c:769)
      764		struct cfg80211_chan_def def;
      765
      766		lockdep_assert_held(&ar->data_lock);
      767
      768		list_for_each_entry(arvif, &ar->arvifs, list) {
      769			if (arvif->vdev_id == vdev_id &&
      770			    ath10k_mac_vif_chan(arvif->vif, &def) == 0)
      771				return def.chan;
      772		}
      773
      Signed-off-by: NVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ebaa4b16
    • M
      ath10k: cleanup calling ath10k_htt_rx_h_unchain · 7543d116
      Mohammed Shafi Shajakhan 提交于
      'ath10k_htt_rx_h_unchain' needs to be called only if the return
      value from 'ath10k_htt_rx_amsdu_pop' is 1('chained msdu's'), this
      change makes it more explicit and avoids doing a skb_peek, fetching
      rx descriptor pointer, checking rx msdu decap format for the case of
      ret = 0 (unchained msdus). Found this change during code walk through,
      not sure if this addresses any issue.
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7543d116
    • M
      ath10k: cache calibration data when the core is stopped · f67b107d
      Marty Faltesek 提交于
      Commit 0b8e3c4c ("ath10k: move cal data len to hw_params") broke retrieving
      the calibration data from cal_data debugfs file. The length of file was always
      zero. The reason is:
      
          static ssize_t ath10k_debug_cal_data_read(struct file *file,
                                                char __user *user_buf,
                                                size_t count, loff_t *ppos)
          {
              struct ath10k *ar = file->private_data;
              void *buf = file->private_data;
      
      This is obviously bogus, private_data cannot contain both struct ath10k and the
      buffer. Fix it by caching calibration data to ar->debug.cal_data. This also
      allows it to be accessed when the device is not active (interface is down).
      
      The cal_data buffer is fixed size because during the first firmware probe we
      don't yet know what will be the lenght of the calibration data. It was simplest
      just to use a fixed length. There's a WARN_ON() in
      ath10k_debug_cal_data_fetch() if the buffer is too small.
      
      Tested with qca988x and firmware 10.2.4.70.56.
      Reported-by: NNikolay Martynov <mar.kolya@gmail.com>
      Fixes: 0b8e3c4c ("ath10k: move cal data len to hw_params")
      Cc: stable@vger.kernel.org # 4.7+
      Signed-off-by: NMarty Faltesek <mfaltesek@google.com>
      [kvalo@qca.qualcomm.com: improve commit log and minor other changes]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f67b107d
  10. 04 10月, 2016 4 次提交
  11. 28 9月, 2016 3 次提交
    • R
      ath10k: fix copy engine 5 destination ring stuck · 0628467f
      Rajkumar Manoharan 提交于
      Firmware is running watchdog timer for tracking copy engine ring index
      and write index. Whenever both indices are stuck at same location for
      given duration, watchdog will be trigger to assert target. While
      updating copy engine destination ring write index, driver ensures that
      write index will not be same as read index by finding delta between these
      two indices (CE_RING_DELTA).
      
      HTT target to host copy engine (CE5) is special case where ring buffers
      will be reused and delta check is not applied while updating write index.
      In rare scenario, whenever CE5 ring is full, both indices will be referring
      same location and this is causing CE ring stuck issue as explained
      above. This issue is originally reported on IPQ4019 during long hour stress
      testing and during veriwave max clients testsuites. The same issue is
      also observed in other chips as well. Fix this by ensuring that write
      index is one less than read index which means that full ring is
      available for receiving data.
      
      Cc: stable@vger.kernel.org
      Tested-by: NTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      0628467f
    • M
      ath10k: Ignore SWBA event for a vif if its marked for no beacon · b63b33ec
      Mohammed Shafi Shajakhan 提交于
      Ignore processing further in SWBA event scheduled for a vif, if mac80211
      has marked the particular vif for stop beaconing and brought the vdev
      down in 'ath10k_control_beaconing'. This should potentially avoid ath10k
      warning/error messages while running continuous wifi down/up with max
      number of vaps configured. Found this change during code walk through
      and going through other beacon configuration related functions in ath10k
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      b63b33ec
    • W
      ath10k: fix error return code in ahb · 931eb6b7
      Wei Yongjun 提交于
      Fix to return a negative error code from the error handling case
      instead of 0, as done elsewhere in function ath10k_ahb_probe() or
      ath10k_ahb_resource_init().
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      931eb6b7
  12. 27 9月, 2016 3 次提交