The expected throughput table used when estimating a new column
depends on the channel bandwidth. When switching from legacy to
siso or mimo the wrong expected throughput table was used as it
was chosen based on the the channel bandwidth in legacy which is
always 20Mhz. Instead it should be chosen based on the current sta
bandwidth which could be also 40Mhz or 80Mhz.
When enabling MCS9 this bug leads to a problem where the max
expected throughput of the siso or mimo column is 0 as MCS9 isn't
supported in 20Mhz. This in turns prevents switching to siso or mimo.
Fix this by using the sta bandwidth when deciding which table to choose.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
tpt = lq_sta->last_tpt / 100;
expected_tpt_tbl = rs_get_expected_tpt_table(lq_sta, next_col,
- tbl->rate.bw);
+ rs_bw_from_sta_bw(sta));
if (WARN_ON_ONCE(!expected_tpt_tbl))
continue;