ath10k: download firmware via diag Copy Engine for QCA6174 and QCA9377.
authorCarl Huang <cjhuang@codeaurora.org>
Tue, 4 Sep 2018 10:00:51 +0000 (13:00 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 6 Sep 2018 16:10:05 +0000 (19:10 +0300)
commit39501ea64116c665e9de7cf6cce91a1defcdbae8
treee43a30b9af98b03a80a3f94a373b38345bfc8dbe
parentbc346c9a24a41fba93f8f5c4cd3de2c64fd02cfd
ath10k: download firmware via diag Copy Engine for QCA6174 and QCA9377.

Downloading firmware via BMI protocol takes too long time. For example,
a ~700K bytes firmware takes about 500ms to download via BMI protocol.
This is too long especially in suspend and resume scenario where firmware
is re-downloaded unless WoWLAN is enabled. Downloading firmware via diag CE
can reduce the time to ~40ms for a ~700K bytes firmware binary.

Ath10k driver parses the firmware to segments and downloads the segments
to the specified address directly. If the firmware is compressed or has
unsupported segments, ath10k driver will try BMI download again.

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>
drivers/net/wireless/ath/ath10k/bmi.c
drivers/net/wireless/ath/ath10k/bmi.h
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/hw.c
drivers/net/wireless/ath/ath10k/hw.h