Skip to content

Commit

Permalink
ath10k: fix debugfs pktlog_filter write
Browse files Browse the repository at this point in the history
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: 9017445 ("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>
  • Loading branch information
Anilkumar Kolli authored and Kalle Valo committed Mar 18, 2016
1 parent b9c191b commit 9ddc486
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/wireless/ath/ath10k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,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",
Expand Down

0 comments on commit 9ddc486

Please sign in to comment.