diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-01-15 13:02:35 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2021-01-22 09:11:37 +0100 |
commit | a7844a53846017c34804b0a22bbda855cb08dd7c (patch) | |
tree | da0e2504bd298d7b55f3294dc1ec8badf0ea4537 /net/mac80211/rc80211_minstrel_ht.h | |
parent | f84de063985a6f8e3adb0c0b409ca51452b4def0 (diff) |
mac80211: minstrel_ht: add support for OFDM rates on non-HT clients
The legacy minstrel code is essentially unmaintained and receives only very
little testing. In order to bring the significant algorithm improvements from
minstrel_ht to legacy clients, this patch adds support for OFDM rates to
minstrel_ht and removes the fallback to the legacy codepath.
This also makes it work much better on hardware with rate selection constraints,
e.g. mt76.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20210115120242.89616-3-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht.h')
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.h b/net/mac80211/rc80211_minstrel_ht.h index 11300fa48a2f..3321630ebeea 100644 --- a/net/mac80211/rc80211_minstrel_ht.h +++ b/net/mac80211/rc80211_minstrel_ht.h @@ -18,14 +18,15 @@ MINSTREL_HT_STREAM_GROUPS) #define MINSTREL_VHT_GROUPS_NB (MINSTREL_MAX_STREAMS * \ MINSTREL_VHT_STREAM_GROUPS) -#define MINSTREL_CCK_GROUPS_NB 1 +#define MINSTREL_LEGACY_GROUPS_NB 2 #define MINSTREL_GROUPS_NB (MINSTREL_HT_GROUPS_NB + \ MINSTREL_VHT_GROUPS_NB + \ - MINSTREL_CCK_GROUPS_NB) + MINSTREL_LEGACY_GROUPS_NB) #define MINSTREL_HT_GROUP_0 0 #define MINSTREL_CCK_GROUP (MINSTREL_HT_GROUP_0 + MINSTREL_HT_GROUPS_NB) -#define MINSTREL_VHT_GROUP_0 (MINSTREL_CCK_GROUP + 1) +#define MINSTREL_OFDM_GROUP (MINSTREL_CCK_GROUP + 1) +#define MINSTREL_VHT_GROUP_0 (MINSTREL_OFDM_GROUP + 1) #define MCS_GROUP_RATES 10 @@ -37,6 +38,8 @@ struct mcs_group { u16 duration[MCS_GROUP_RATES]; }; +extern const s16 minstrel_cck_bitrates[4]; +extern const s16 minstrel_ofdm_bitrates[8]; extern const struct mcs_group minstrel_mcs_groups[]; struct minstrel_mcs_group_data { @@ -99,6 +102,8 @@ struct minstrel_ht_sta { /* current MCS group to be sampled */ u8 sample_group; + u8 band; + /* Bitfield of supported MCS rates of all groups */ u16 supported[MINSTREL_GROUPS_NB]; @@ -107,13 +112,9 @@ struct minstrel_ht_sta { }; struct minstrel_ht_sta_priv { - union { - struct minstrel_ht_sta ht; - struct minstrel_sta_info legacy; - }; + struct minstrel_ht_sta ht; void *ratelist; void *sample_table; - bool is_ht; }; void minstrel_ht_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir); |