mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 14:48:06 +00:00
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>
This commit is contained in:
parent
f7a7e7ae5d
commit
d999ba3e21
4 changed files with 22 additions and 1 deletions
|
@ -467,6 +467,7 @@ struct ath6kl {
|
||||||
struct workqueue_struct *ath6kl_wq;
|
struct workqueue_struct *ath6kl_wq;
|
||||||
|
|
||||||
struct ath6kl_node_table scan_table;
|
struct ath6kl_node_table scan_table;
|
||||||
|
struct dentry *debugfs_phy;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void *ath6kl_priv(struct net_device *dev)
|
static inline void *ath6kl_priv(struct net_device *dev)
|
||||||
|
|
|
@ -147,4 +147,14 @@ void dump_cred_dist_stats(struct htc_target *target)
|
||||||
target->cred_dist_cntxt->cur_free_credits);
|
target->cred_dist_cntxt->cur_free_credits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ath6kl_debug_init(struct ath6kl *ar)
|
||||||
|
{
|
||||||
|
ar->debugfs_phy = debugfs_create_dir("ath6kl",
|
||||||
|
ar->wdev->wiphy->debugfsdir);
|
||||||
|
if (!ar->debugfs_phy)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
/* TODO: Create debugfs file entries for various target/host stats */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -78,6 +78,7 @@ void ath6kl_dump_registers(struct ath6kl_device *dev,
|
||||||
struct ath6kl_irq_proc_registers *irq_proc_reg,
|
struct ath6kl_irq_proc_registers *irq_proc_reg,
|
||||||
struct ath6kl_irq_enable_reg *irq_en_reg);
|
struct ath6kl_irq_enable_reg *irq_en_reg);
|
||||||
void dump_cred_dist_stats(struct htc_target *target);
|
void dump_cred_dist_stats(struct htc_target *target);
|
||||||
|
int ath6kl_debug_init(struct ath6kl *ar);
|
||||||
#else
|
#else
|
||||||
static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
|
static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
|
@ -100,6 +101,9 @@ static inline void ath6kl_dump_registers(struct ath6kl_device *dev,
|
||||||
static inline void dump_cred_dist_stats(struct htc_target *target)
|
static inline void dump_cred_dist_stats(struct htc_target *target)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
static inline int ath6kl_debug_init(struct ath6kl *ar)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -573,6 +573,12 @@ struct ath6kl *ath6kl_core_alloc(struct device *sdev)
|
||||||
ar->wdev = wdev;
|
ar->wdev = wdev;
|
||||||
wdev->iftype = NL80211_IFTYPE_STATION;
|
wdev->iftype = NL80211_IFTYPE_STATION;
|
||||||
|
|
||||||
|
if (ath6kl_debug_init(ar)) {
|
||||||
|
ath6kl_err("Failed to initialize debugfs\n");
|
||||||
|
ath6kl_cfg80211_deinit(ar);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
dev = alloc_netdev(0, "wlan%d", ether_setup);
|
dev = alloc_netdev(0, "wlan%d", ether_setup);
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
ath6kl_err("no memory for network device instance\n");
|
ath6kl_err("no memory for network device instance\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue