aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2011-08-26 03:36:31 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-08-31 03:10:54 -0400
commitd999ba3e21dc1c84cac9caf68db78fd6dbde7817 (patch)
treec9daba2224a398b8c5366c5f838b81b485d0b6bb
parentf7a7e7ae5db1d436805de7fe19c51b5b2657c63e (diff)
ath6kl: Add initial debugfs changes
Just initial debugfs changes. The debugfs directory would be created at <debugfs_root>/ieee80211/phyX/ath6kl. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h1
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.c10
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.h6
-rw-r--r--drivers/net/wireless/ath/ath6kl/init.c6
4 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 4405ab56bb87..c5537b3f77c8 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -467,6 +467,7 @@ struct ath6kl {
467 struct workqueue_struct *ath6kl_wq; 467 struct workqueue_struct *ath6kl_wq;
468 468
469 struct ath6kl_node_table scan_table; 469 struct ath6kl_node_table scan_table;
470 struct dentry *debugfs_phy;
470}; 471};
471 472
472static inline void *ath6kl_priv(struct net_device *dev) 473static inline void *ath6kl_priv(struct net_device *dev)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 316136c8b903..12775e80a0f4 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -147,4 +147,14 @@ void dump_cred_dist_stats(struct htc_target *target)
147 target->cred_dist_cntxt->cur_free_credits); 147 target->cred_dist_cntxt->cur_free_credits);
148} 148}
149 149
150int ath6kl_debug_init(struct ath6kl *ar)
151{
152 ar->debugfs_phy = debugfs_create_dir("ath6kl",
153 ar->wdev->wiphy->debugfsdir);
154 if (!ar->debugfs_phy)
155 return -ENOMEM;
156
157 /* TODO: Create debugfs file entries for various target/host stats */
158 return 0;
159}
150#endif 160#endif
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h
index 66b399962f01..e8c9ea9ce02c 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.h
+++ b/drivers/net/wireless/ath/ath6kl/debug.h
@@ -78,6 +78,7 @@ void ath6kl_dump_registers(struct ath6kl_device *dev,
78 struct ath6kl_irq_proc_registers *irq_proc_reg, 78 struct ath6kl_irq_proc_registers *irq_proc_reg,
79 struct ath6kl_irq_enable_reg *irq_en_reg); 79 struct ath6kl_irq_enable_reg *irq_en_reg);
80void dump_cred_dist_stats(struct htc_target *target); 80void dump_cred_dist_stats(struct htc_target *target);
81int ath6kl_debug_init(struct ath6kl *ar);
81#else 82#else
82static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask, 83static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
83 const char *fmt, ...) 84 const char *fmt, ...)
@@ -100,6 +101,9 @@ static inline void ath6kl_dump_registers(struct ath6kl_device *dev,
100static inline void dump_cred_dist_stats(struct htc_target *target) 101static inline void dump_cred_dist_stats(struct htc_target *target)
101{ 102{
102} 103}
104static inline int ath6kl_debug_init(struct ath6kl *ar)
105{
106 return 0;
107}
103#endif 108#endif
104
105#endif 109#endif
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 75230ac28537..ad9716c91a81 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -573,6 +573,12 @@ struct ath6kl *ath6kl_core_alloc(struct device *sdev)
573 ar->wdev = wdev; 573 ar->wdev = wdev;
574 wdev->iftype = NL80211_IFTYPE_STATION; 574 wdev->iftype = NL80211_IFTYPE_STATION;
575 575
576 if (ath6kl_debug_init(ar)) {
577 ath6kl_err("Failed to initialize debugfs\n");
578 ath6kl_cfg80211_deinit(ar);
579 return NULL;
580 }
581
576 dev = alloc_netdev(0, "wlan%d", ether_setup); 582 dev = alloc_netdev(0, "wlan%d", ether_setup);
577 if (!dev) { 583 if (!dev) {
578 ath6kl_err("no memory for network device instance\n"); 584 ath6kl_err("no memory for network device instance\n");