diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-11-27 04:11:17 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-12-01 02:09:28 -0500 |
commit | acfe7ecfa40dece73e3dcdc2f606a87988b1472c (patch) | |
tree | 03b850ef33e7072ea854977061da7aaa8e9b7384 | |
parent | 37b9f933e0a82dcf61eb692d99d7106395b8e50f (diff) |
ath10k: make wmi service bitmap non-debug
The service bitmap can be used to determine
firmware capabilities.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.c | 8 |
4 files changed, 8 insertions, 22 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 4a294987736c..5af9a24ae143 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h | |||
@@ -123,6 +123,7 @@ struct ath10k_wmi { | |||
123 | struct completion service_ready; | 123 | struct completion service_ready; |
124 | struct completion unified_ready; | 124 | struct completion unified_ready; |
125 | wait_queue_head_t tx_credits_wq; | 125 | wait_queue_head_t tx_credits_wq; |
126 | DECLARE_BITMAP(svc_map, WMI_SERVICE_MAX); | ||
126 | struct wmi_cmd_map *cmd; | 127 | struct wmi_cmd_map *cmd; |
127 | struct wmi_vdev_param_map *vdev_param; | 128 | struct wmi_vdev_param_map *vdev_param; |
128 | struct wmi_pdev_param_map *pdev_param; | 129 | struct wmi_pdev_param_map *pdev_param; |
@@ -313,7 +314,6 @@ struct ath10k_debug { | |||
313 | struct ath10k_fw_stats fw_stats; | 314 | struct ath10k_fw_stats fw_stats; |
314 | struct completion fw_stats_complete; | 315 | struct completion fw_stats_complete; |
315 | bool fw_stats_done; | 316 | bool fw_stats_done; |
316 | DECLARE_BITMAP(wmi_service_bitmap, WMI_SERVICE_MAX); | ||
317 | 317 | ||
318 | unsigned long htt_stats_mask; | 318 | unsigned long htt_stats_mask; |
319 | struct delayed_work htt_stats_dwork; | 319 | struct delayed_work htt_stats_dwork; |
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index c096d00aab97..a716758f14b0 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c | |||
@@ -179,13 +179,6 @@ EXPORT_SYMBOL(ath10k_warn); | |||
179 | 179 | ||
180 | #ifdef CONFIG_ATH10K_DEBUGFS | 180 | #ifdef CONFIG_ATH10K_DEBUGFS |
181 | 181 | ||
182 | void ath10k_debug_read_service_map(struct ath10k *ar, | ||
183 | const void *service_map, | ||
184 | size_t map_size) | ||
185 | { | ||
186 | memcpy(ar->debug.wmi_service_bitmap, service_map, map_size); | ||
187 | } | ||
188 | |||
189 | static ssize_t ath10k_read_wmi_services(struct file *file, | 182 | static ssize_t ath10k_read_wmi_services(struct file *file, |
190 | char __user *user_buf, | 183 | char __user *user_buf, |
191 | size_t count, loff_t *ppos) | 184 | size_t count, loff_t *ppos) |
@@ -207,8 +200,9 @@ static ssize_t ath10k_read_wmi_services(struct file *file, | |||
207 | if (len > buf_len) | 200 | if (len > buf_len) |
208 | len = buf_len; | 201 | len = buf_len; |
209 | 202 | ||
203 | spin_lock_bh(&ar->data_lock); | ||
210 | for (i = 0; i < WMI_SERVICE_MAX; i++) { | 204 | for (i = 0; i < WMI_SERVICE_MAX; i++) { |
211 | enabled = test_bit(i, ar->debug.wmi_service_bitmap); | 205 | enabled = test_bit(i, ar->wmi.svc_map); |
212 | name = wmi_service_name(i); | 206 | name = wmi_service_name(i); |
213 | 207 | ||
214 | if (!name) { | 208 | if (!name) { |
@@ -224,6 +218,7 @@ static ssize_t ath10k_read_wmi_services(struct file *file, | |||
224 | "%-40s %s\n", | 218 | "%-40s %s\n", |
225 | name, enabled ? "enabled" : "-"); | 219 | name, enabled ? "enabled" : "-"); |
226 | } | 220 | } |
221 | spin_unlock_bh(&ar->data_lock); | ||
227 | 222 | ||
228 | ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); | 223 | ret_cnt = simple_read_from_buffer(user_buf, count, ppos, buf, len); |
229 | 224 | ||
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index 815d325ab930..1b87a5dbec53 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h | |||
@@ -62,9 +62,6 @@ int ath10k_debug_create(struct ath10k *ar); | |||
62 | void ath10k_debug_destroy(struct ath10k *ar); | 62 | void ath10k_debug_destroy(struct ath10k *ar); |
63 | int ath10k_debug_register(struct ath10k *ar); | 63 | int ath10k_debug_register(struct ath10k *ar); |
64 | void ath10k_debug_unregister(struct ath10k *ar); | 64 | void ath10k_debug_unregister(struct ath10k *ar); |
65 | void ath10k_debug_read_service_map(struct ath10k *ar, | ||
66 | const void *service_map, | ||
67 | size_t map_size); | ||
68 | void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb); | 65 | void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb); |
69 | struct ath10k_fw_crash_data * | 66 | struct ath10k_fw_crash_data * |
70 | ath10k_debug_get_new_fw_crash_data(struct ath10k *ar); | 67 | ath10k_debug_get_new_fw_crash_data(struct ath10k *ar); |
@@ -109,12 +106,6 @@ static inline void ath10k_debug_unregister(struct ath10k *ar) | |||
109 | { | 106 | { |
110 | } | 107 | } |
111 | 108 | ||
112 | static inline void ath10k_debug_read_service_map(struct ath10k *ar, | ||
113 | const void *service_map, | ||
114 | size_t map_size) | ||
115 | { | ||
116 | } | ||
117 | |||
118 | static inline void ath10k_debug_fw_stats_process(struct ath10k *ar, | 109 | static inline void ath10k_debug_fw_stats_process(struct ath10k *ar, |
119 | struct sk_buff *skb) | 110 | struct sk_buff *skb) |
120 | { | 111 | { |
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 81ccc2eda47e..c0f3e4d09263 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c | |||
@@ -2511,16 +2511,17 @@ static void ath10k_wmi_event_service_ready(struct ath10k *ar, | |||
2511 | { | 2511 | { |
2512 | struct wmi_svc_rdy_ev_arg arg = {}; | 2512 | struct wmi_svc_rdy_ev_arg arg = {}; |
2513 | u32 num_units, req_id, unit_size, num_mem_reqs, num_unit_info, i; | 2513 | u32 num_units, req_id, unit_size, num_mem_reqs, num_unit_info, i; |
2514 | DECLARE_BITMAP(svc_bmap, WMI_SERVICE_MAX) = {}; | ||
2515 | int ret; | 2514 | int ret; |
2516 | 2515 | ||
2516 | memset(&ar->wmi.svc_map, 0, sizeof(ar->wmi.svc_map)); | ||
2517 | |||
2517 | if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) { | 2518 | if (test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features)) { |
2518 | ret = ath10k_wmi_10x_pull_svc_rdy_ev(skb, &arg); | 2519 | ret = ath10k_wmi_10x_pull_svc_rdy_ev(skb, &arg); |
2519 | wmi_10x_svc_map(arg.service_map, svc_bmap, | 2520 | wmi_10x_svc_map(arg.service_map, ar->wmi.svc_map, |
2520 | arg.service_map_len); | 2521 | arg.service_map_len); |
2521 | } else { | 2522 | } else { |
2522 | ret = ath10k_wmi_main_pull_svc_rdy_ev(skb, &arg); | 2523 | ret = ath10k_wmi_main_pull_svc_rdy_ev(skb, &arg); |
2523 | wmi_main_svc_map(arg.service_map, svc_bmap, | 2524 | wmi_main_svc_map(arg.service_map, ar->wmi.svc_map, |
2524 | arg.service_map_len); | 2525 | arg.service_map_len); |
2525 | } | 2526 | } |
2526 | 2527 | ||
@@ -2543,7 +2544,6 @@ static void ath10k_wmi_event_service_ready(struct ath10k *ar, | |||
2543 | ar->num_rf_chains = __le32_to_cpu(arg.num_rf_chains); | 2544 | ar->num_rf_chains = __le32_to_cpu(arg.num_rf_chains); |
2544 | ar->ath_common.regulatory.current_rd = __le32_to_cpu(arg.eeprom_rd); | 2545 | ar->ath_common.regulatory.current_rd = __le32_to_cpu(arg.eeprom_rd); |
2545 | 2546 | ||
2546 | ath10k_debug_read_service_map(ar, svc_bmap, sizeof(svc_bmap)); | ||
2547 | ath10k_dbg_dump(ar, ATH10K_DBG_WMI, NULL, "wmi svc: ", | 2547 | ath10k_dbg_dump(ar, ATH10K_DBG_WMI, NULL, "wmi svc: ", |
2548 | arg.service_map, arg.service_map_len); | 2548 | arg.service_map, arg.service_map_len); |
2549 | 2549 | ||