mac80211: minstrel: remove unnecessary debugfs cleanup code
debugfs entries are cleaned up by debugfs_remove_recursive already. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
f458e832ba
commit
5b5e87314e
|
@ -689,8 +689,8 @@ minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
|
||||||
|
|
||||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||||
mp->fixed_rate_idx = (u32) -1;
|
mp->fixed_rate_idx = (u32) -1;
|
||||||
mp->dbg_fixed_rate = debugfs_create_u32("fixed_rate_idx",
|
debugfs_create_u32("fixed_rate_idx", 0666, debugfsdir,
|
||||||
0666, debugfsdir, &mp->fixed_rate_idx);
|
&mp->fixed_rate_idx);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
minstrel_init_cck_rates(mp);
|
minstrel_init_cck_rates(mp);
|
||||||
|
@ -701,9 +701,6 @@ minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
|
||||||
static void
|
static void
|
||||||
minstrel_free(void *priv)
|
minstrel_free(void *priv)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
|
||||||
debugfs_remove(((struct minstrel_priv *)priv)->dbg_fixed_rate);
|
|
||||||
#endif
|
|
||||||
kfree(priv);
|
kfree(priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,7 +732,6 @@ const struct rate_control_ops mac80211_minstrel = {
|
||||||
.free_sta = minstrel_free_sta,
|
.free_sta = minstrel_free_sta,
|
||||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||||
.add_sta_debugfs = minstrel_add_sta_debugfs,
|
.add_sta_debugfs = minstrel_add_sta_debugfs,
|
||||||
.remove_sta_debugfs = minstrel_remove_sta_debugfs,
|
|
||||||
#endif
|
#endif
|
||||||
.get_expected_throughput = minstrel_get_expected_throughput,
|
.get_expected_throughput = minstrel_get_expected_throughput,
|
||||||
};
|
};
|
||||||
|
|
|
@ -109,11 +109,6 @@ struct minstrel_sta_info {
|
||||||
|
|
||||||
/* sampling table */
|
/* sampling table */
|
||||||
u8 *sample_table;
|
u8 *sample_table;
|
||||||
|
|
||||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
|
||||||
struct dentry *dbg_stats;
|
|
||||||
struct dentry *dbg_stats_csv;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct minstrel_priv {
|
struct minstrel_priv {
|
||||||
|
@ -137,7 +132,6 @@ struct minstrel_priv {
|
||||||
* - setting will be applied on next update
|
* - setting will be applied on next update
|
||||||
*/
|
*/
|
||||||
u32 fixed_rate_idx;
|
u32 fixed_rate_idx;
|
||||||
struct dentry *dbg_fixed_rate;
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -156,7 +150,6 @@ minstrel_get_ewmsd10(struct minstrel_rate_stats *mrs)
|
||||||
|
|
||||||
extern const struct rate_control_ops mac80211_minstrel;
|
extern const struct rate_control_ops mac80211_minstrel;
|
||||||
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
||||||
void minstrel_remove_sta_debugfs(void *priv, void *priv_sta);
|
|
||||||
|
|
||||||
/* Recalculate success probabilities and counters for a given rate using EWMA */
|
/* Recalculate success probabilities and counters for a given rate using EWMA */
|
||||||
void minstrel_calc_rate_stats(struct minstrel_rate_stats *mrs);
|
void minstrel_calc_rate_stats(struct minstrel_rate_stats *mrs);
|
||||||
|
|
|
@ -214,19 +214,7 @@ minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir)
|
||||||
{
|
{
|
||||||
struct minstrel_sta_info *mi = priv_sta;
|
struct minstrel_sta_info *mi = priv_sta;
|
||||||
|
|
||||||
mi->dbg_stats = debugfs_create_file("rc_stats", 0444, dir, mi,
|
debugfs_create_file("rc_stats", 0444, dir, mi, &minstrel_stat_fops);
|
||||||
&minstrel_stat_fops);
|
debugfs_create_file("rc_stats_csv", 0444, dir, mi,
|
||||||
|
|
||||||
mi->dbg_stats_csv = debugfs_create_file("rc_stats_csv", 0444, dir, mi,
|
|
||||||
&minstrel_stat_csv_fops);
|
&minstrel_stat_csv_fops);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
minstrel_remove_sta_debugfs(void *priv, void *priv_sta)
|
|
||||||
{
|
|
||||||
struct minstrel_sta_info *mi = priv_sta;
|
|
||||||
|
|
||||||
debugfs_remove(mi->dbg_stats);
|
|
||||||
|
|
||||||
debugfs_remove(mi->dbg_stats_csv);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1391,7 +1391,6 @@ static const struct rate_control_ops mac80211_minstrel_ht = {
|
||||||
.free = minstrel_ht_free,
|
.free = minstrel_ht_free,
|
||||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||||
.add_sta_debugfs = minstrel_ht_add_sta_debugfs,
|
.add_sta_debugfs = minstrel_ht_add_sta_debugfs,
|
||||||
.remove_sta_debugfs = minstrel_ht_remove_sta_debugfs,
|
|
||||||
#endif
|
#endif
|
||||||
.get_expected_throughput = minstrel_ht_get_expected_throughput,
|
.get_expected_throughput = minstrel_ht_get_expected_throughput,
|
||||||
};
|
};
|
||||||
|
|
|
@ -110,17 +110,12 @@ struct minstrel_ht_sta_priv {
|
||||||
struct minstrel_ht_sta ht;
|
struct minstrel_ht_sta ht;
|
||||||
struct minstrel_sta_info legacy;
|
struct minstrel_sta_info legacy;
|
||||||
};
|
};
|
||||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
|
||||||
struct dentry *dbg_stats;
|
|
||||||
struct dentry *dbg_stats_csv;
|
|
||||||
#endif
|
|
||||||
void *ratelist;
|
void *ratelist;
|
||||||
void *sample_table;
|
void *sample_table;
|
||||||
bool is_ht;
|
bool is_ht;
|
||||||
};
|
};
|
||||||
|
|
||||||
void minstrel_ht_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
void minstrel_ht_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
||||||
void minstrel_ht_remove_sta_debugfs(void *priv, void *priv_sta);
|
|
||||||
int minstrel_ht_get_tp_avg(struct minstrel_ht_sta *mi, int group, int rate,
|
int minstrel_ht_get_tp_avg(struct minstrel_ht_sta *mi, int group, int rate,
|
||||||
int prob_ewma);
|
int prob_ewma);
|
||||||
|
|
||||||
|
|
|
@ -303,17 +303,8 @@ minstrel_ht_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir)
|
||||||
{
|
{
|
||||||
struct minstrel_ht_sta_priv *msp = priv_sta;
|
struct minstrel_ht_sta_priv *msp = priv_sta;
|
||||||
|
|
||||||
msp->dbg_stats = debugfs_create_file("rc_stats", 0444, dir, msp,
|
debugfs_create_file("rc_stats", 0444, dir, msp,
|
||||||
&minstrel_ht_stat_fops);
|
&minstrel_ht_stat_fops);
|
||||||
msp->dbg_stats_csv = debugfs_create_file("rc_stats_csv", 0444, dir, msp,
|
debugfs_create_file("rc_stats_csv", 0444, dir, msp,
|
||||||
&minstrel_ht_stat_csv_fops);
|
&minstrel_ht_stat_csv_fops);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
minstrel_ht_remove_sta_debugfs(void *priv, void *priv_sta)
|
|
||||||
{
|
|
||||||
struct minstrel_ht_sta_priv *msp = priv_sta;
|
|
||||||
|
|
||||||
debugfs_remove(msp->dbg_stats);
|
|
||||||
debugfs_remove(msp->dbg_stats_csv);
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue