Commit 3dec2ae8 authored by Anilkumar Kolli's avatar Anilkumar Kolli Committed by Sasha Levin

ath10k: fix debugfs pktlog_filter write

[ Upstream commit 9ddc486a ]

It is observed that, we are disabling the packet log if we write same
value to the pktlog_filter for the second time. Always enable pktlogs
on non zero filter.

Fixes: 90174455 ("ath10k: add support to configure pktlog filter")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAnilkumar Kolli <akolli@qti.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 861c13e1
...@@ -1947,7 +1947,12 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, ...@@ -1947,7 +1947,12 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file,
goto out; goto out;
} }
if (filter && (filter != ar->debug.pktlog_filter)) { if (filter == ar->debug.pktlog_filter) {
ret = count;
goto out;
}
if (filter) {
ret = ath10k_wmi_pdev_pktlog_enable(ar, filter); ret = ath10k_wmi_pdev_pktlog_enable(ar, filter);
if (ret) { if (ret) {
ath10k_warn(ar, "failed to enable pktlog filter %x: %d\n", ath10k_warn(ar, "failed to enable pktlog filter %x: %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment