Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291474
b: refs/heads/master
c: 068a463
h: refs/heads/master
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Mar 6, 2012
1 parent bd7aab9 commit 3a48893
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 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: 05e5bd0f3daddb0368a433af5b58be68c62dc365
refs/heads/master: 068a4633bf42501db3ec934beff07cd50c1b7e9d
9 changes: 5 additions & 4 deletions trunk/drivers/net/wireless/ath/ath6kl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ int ath6kl_core_init(struct ath6kl *ar)

set_bit(FIRST_BOOT, &ar->flag);

ath6kl_debug_init(ar);

ret = ath6kl_init_hw_start(ar);
if (ret) {
ath6kl_err("Failed to start hardware: %d\n", ret);
Expand All @@ -138,7 +140,7 @@ int ath6kl_core_init(struct ath6kl *ar)
if (ret)
goto err_rxbuf_cleanup;

ret = ath6kl_debug_init(ar);
ret = ath6kl_debug_init_fs(ar);
if (ret) {
wiphy_unregister(ar->wiphy);
goto err_rxbuf_cleanup;
Expand All @@ -159,17 +161,16 @@ int ath6kl_core_init(struct ath6kl *ar)
ath6kl_err("Failed to instantiate a network device\n");
ret = -ENOMEM;
wiphy_unregister(ar->wiphy);
goto err_debug_init;
goto err_rxbuf_cleanup;
}

ath6kl_dbg(ATH6KL_DBG_TRC, "%s: name=%s dev=0x%p, ar=0x%p\n",
__func__, ndev->name, ndev, ar);

return ret;

err_debug_init:
ath6kl_debug_cleanup(ar);
err_rxbuf_cleanup:
ath6kl_debug_cleanup(ar);
ath6kl_htc_flush_rx_buf(ar->htc_target);
ath6kl_cleanup_amsdu_rxbufs(ar);
ath6kl_wmi_shutdown(ar->wmi);
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ static const struct file_operations fops_power_params = {
.llseek = default_llseek,
};

int ath6kl_debug_init(struct ath6kl *ar)
void ath6kl_debug_init(struct ath6kl *ar)
{
skb_queue_head_init(&ar->debug.fwlog_queue);
init_completion(&ar->debug.fwlog_completion);
Expand All @@ -1732,7 +1732,15 @@ int ath6kl_debug_init(struct ath6kl *ar)
* value from the firmware.
*/
ar->debug.fwlog_mask = 0;
}

/*
* Initialisation needs to happen in two stages as fwlog events can come
* before cfg80211 is initialised, and debugfs depends on cfg80211
* initialisation.
*/
int ath6kl_debug_init_fs(struct ath6kl *ar)
{
ar->debugfs_phy = debugfs_create_dir("ath6kl",
ar->wiphy->debugfsdir);
if (!ar->debugfs_phy)
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/net/wireless/ath/ath6kl/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ int ath6kl_debug_roam_tbl_event(struct ath6kl *ar, const void *buf,
size_t len);
void ath6kl_debug_set_keepalive(struct ath6kl *ar, u8 keepalive);
void ath6kl_debug_set_disconnect_timeout(struct ath6kl *ar, u8 timeout);
int ath6kl_debug_init(struct ath6kl *ar);
void ath6kl_debug_init(struct ath6kl *ar);
int ath6kl_debug_init_fs(struct ath6kl *ar);
void ath6kl_debug_cleanup(struct ath6kl *ar);

#else
Expand Down Expand Up @@ -128,7 +129,11 @@ static inline void ath6kl_debug_set_disconnect_timeout(struct ath6kl *ar,
{
}

static inline int ath6kl_debug_init(struct ath6kl *ar)
static inline void ath6kl_debug_init(struct ath6kl *ar)
{
}

static inline int ath6kl_debug_init_fs(struct ath6kl *ar)
{
return 0;
}
Expand Down

0 comments on commit 3a48893

Please sign in to comment.