diff options
author | Anilkumar Kolli <akolli@qti.qualcomm.com> | 2016-03-11 11:46:39 +0530 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-05-30 18:00:06 -0400 |
commit | 3dec2ae8b610b459b1e37591149c4065ad343978 (patch) | |
tree | 57dcb9094b5fe633ebf20f8c12382c3f0be4c93e /drivers/net | |
parent | 861c13e117c6c7a21e0a38ea18d68a1fa9d661eb (diff) |
ath10k: fix debugfs pktlog_filter write
[ Upstream commit 9ddc486aa09a3413a6c492fcf160ce61bfccb7b1 ]
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: 90174455ae05 ("ath10k: add support to configure pktlog filter")
Cc: stable@vger.kernel.org
Signed-off-by: Anilkumar Kolli <akolli@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 301081db1ef6..1b69427fbb29 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -1947,7 +1947,12 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, 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); if (ret) { ath10k_warn(ar, "failed to enable pktlog filter %x: %d\n", |