Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266547
b: refs/heads/master
c: d999ba3
h: refs/heads/master
i:
  266545: a292a3e
  266543: b7322a6
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Aug 31, 2011
1 parent a004187 commit 51d1784
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7a7e7ae5db1d436805de7fe19c51b5b2657c63e
refs/heads/master: d999ba3e21dc1c84cac9caf68db78fd6dbde7817
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ struct ath6kl {
struct workqueue_struct *ath6kl_wq;

struct ath6kl_node_table scan_table;
struct dentry *debugfs_phy;
};

static inline void *ath6kl_priv(struct net_device *dev)
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,14 @@ void dump_cred_dist_stats(struct htc_target *target)
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
6 changes: 5 additions & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ void ath6kl_dump_registers(struct ath6kl_device *dev,
struct ath6kl_irq_proc_registers *irq_proc_reg,
struct ath6kl_irq_enable_reg *irq_en_reg);
void dump_cred_dist_stats(struct htc_target *target);
int ath6kl_debug_init(struct ath6kl *ar);
#else
static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask,
const char *fmt, ...)
Expand All @@ -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 int ath6kl_debug_init(struct ath6kl *ar)
{
return 0;
}
#endif

#endif
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,12 @@ struct ath6kl *ath6kl_core_alloc(struct device *sdev)
ar->wdev = wdev;
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);
if (!dev) {
ath6kl_err("no memory for network device instance\n");
Expand Down

0 comments on commit 51d1784

Please sign in to comment.