Commit 7f9befbb authored by Anilkumar Kolli's avatar Anilkumar Kolli Committed by Kalle Valo

ath10k: move pktlog_filter out of ath10k_debug

Move pktlog_filter from struct ath10k_debug to struct ath10k
so that pktlog can be enabled even when debugfs is not
enabled, needed to enable peer tx stats for 10.2.4.

No changes in functionality.
Signed-off-by: default avatarAnilkumar Kolli <akolli@qti.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 6a7f8911
...@@ -487,7 +487,6 @@ struct ath10k_debug { ...@@ -487,7 +487,6 @@ struct ath10k_debug {
/* protected by conf_mutex */ /* protected by conf_mutex */
u64 fw_dbglog_mask; u64 fw_dbglog_mask;
u32 fw_dbglog_level; u32 fw_dbglog_level;
u32 pktlog_filter;
u32 reg_addr; u32 reg_addr;
u32 nf_cal_period; u32 nf_cal_period;
void *cal_data; void *cal_data;
...@@ -962,6 +961,7 @@ struct ath10k { ...@@ -962,6 +961,7 @@ struct ath10k {
} spectral; } spectral;
#endif #endif
u32 pktlog_filter;
struct { struct {
/* protected by conf_mutex */ /* protected by conf_mutex */
struct ath10k_fw_components utf_mode_fw; struct ath10k_fw_components utf_mode_fw;
......
...@@ -1950,14 +1950,14 @@ int ath10k_debug_start(struct ath10k *ar) ...@@ -1950,14 +1950,14 @@ int ath10k_debug_start(struct ath10k *ar)
ret); ret);
} }
if (ar->debug.pktlog_filter) { if (ar->pktlog_filter) {
ret = ath10k_wmi_pdev_pktlog_enable(ar, ret = ath10k_wmi_pdev_pktlog_enable(ar,
ar->debug.pktlog_filter); ar->pktlog_filter);
if (ret) if (ret)
/* not serious */ /* not serious */
ath10k_warn(ar, ath10k_warn(ar,
"failed to enable pktlog filter %x: %d\n", "failed to enable pktlog filter %x: %d\n",
ar->debug.pktlog_filter, ret); ar->pktlog_filter, ret);
} else { } else {
ret = ath10k_wmi_pdev_pktlog_disable(ar); ret = ath10k_wmi_pdev_pktlog_disable(ar);
if (ret) if (ret)
...@@ -2097,12 +2097,12 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, ...@@ -2097,12 +2097,12 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file,
mutex_lock(&ar->conf_mutex); mutex_lock(&ar->conf_mutex);
if (ar->state != ATH10K_STATE_ON) { if (ar->state != ATH10K_STATE_ON) {
ar->debug.pktlog_filter = filter; ar->pktlog_filter = filter;
ret = count; ret = count;
goto out; goto out;
} }
if (filter == ar->debug.pktlog_filter) { if (filter == ar->pktlog_filter) {
ret = count; ret = count;
goto out; goto out;
} }
...@@ -2111,7 +2111,7 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, ...@@ -2111,7 +2111,7 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file,
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",
ar->debug.pktlog_filter, ret); ar->pktlog_filter, ret);
goto out; goto out;
} }
} else { } else {
...@@ -2122,7 +2122,7 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file, ...@@ -2122,7 +2122,7 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file,
} }
} }
ar->debug.pktlog_filter = filter; ar->pktlog_filter = filter;
ret = count; ret = count;
out: out:
...@@ -2139,7 +2139,7 @@ static ssize_t ath10k_read_pktlog_filter(struct file *file, char __user *ubuf, ...@@ -2139,7 +2139,7 @@ static ssize_t ath10k_read_pktlog_filter(struct file *file, char __user *ubuf,
mutex_lock(&ar->conf_mutex); mutex_lock(&ar->conf_mutex);
len = scnprintf(buf, sizeof(buf) - len, "%08x\n", len = scnprintf(buf, sizeof(buf) - len, "%08x\n",
ar->debug.pktlog_filter); ar->pktlog_filter);
mutex_unlock(&ar->conf_mutex); mutex_unlock(&ar->conf_mutex);
return simple_read_from_buffer(ubuf, count, ppos, buf, len); return simple_read_from_buffer(ubuf, count, ppos, buf, len);
......
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