3702abb412cc619524a18c1efbbc0a9dbb09025c
[openwrt/staging/luka.git] / package / kernel / mac80211 / patches / ath / 982-ath10k-fix-latency-issue-for-QCA988x.patch
1 From: Miaoqing Pan <miaoqing@codeaurora.org>
2 Subject: [PATCH] ath10k: fix latency issue for QCA988x
3 Date: Thu, 29 Aug 2019 10:45:12 +0800
4
5 Bad latency is found on QCA988x, the issue was introduced by
6 commit 4504f0e5b571 ("ath10k: sdio: workaround firmware UART
7 pin configuration bug"). If uart_pin_workaround is false, this
8 change will set uart pin even if uart_print is false.
9
10 Tested HW: QCA9880
11 Tested FW: 10.2.4-1.0-00037
12
13 Fixes: 4504f0e5b571 ("ath10k: sdio: workaround firmware UART pin configuration bug")
14 Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
15 ---
16 drivers/net/wireless/ath/ath10k/core.c | 15 +++++++++------
17 1 file changed, 9 insertions(+), 6 deletions(-)
18
19 --- a/drivers/net/wireless/ath/ath10k/core.c
20 +++ b/drivers/net/wireless/ath/ath10k/core.c
21 @@ -2124,12 +2124,15 @@ static int ath10k_init_uart(struct ath10
22 return ret;
23 }
24
25 - if (!uart_print && ar->hw_params.uart_pin_workaround) {
26 - ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin,
27 - ar->hw_params.uart_pin);
28 - if (ret) {
29 - ath10k_warn(ar, "failed to set UART TX pin: %d", ret);
30 - return ret;
31 + if (!uart_print) {
32 + if (ar->hw_params.uart_pin_workaround) {
33 + ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin,
34 + ar->hw_params.uart_pin);
35 + if (ret) {
36 + ath10k_warn(ar, "failed to set UART TX pin: %d",
37 + ret);
38 + return ret;
39 + }
40 }
41
42 return 0;