aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/debug.c
diff options
context:
space:
mode:
authorYingying Tang <yintang@codeaurora.org>2020-02-14 16:51:18 +0800
committerKalle Valo <kvalo@codeaurora.org>2020-03-11 18:41:11 +0200
commitbbdc8c5abbd4ce90828027342fc4430c05bc797a (patch)
tree51c3b30c65bbf1e18f636bf08ce88ffdc48623a7 /drivers/net/wireless/ath/ath10k/debug.c
parentath10k: use kzalloc to read for ath10k_sdio_hif_diag_read (diff)
downloadlinux-dev-bbdc8c5abbd4ce90828027342fc4430c05bc797a.tar.xz
linux-dev-bbdc8c5abbd4ce90828027342fc4430c05bc797a.zip
ath10k: fix unsupported chip reset debugs file write
Before this change, after writing "warm_hw_reset" debugfs file, host will send chip reset command to FW even though FW do not support this service getting a warning print. Though there is no FW impact before this change, this patch restricts chip reset command sent to FW only if FW advertises the support via WMI service bit. Removed the redundant check and ath10k_warn() print as well. New version FW will report chip reset service bit to host. Host allow user to trigger WLAN chip reset only when fw report this service bit. For older NON-TLV FW, since it do not report chip reset service bit, host will not send chip reset command. For older TLV FW, since it report chip reset service bit, host will send chip reset command. Tested HW: QCA9984, WCN3990 QCA9984 FW version: WLAN.BL.3.9.0.2-00042-S-1 Signed-off-by: Yingying Tang <yintang@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/debug.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 3894b77db71d..f811e6940fb0 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -2373,9 +2373,6 @@ static ssize_t ath10k_write_warm_hw_reset(struct file *file,
goto exit;
}
- if (!(test_bit(WMI_SERVICE_RESET_CHIP, ar->wmi.svc_map)))
- ath10k_warn(ar, "wmi service for reset chip is not available\n");
-
ret = ath10k_wmi_pdev_set_param(ar, ar->wmi.pdev_param->pdev_reset,
WMI_RST_MODE_WARM_RESET);
@@ -2650,8 +2647,10 @@ int ath10k_debug_register(struct ath10k *ar)
ar->debug.debugfs_phy, ar,
&fops_tpc_stats_final);
- debugfs_create_file("warm_hw_reset", 0600, ar->debug.debugfs_phy, ar,
- &fops_warm_hw_reset);
+ if (test_bit(WMI_SERVICE_RESET_CHIP, ar->wmi.svc_map))
+ debugfs_create_file("warm_hw_reset", 0600,
+ ar->debug.debugfs_phy, ar,
+ &fops_warm_hw_reset);
debugfs_create_file("ps_state_enable", 0600, ar->debug.debugfs_phy, ar,
&fops_ps_state_enable);