Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341560
b: refs/heads/master
c: 1c11e10
h: refs/heads/master
v: v3
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Nov 21, 2012
1 parent ae5d0c6 commit e81a8ed
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 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: c0b74876ee4873dc89d80b59f5e890a1d0a87be1
refs/heads/master: 1c11e10b6a64f14427be518ccc2a242b73fc3d9f
17 changes: 13 additions & 4 deletions trunk/drivers/net/wireless/ath/ath9k/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
}
}

#ifdef CONFIG_ATH9K_DEBUGFS
#if defined(CONFIG_MAC80211_DEBUGFS) && defined(CONFIG_ATH9K_DEBUGFS)

static ssize_t read_file_rcstat(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
Expand Down Expand Up @@ -1428,10 +1428,17 @@ static void ath_rate_add_sta_debugfs(void *priv, void *priv_sta,
struct dentry *dir)
{
struct ath_rate_priv *rc = priv_sta;
debugfs_create_file("rc_stats", S_IRUGO, dir, rc, &fops_rcstat);
rc->debugfs_rcstats = debugfs_create_file("rc_stats", S_IRUGO,
dir, rc, &fops_rcstat);
}

#endif /* CONFIG_ATH9K_DEBUGFS */
static void ath_rate_remove_sta_debugfs(void *priv, void *priv_sta)
{
struct ath_rate_priv *rc = priv_sta;
debugfs_remove(rc->debugfs_rcstats);
}

#endif /* CONFIG_MAC80211_DEBUGFS && CONFIG_ATH9K_DEBUGFS */

static void *ath_rate_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
{
Expand Down Expand Up @@ -1476,8 +1483,10 @@ static struct rate_control_ops ath_rate_ops = {
.free = ath_rate_free,
.alloc_sta = ath_rate_alloc_sta,
.free_sta = ath_rate_free_sta,
#ifdef CONFIG_ATH9K_DEBUGFS

#if defined(CONFIG_MAC80211_DEBUGFS) && defined(CONFIG_ATH9K_DEBUGFS)
.add_sta_debugfs = ath_rate_add_sta_debugfs,
.remove_sta_debugfs = ath_rate_remove_sta_debugfs,
#endif
};

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/rc.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ struct ath_rate_priv {
struct ath_rateset neg_ht_rates;
const struct ath_rate_table *rate_table;

#if defined(CONFIG_MAC80211_DEBUGFS) && defined(CONFIG_ATH9K_DEBUGFS)
struct dentry *debugfs_rcstats;
#endif
struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
};

Expand Down

0 comments on commit e81a8ed

Please sign in to comment.