Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255394
b: refs/heads/master
c: 24f7580
h: refs/heads/master
v: v3
  • Loading branch information
Zefir Kurtisi authored and John W. Linville committed Jun 1, 2011
1 parent a5d0399 commit ed3d232
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 71063f0e8939b5b6ea5121faed47987e094ef018
refs/heads/master: 24f7580e852b5472b51eea322bb78454df0054b8
9 changes: 9 additions & 0 deletions trunk/net/mac80211/rc80211_minstrel.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,21 @@ minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
mp->hw = hw;
mp->update_interval = 100;

#ifdef CONFIG_MAC80211_DEBUGFS
mp->fixed_rate_idx = (u32) -1;
mp->dbg_fixed_rate = debugfs_create_u32("fixed_rate_idx",
S_IRUGO | S_IWUGO, debugfsdir, &mp->fixed_rate_idx);
#endif

return mp;
}

static void
minstrel_free(void *priv)
{
#ifdef CONFIG_MAC80211_DEBUGFS
debugfs_remove(((struct minstrel_priv *)priv)->dbg_fixed_rate);
#endif
kfree(priv);
}

Expand Down
12 changes: 12 additions & 0 deletions trunk/net/mac80211/rc80211_minstrel.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ struct minstrel_priv {
unsigned int update_interval;
unsigned int lookaround_rate;
unsigned int lookaround_rate_mrr;

#ifdef CONFIG_MAC80211_DEBUGFS
/*
* enable fixed rate processing per RC
* - write static index to debugfs:ieee80211/phyX/rc/fixed_rate_idx
* - write -1 to enable RC processing again
* - setting will be applied on next update
*/
u32 fixed_rate_idx;
struct dentry *dbg_fixed_rate;
#endif

};

struct minstrel_debugfs_info {
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/mac80211/rc80211_minstrel_ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,13 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,

info->flags |= mi->tx_flags;
sample_idx = minstrel_get_sample_rate(mp, mi);

#ifdef CONFIG_MAC80211_DEBUGFS
/* use fixed index if set */
if (mp->fixed_rate_idx != -1)
sample_idx = mp->fixed_rate_idx;
#endif

if (sample_idx >= 0) {
sample = true;
minstrel_ht_set_rate(mp, mi, &ar[0], sample_idx,
Expand Down

0 comments on commit ed3d232

Please sign in to comment.