aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel_ht.c
diff options
context:
space:
mode:
authorKarl Beldan <karl.beldan@rivierawaves.com>2014-10-20 09:45:59 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-10-20 15:39:35 -0400
commitd4d141cae804a430054f4138fa177229114f203a (patch)
tree1828efa7c0fdd3fa3a7e697b885ce71ed81b08af /net/mac80211/rc80211_minstrel_ht.c
parent8fa74e3aa6398ffef3c52147c969c0f5f0a1244e (diff)
mac80211: minstrel_ht: Increase the range of handled rate indexes
Since 5935839ad735 ("mac80211: improve minstrel_ht rate sorting by throughput & probability"), the rate indexes are manipulated via u8's and hence allow for a maximum of 256 mcs_group entries in minstrel_mcs_groups. ATM, minstrel_ht advertizes support up to 3HTSS@40MHz, consuming: 8(MCS_GROUP_RATES) * (3(SS)*2(GI)*2(BW)+1(CCK)), i.e. 104 entries. Support for 3VHTSS@80MHz will require: 10(MCS_GROUP_RATES) * (3(SS)*2(GI)*2(BW)+1(CCK)) + 10(MCS_GROUP_RATES) * (3(SS)*2(GI)*3(BW)), i.e. 130 + 180 entries. This change moves from u8s to u16s where necessary. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht.c')
-rw-r--r--net/mac80211/rc80211_minstrel_ht.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 17ef54a7a492..ccec718c29f9 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -240,8 +240,8 @@ minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate)
240 * MCS groups, CCK rates do not provide aggregation and are therefore at last. 240 * MCS groups, CCK rates do not provide aggregation and are therefore at last.
241 */ 241 */
242static void 242static void
243minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u8 index, 243minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u16 index,
244 u8 *tp_list) 244 u16 *tp_list)
245{ 245{
246 int cur_group, cur_idx, cur_thr, cur_prob; 246 int cur_group, cur_idx, cur_thr, cur_prob;
247 int tmp_group, tmp_idx, tmp_thr, tmp_prob; 247 int tmp_group, tmp_idx, tmp_thr, tmp_prob;
@@ -278,7 +278,7 @@ minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u8 index,
278 * Find and set the topmost probability rate per sta and per group 278 * Find and set the topmost probability rate per sta and per group
279 */ 279 */
280static void 280static void
281minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u8 index) 281minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u16 index)
282{ 282{
283 struct minstrel_mcs_group_data *mg; 283 struct minstrel_mcs_group_data *mg;
284 struct minstrel_rate_stats *mr; 284 struct minstrel_rate_stats *mr;
@@ -321,8 +321,8 @@ minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u8 index)
321 */ 321 */
322static void 322static void
323minstrel_ht_assign_best_tp_rates(struct minstrel_ht_sta *mi, 323minstrel_ht_assign_best_tp_rates(struct minstrel_ht_sta *mi,
324 u8 tmp_mcs_tp_rate[MAX_THR_RATES], 324 u16 tmp_mcs_tp_rate[MAX_THR_RATES],
325 u8 tmp_cck_tp_rate[MAX_THR_RATES]) 325 u16 tmp_cck_tp_rate[MAX_THR_RATES])
326{ 326{
327 unsigned int tmp_group, tmp_idx, tmp_cck_tp, tmp_mcs_tp; 327 unsigned int tmp_group, tmp_idx, tmp_cck_tp, tmp_mcs_tp;
328 int i; 328 int i;
@@ -386,8 +386,8 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
386 struct minstrel_mcs_group_data *mg; 386 struct minstrel_mcs_group_data *mg;
387 struct minstrel_rate_stats *mr; 387 struct minstrel_rate_stats *mr;
388 int group, i, j; 388 int group, i, j;
389 u8 tmp_mcs_tp_rate[MAX_THR_RATES], tmp_group_tp_rate[MAX_THR_RATES]; 389 u16 tmp_mcs_tp_rate[MAX_THR_RATES], tmp_group_tp_rate[MAX_THR_RATES];
390 u8 tmp_cck_tp_rate[MAX_THR_RATES], index; 390 u16 tmp_cck_tp_rate[MAX_THR_RATES], index;
391 391
392 if (mi->ampdu_packets > 0) { 392 if (mi->ampdu_packets > 0) {
393 mi->avg_ampdu_len = minstrel_ewma(mi->avg_ampdu_len, 393 mi->avg_ampdu_len = minstrel_ewma(mi->avg_ampdu_len,
@@ -517,7 +517,7 @@ minstrel_next_sample_idx(struct minstrel_ht_sta *mi)
517} 517}
518 518
519static void 519static void
520minstrel_downgrade_rate(struct minstrel_ht_sta *mi, u8 *idx, bool primary) 520minstrel_downgrade_rate(struct minstrel_ht_sta *mi, u16 *idx, bool primary)
521{ 521{
522 int group, orig_group; 522 int group, orig_group;
523 523