diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-09-03 04:44:03 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-09-06 05:42:26 -0400 |
commit | db66ea0442daaa4ee5fb8b3083bde1728ca3a9ba (patch) | |
tree | a68cc5f74d66318a03e97e0856a1f92c1e2fdb77 | |
parent | a9bf05062d13b255d4231ca2637892d9b381a9d4 (diff) |
ath10k: implement ath10k_debug_start/stop()
Needed for the HTT stats implementation.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/core.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.h | 11 |
3 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 2dd39a82ae99..4f2b0e7f2065 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c | |||
@@ -630,6 +630,10 @@ int ath10k_core_start(struct ath10k *ar) | |||
630 | if (status) | 630 | if (status) |
631 | goto err_disconnect_htc; | 631 | goto err_disconnect_htc; |
632 | 632 | ||
633 | status = ath10k_debug_start(ar); | ||
634 | if (status) | ||
635 | goto err_disconnect_htc; | ||
636 | |||
633 | ar->free_vdev_map = (1 << TARGET_NUM_VDEVS) - 1; | 637 | ar->free_vdev_map = (1 << TARGET_NUM_VDEVS) - 1; |
634 | 638 | ||
635 | return 0; | 639 | return 0; |
@@ -647,6 +651,7 @@ EXPORT_SYMBOL(ath10k_core_start); | |||
647 | 651 | ||
648 | void ath10k_core_stop(struct ath10k *ar) | 652 | void ath10k_core_stop(struct ath10k *ar) |
649 | { | 653 | { |
654 | ath10k_debug_stop(ar); | ||
650 | ath10k_htc_stop(&ar->htc); | 655 | ath10k_htc_stop(&ar->htc); |
651 | ath10k_htt_detach(&ar->htt); | 656 | ath10k_htt_detach(&ar->htt); |
652 | ath10k_wmi_detach(ar); | 657 | ath10k_wmi_detach(ar); |
@@ -777,6 +782,7 @@ void ath10k_core_unregister(struct ath10k *ar) | |||
777 | * Otherwise we will fail to submit commands to FW and mac80211 will be | 782 | * Otherwise we will fail to submit commands to FW and mac80211 will be |
778 | * unhappy about callback failures. */ | 783 | * unhappy about callback failures. */ |
779 | ath10k_mac_unregister(ar); | 784 | ath10k_mac_unregister(ar); |
785 | |||
780 | ath10k_core_free_firmware_files(ar); | 786 | ath10k_core_free_firmware_files(ar); |
781 | } | 787 | } |
782 | EXPORT_SYMBOL(ath10k_core_unregister); | 788 | EXPORT_SYMBOL(ath10k_core_unregister); |
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 09f535a1c767..219d4692e548 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c | |||
@@ -517,6 +517,15 @@ static const struct file_operations fops_chip_id = { | |||
517 | .llseek = default_llseek, | 517 | .llseek = default_llseek, |
518 | }; | 518 | }; |
519 | 519 | ||
520 | int ath10k_debug_start(struct ath10k *ar) | ||
521 | { | ||
522 | return 0; | ||
523 | } | ||
524 | |||
525 | void ath10k_debug_stop(struct ath10k *ar) | ||
526 | { | ||
527 | } | ||
528 | |||
520 | int ath10k_debug_create(struct ath10k *ar) | 529 | int ath10k_debug_create(struct ath10k *ar) |
521 | { | 530 | { |
522 | ar->debug.debugfs_phy = debugfs_create_dir("ath10k", | 531 | ar->debug.debugfs_phy = debugfs_create_dir("ath10k", |
@@ -541,6 +550,7 @@ int ath10k_debug_create(struct ath10k *ar) | |||
541 | 550 | ||
542 | return 0; | 551 | return 0; |
543 | } | 552 | } |
553 | |||
544 | #endif /* CONFIG_ATH10K_DEBUGFS */ | 554 | #endif /* CONFIG_ATH10K_DEBUGFS */ |
545 | 555 | ||
546 | #ifdef CONFIG_ATH10K_DEBUG | 556 | #ifdef CONFIG_ATH10K_DEBUG |
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index 168140c54028..9c442a82c493 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h | |||
@@ -42,6 +42,8 @@ extern __printf(1, 2) int ath10k_err(const char *fmt, ...); | |||
42 | extern __printf(1, 2) int ath10k_warn(const char *fmt, ...); | 42 | extern __printf(1, 2) int ath10k_warn(const char *fmt, ...); |
43 | 43 | ||
44 | #ifdef CONFIG_ATH10K_DEBUGFS | 44 | #ifdef CONFIG_ATH10K_DEBUGFS |
45 | int ath10k_debug_start(struct ath10k *ar); | ||
46 | void ath10k_debug_stop(struct ath10k *ar); | ||
45 | int ath10k_debug_create(struct ath10k *ar); | 47 | int ath10k_debug_create(struct ath10k *ar); |
46 | void ath10k_debug_read_service_map(struct ath10k *ar, | 48 | void ath10k_debug_read_service_map(struct ath10k *ar, |
47 | void *service_map, | 49 | void *service_map, |
@@ -50,6 +52,15 @@ void ath10k_debug_read_target_stats(struct ath10k *ar, | |||
50 | struct wmi_stats_event *ev); | 52 | struct wmi_stats_event *ev); |
51 | 53 | ||
52 | #else | 54 | #else |
55 | int ath10k_debug_start(struct ath10k *ar) | ||
56 | { | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | void ath10k_debug_stop(struct ath10k *ar) | ||
61 | { | ||
62 | } | ||
63 | |||
53 | static inline int ath10k_debug_create(struct ath10k *ar) | 64 | static inline int ath10k_debug_create(struct ath10k *ar) |
54 | { | 65 | { |
55 | return 0; | 66 | return 0; |