diff options
author | Zefir Kurtisi <zefir.kurtisi@neratec.com> | 2011-05-20 20:29:17 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-01 15:12:29 -0400 |
commit | 24f7580e852b5472b51eea322bb78454df0054b8 (patch) | |
tree | 46848e37d9a034e60ab6bb0c5dd08ba781e99951 /net/mac80211/rc80211_minstrel_ht.c | |
parent | 71063f0e8939b5b6ea5121faed47987e094ef018 (diff) |
minstrel_ht: fixed rate mode through debugfs
Found several threads about fixed rate mode in minstrel_ht for test
environments, but no patches for it.
This patch provides such a mode through debugfs.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht.c')
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 333b5118be6..66a1eeb279c 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -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, |