iwlwifi: mvm: rs: choose correct expected tpt table
authorEyal Shapira <eyal@wizery.com>
Wed, 30 Apr 2014 22:28:48 +0000 (01:28 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 6 May 2014 17:39:59 +0000 (20:39 +0300)
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>
drivers/net/wireless/iwlwifi/mvm/rs.c

index 6216618c28d38d070bc53ef5910c113ba1c06773..6d5af48be70d6b1d710b734661133c9b586a246a 100644 (file)
@@ -1553,7 +1553,7 @@ static enum rs_column rs_get_next_column(struct iwl_mvm *mvm,
 
                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;