linux/drivers/net/wireless/ath
Carl Huang d56bbeea25 ath10k: optimize pci diag mem read & write operations
Delay 1ms is too long for both diag read and write operations.
This is observed when writing a big memory buffer to target or
reading a big memory buffer from target. Take writing/reading
512k bytes as example, the delay itself is 256ms as the maximum
length of every write/read is 2k size.

Reduce the delay to 50us for read and write operations.

Take the ath10k_pci_targ_cpu_to_ce_addr() out of loop and put it
in the beginning of the loop for ath10k_pci_diag_read_mem().

The ath10k_pci_targ_cpu_to_ce_addr() is to convert the address
from target cpu's perspective to CE's perspective, so it makes
no sense to convert a CE's perspective address again in the loop.
It's a wrong implementation but happens to work.

If the target address is below 1M space, then the convert in the loop
from the second time becomes wrong because the previously converted address
is larger than 1M. The counterpart ath10k_pci_diag_write_mem() has the
correct implementation.

With this change, ath10k_pci_diage_read_mem() works correctly no matter
the target address is below 1M or above 1M.

It's tested with QCA6174 hw3.2 and
firmware-6.bin_WLAN.RM.4.4.1-00111-QCARMSWP-1. QCA9377 is also affected.

Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-09-06 19:09:44 +03:00
..
ar5523 ath: Convert timers to use timer_setup() 2017-10-27 16:54:19 +03:00
ath5k ath5k: remove redundant pointer rf 2018-07-30 20:55:55 +03:00
ath6kl ath6kl: convert to using %pOFn instead of device_node.name 2018-09-03 19:57:59 +03:00
ath9k Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 2018-08-28 19:39:22 +03:00
ath10k ath10k: optimize pci diag mem read & write operations 2018-09-06 19:09:44 +03:00
carl9170 treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
wcn36xx wcn36xx: use dma_zalloc_coherent instead of allocator/memset 2018-08-24 14:50:20 +03:00
wil6210 wil6210: fix unsigned cid comparison with >= 0 2018-09-06 18:56:14 +03:00
ath.h ath: Remove unnecessary ath_bcast_mac and use eth_broadcast_addr 2018-03-29 12:10:26 +03:00
debug.c
dfs_pattern_detector.c ath: add support to get the detected radar specifications 2018-05-25 13:15:21 +03:00
dfs_pattern_detector.h ath: add support to get the detected radar specifications 2018-05-25 13:15:21 +03:00
dfs_pri_detector.c
dfs_pri_detector.h ath: add support to get the detected radar specifications 2018-05-25 13:15:21 +03:00
hw.c
Kconfig net/wireless: fix spaces and grammar copy/paste in vendor Kconfig help text 2018-03-13 18:52:25 +02:00
key.c
main.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reg.h
regd_common.h ath: Map Zimbabwe to ETSI1_WORLD 2018-05-25 12:56:18 +03:00
regd.c
regd.h ath: Add regulatory mapping for Uganda 2018-05-25 12:52:36 +03:00
spectral_common.h
trace.c
trace.h