1. 26 7月, 2019 1 次提交
    • W
      ath10k: add peer id check in ath10k_peer_find_by_id · a4bf4fec
      Wen Gong 提交于
      [ Upstream commit 49ed34b835e231aa941257394716bc689bc98d9f ]
      
      For some SDIO chip, the peer id is 65535 for MPDU with error status,
      then test_bit will trigger buffer overflow for peer's memory, if kasan
      enabled, it will report error.
      
      Reason is when station is in disconnecting status, firmware do not delete
      the peer info since it not disconnected completely, meanwhile some AP will
      still send data packet to station, then hardware will receive the packet
      and send to firmware, firmware's logic will report peer id of 65535 for
      MPDU with error status.
      
      Add check for overflow the size of peer's peer_ids will avoid the buffer
      overflow access.
      
      Call trace of kasan:
      dump_backtrace+0x0/0x2ec
      show_stack+0x20/0x2c
      __dump_stack+0x20/0x28
      dump_stack+0xc8/0xec
      print_address_description+0x74/0x240
      kasan_report+0x250/0x26c
      __asan_report_load8_noabort+0x20/0x2c
      ath10k_peer_find_by_id+0x180/0x1e4 [ath10k_core]
      ath10k_htt_t2h_msg_handler+0x100c/0x2fd4 [ath10k_core]
      ath10k_htt_htc_t2h_msg_handler+0x20/0x34 [ath10k_core]
      ath10k_sdio_irq_handler+0xcc8/0x1678 [ath10k_sdio]
      process_sdio_pending_irqs+0xec/0x370
      sdio_run_irqs+0x68/0xe4
      sdio_irq_work+0x1c/0x28
      process_one_work+0x3d8/0x8b0
      worker_thread+0x508/0x7cc
      kthread+0x24c/0x264
      ret_from_fork+0x10/0x18
      
      Tested with QCA6174 SDIO with firmware
      WLAN.RMH.4.4.1-00007-QCARMSWP-1.
      Signed-off-by: NWen Gong <wgong@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      a4bf4fec
  2. 19 4月, 2018 1 次提交
  3. 26 2月, 2018 1 次提交
  4. 27 12月, 2017 1 次提交
  5. 05 4月, 2017 1 次提交
  6. 09 9月, 2016 1 次提交
    • R
      ath10k: fix throughput regression in multi client mode · 18f53fe0
      Rajkumar Manoharan 提交于
      commit 7a0adc83 ("ath10k: improve tx scheduling") is causing
      severe throughput drop in multi client mode. This issue is originally
      reported in veriwave setup with 50 clients with TCP downlink traffic.
      While increasing number of clients, the average throughput drops
      gradually. With 50 clients, the combined peak throughput is decreased
      to 98 Mbps whereas reverting given commit restored it to 550 Mbps.
      
      Processing txqs for every tx completion is causing overhead. Ideally for
      management frame tx completion, pending txqs processing can be avoided.
      The change partly reverts the commit "ath10k: improve tx scheduling".
      Processing pending txqs after all skbs tx completion will yeild enough
      room to burst tx frames.
      
      Fixes: 7a0adc83 ("ath10k: improve tx scheduling")
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      18f53fe0
  7. 02 9月, 2016 1 次提交
  8. 08 7月, 2016 1 次提交
  9. 30 6月, 2016 1 次提交
    • B
      ath10k: fix potential null dereference bugs · a66cd733
      Bob Copeland 提交于
      Smatch warns about a number of cases in ath10k where a pointer is
      null-checked after it has already been dereferenced, in code involving
      ath10k private virtual interface pointers.
      
      Fix these by making the dereference happen later.
      
      Addresses the following smatch warnings:
      
      drivers/net/wireless/ath/ath10k/mac.c:3651 ath10k_mac_txq_init() warn: variable dereferenced before check 'txq' (see line 3649)
      drivers/net/wireless/ath/ath10k/mac.c:3664 ath10k_mac_txq_unref() warn: variable dereferenced before check 'txq' (see line 3659)
      drivers/net/wireless/ath/ath10k/htt_tx.c:70 __ath10k_htt_tx_txq_recalc() warn: variable dereferenced before check 'txq->sta' (see line 52)
      drivers/net/wireless/ath/ath10k/htt_tx.c:740 ath10k_htt_tx_get_vdev_id() warn: variable dereferenced before check 'cb->vif' (see line 736)
      drivers/net/wireless/ath/ath10k/txrx.c:86 ath10k_txrx_tx_unref() warn: variable dereferenced before check 'txq' (see line 84)
      drivers/net/wireless/ath/ath10k/wmi.c:1837 ath10k_wmi_op_gen_mgmt_tx() warn: variable dereferenced before check 'cb->vif' (see line 1825)
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a66cd733
  10. 25 5月, 2016 1 次提交
  11. 19 4月, 2016 1 次提交
  12. 14 4月, 2016 2 次提交
  13. 04 4月, 2016 1 次提交
  14. 18 3月, 2016 1 次提交
    • R
      ath10k: move mgmt descriptor limit handle under mgmt_tx · cac08552
      Rajkumar Manoharan 提交于
      Frames that are transmitted via MGMT_TX are using reserved descriptor
      slots in firmware. This limitation is for the htt_mgmt_tx path itself,
      not for mgmt frames per se. In 16 MBSSID scenario, these reserved slots
      will be easy exhausted due to frequent probe responses. So for 10.4
      based solutions, probe responses are limited by a threshold (24).
      
      management tx path is separate for all except tlv based solutions. Since
      tlv solutions (qca6174 & qca9377) do not support 16 AP interfaces, it is
      safe to move management descriptor limitation check under mgmt_tx
      function. Though CPU improvement is negligible, unlikely conditions or
      never hit conditions in hot path can be avoided on data transmission.
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      cac08552
  15. 06 3月, 2016 3 次提交
  16. 23 11月, 2015 2 次提交
  17. 06 10月, 2015 1 次提交
  18. 09 9月, 2015 1 次提交
  19. 29 7月, 2015 1 次提交
  20. 16 6月, 2015 1 次提交
  21. 09 4月, 2015 1 次提交
  22. 27 1月, 2015 1 次提交
  23. 31 10月, 2014 1 次提交
    • M
      ath10k: speed up hw recovery · 7962b0d8
      Michal Kazior 提交于
      In some cases hw recovery was taking an absurdly
      long time due to ath10k waiting for things that
      would never really complete.
      
      Instead of waiting for inevitable timeouts poke
      all completions and wakequeues and check if it's
      still worth waiting.
      
      Reading/writing ar->state requires conf_mutex.
      Since waiters might be holding it introduce a new
      flag CRASH_FLUSH so it's possible to tell waiters
      to abort whatever they were waiting for.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7962b0d8
  24. 07 10月, 2014 1 次提交
  25. 18 9月, 2014 1 次提交
    • K
      ath10k: use ether_addr_copy() · b25f32cb
      Kalle Valo 提交于
      As suggeested by checkpatch:
      
      WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
      
      In wmi.c I had to change due to sparse warnings copying of struct wmi_mac_addr
      from form &cmd->peer_macaddr.addr to cmd->peer_macaddr.addr. In
      ath10k_wmi_set_ap_ps_param() I also added the missing ".addr" to the copy
      command.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      b25f32cb
  26. 27 8月, 2014 1 次提交
  27. 25 7月, 2014 1 次提交
  28. 25 3月, 2014 1 次提交
  29. 28 2月, 2014 4 次提交
    • M
      ath10k: reduce htt tx/rx spinlock overhead · 45967089
      Michal Kazior 提交于
      It is inefficient to grab irqsave spinlocks for
      skb lists for each queue/dequeue action.
      
      Using rx_ring.lock and tx_lock allows to use less
      heavy bh spinlock functions and moving locking
      upwards allows to toggle spinlocks less often.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      45967089
    • M
      ath10k: bypass htc for htt tx path · a16942e6
      Michal Kazior 提交于
      Going through full htc tx path for htt tx is a
      waste of resources. By skipping it it's possible
      to easily submit scatter-gather to the pci hif for
      reduced host cpu load and improved performance.
      
      The new approach uses dma pool to store the
      following metadata for each tx request:
       * msdu fragment list
       * htc header
       * htt tx command
      
      The htt tx command contains a msdu prefetch.
      Instead of copying it original mapped msdu address
      is used to submit a second scatter-gather item to
      hif to make a complete htt tx command.
      
      The htt tx command itself hands over dma mapped
      pointers to msdus and completion of the command
      itself doesn't mean the frame has been sent and
      can be unmapped/freed. This is why htc tx
      completion is skipped for htt tx as all tx related
      resources are freed upon htt tx completion
      indication event (which also implicitly means htt
      tx command itself was completed).
      
      Since now each htt tx request effectively consists
      of 2 copy engine items CE_HTT_H2T_MSG_SRC_NENTRIES
      is updated to allow maximum of
      TARGET_10X_NUM_MSDU_DESC msdus being queued. This
      keeps the tx path resource management simple.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a16942e6
    • M
      ath10k: remove DMA mapping wrappers · 767d34fc
      Michal Kazior 提交于
      There's no real benefit from using them. DMA-API
      already provides debugging. Some skbuffs are
      already mapped directly with DMA-API since wrapper
      arguments were insufficient and extending them
      would be pointless.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      767d34fc
    • C
      ath10k: set the mactime of ieee80211_rx_status · e72698f8
      Chun-Yeow Yeoh 提交于
      Retrieve the mactime of ieee80211_rx_status based on received
      data frame. The value is obtained from the htt_rx_indication_ppdu
      structure and only available in 32-bit.
      
      kvalo: white space fixes
      Signed-off-by: NChun-Yeow Yeoh <yeohchunyeow@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      e72698f8
  30. 27 2月, 2014 1 次提交
  31. 13 2月, 2014 1 次提交
  32. 06 2月, 2014 1 次提交
  33. 16 12月, 2013 1 次提交