aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnilkumar Kolli <akolli@qti.qualcomm.com>2017-12-05 08:31:24 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2017-12-14 10:26:34 -0500
commit7f9befbb555d27df98ae51d46d06e454a1f531c0 (patch)
treeee2535c56e07ac261128943c109ed8fa3d671b37
parent6a7f891178c2d2fc3c01e4b7570bd15c0bafd73f (diff)
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: Anilkumar Kolli <akolli@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/core.h2
-rw-r--r--drivers/net/wireless/ath/ath10k/debug.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 71f8e0f0fa90..efd9eab5c139 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -487,7 +487,6 @@ struct ath10k_debug {
487 /* protected by conf_mutex */ 487 /* protected by conf_mutex */
488 u64 fw_dbglog_mask; 488 u64 fw_dbglog_mask;
489 u32 fw_dbglog_level; 489 u32 fw_dbglog_level;
490 u32 pktlog_filter;
491 u32 reg_addr; 490 u32 reg_addr;
492 u32 nf_cal_period; 491 u32 nf_cal_period;
493 void *cal_data; 492 void *cal_data;
@@ -962,6 +961,7 @@ struct ath10k {
962 } spectral; 961 } spectral;
963#endif 962#endif
964 963
964 u32 pktlog_filter;
965 struct { 965 struct {
966 /* protected by conf_mutex */ 966 /* protected by conf_mutex */
967 struct ath10k_fw_components utf_mode_fw; 967 struct ath10k_fw_components utf_mode_fw;
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 66498e3c0f91..181fd8e2e615 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -1950,14 +1950,14 @@ int ath10k_debug_start(struct ath10k *ar)
1950 ret); 1950 ret);
1951 } 1951 }
1952 1952
1953 if (ar->debug.pktlog_filter) { 1953 if (ar->pktlog_filter) {
1954 ret = ath10k_wmi_pdev_pktlog_enable(ar, 1954 ret = ath10k_wmi_pdev_pktlog_enable(ar,
1955 ar->debug.pktlog_filter); 1955 ar->pktlog_filter);
1956 if (ret) 1956 if (ret)
1957 /* not serious */ 1957 /* not serious */
1958 ath10k_warn(ar, 1958 ath10k_warn(ar,
1959 "failed to enable pktlog filter %x: %d\n", 1959 "failed to enable pktlog filter %x: %d\n",
1960 ar->debug.pktlog_filter, ret); 1960 ar->pktlog_filter, ret);
1961 } else { 1961 } else {
1962 ret = ath10k_wmi_pdev_pktlog_disable(ar); 1962 ret = ath10k_wmi_pdev_pktlog_disable(ar);
1963 if (ret) 1963 if (ret)
@@ -2097,12 +2097,12 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file,
2097 mutex_lock(&ar->conf_mutex); 2097 mutex_lock(&ar->conf_mutex);
2098 2098
2099 if (ar->state != ATH10K_STATE_ON) { 2099 if (ar->state != ATH10K_STATE_ON) {
2100 ar->debug.pktlog_filter = filter; 2100 ar->pktlog_filter = filter;
2101 ret = count; 2101 ret = count;
2102 goto out; 2102 goto out;
2103 } 2103 }
2104 2104
2105 if (filter == ar->debug.pktlog_filter) { 2105 if (filter == ar->pktlog_filter) {
2106 ret = count; 2106 ret = count;
2107 goto out; 2107 goto out;
2108 } 2108 }
@@ -2111,7 +2111,7 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file,
2111 ret = ath10k_wmi_pdev_pktlog_enable(ar, filter); 2111 ret = ath10k_wmi_pdev_pktlog_enable(ar, filter);
2112 if (ret) { 2112 if (ret) {
2113 ath10k_warn(ar, "failed to enable pktlog filter %x: %d\n", 2113 ath10k_warn(ar, "failed to enable pktlog filter %x: %d\n",
2114 ar->debug.pktlog_filter, ret); 2114 ar->pktlog_filter, ret);
2115 goto out; 2115 goto out;
2116 } 2116 }
2117 } else { 2117 } else {
@@ -2122,7 +2122,7 @@ static ssize_t ath10k_write_pktlog_filter(struct file *file,
2122 } 2122 }
2123 } 2123 }
2124 2124
2125 ar->debug.pktlog_filter = filter; 2125 ar->pktlog_filter = filter;
2126 ret = count; 2126 ret = count;
2127 2127
2128out: 2128out:
@@ -2139,7 +2139,7 @@ static ssize_t ath10k_read_pktlog_filter(struct file *file, char __user *ubuf,
2139 2139
2140 mutex_lock(&ar->conf_mutex); 2140 mutex_lock(&ar->conf_mutex);
2141 len = scnprintf(buf, sizeof(buf) - len, "%08x\n", 2141 len = scnprintf(buf, sizeof(buf) - len, "%08x\n",
2142 ar->debug.pktlog_filter); 2142 ar->pktlog_filter);
2143 mutex_unlock(&ar->conf_mutex); 2143 mutex_unlock(&ar->conf_mutex);
2144 2144
2145 return simple_read_from_buffer(ubuf, count, ppos, buf, len); 2145 return simple_read_from_buffer(ubuf, count, ppos, buf, len);