aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
diff options
context:
space:
mode:
authorGregory Greenman <gregory.greenman@intel.com>2016-01-26 17:10:15 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2016-02-01 09:40:27 -0500
commit6ad6c01fa74f649722eeca7308dc1fc4e43235cd (patch)
tree6b64a24974666ee7cceaf327e4e217816b5c329a /drivers/net/wireless/intel/iwlwifi/mvm/rs.c
parent854c57057390e45041a56c3d3228eb805e980c99 (diff)
iwlwifi: mvm: rs: fix TPC action decision algorithm
Decreasing Tx power is allowed only when success ratio is above the threshold defined in the algorithm. Add this condition. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rs.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 7bb6fd0e4391..986e12ab9dc2 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -2040,7 +2040,8 @@ static enum tpc_action rs_get_tpc_action(struct iwl_mvm *mvm,
2040 } 2040 }
2041 2041
2042 /* try decreasing first if applicable */ 2042 /* try decreasing first if applicable */
2043 if (weak != TPC_INVALID) { 2043 if (sr >= RS_PERCENT(IWL_MVM_RS_TPC_SR_NO_INCREASE) &&
2044 weak != TPC_INVALID) {
2044 if (weak_tpt == IWL_INVALID_VALUE && 2045 if (weak_tpt == IWL_INVALID_VALUE &&
2045 (strong_tpt == IWL_INVALID_VALUE || 2046 (strong_tpt == IWL_INVALID_VALUE ||
2046 current_tpt >= strong_tpt)) { 2047 current_tpt >= strong_tpt)) {