ath10k: avoid consecutive OTP download to reduce boot time
authorVikas Patel <vikpatel@codeaurora.org>
Tue, 7 Jan 2020 06:23:15 +0000 (11:53 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 11 Mar 2020 16:29:50 +0000 (18:29 +0200)
commita4b9f641e858d69fcc7b53f7cea8a99a24b269f5
tree835db43d0af1abd46f1c9ac384058ac2c036d319
parent92bacd1c165c2895dda82bbeb49ad9f190a9dd98
ath10k: avoid consecutive OTP download to reduce boot time

Currently, OTP is downloaded twice in case of "pre-cal-dt"
and "pre-cal-file" to fetch the board ID and takes around
~2 sec more boot uptime.

First OTP download happens in "ath10k_core_probe_fw" and
second in ath10k_core_start. First boot does not need OTP
download in core start when valid board id acquired.

The second OTP download is required upon core stop/start.

This patch skips the OTP download when first OTP download
has acquired a valid board id. This patch also marks board
id invalid in "ath10k_core_stop", which will force the OTP
download in ath10k_core_start and fetches valid board id.

Tested HW: QCA9984
Tested FW: 10.4-3.6-00104

Signed-off-by: Vikas Patel <vikpatel@codeaurora.org>
Signed-off-by: Maharaja Kennadyrajan <mkenna@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/core.c