diff options
author | Gregory Greenman <gregory.greenman@intel.com> | 2016-01-27 01:10:15 +0300 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2016-02-01 17:40:27 +0300 |
commit | 6ad6c01fa74f649722eeca7308dc1fc4e43235cd (patch) | |
tree | 6b64a24974666ee7cceaf327e4e217816b5c329a /drivers | |
parent | 854c57057390e45041a56c3d3228eb805e980c99 (diff) | |
download | linux-6ad6c01fa74f649722eeca7308dc1fc4e43235cd.tar.xz |
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')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 3 |
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, } /* try decreasing first if applicable */ - if (weak != TPC_INVALID) { + if (sr >= RS_PERCENT(IWL_MVM_RS_TPC_SR_NO_INCREASE) && + weak != TPC_INVALID) { if (weak_tpt == IWL_INVALID_VALUE && (strong_tpt == IWL_INVALID_VALUE || current_tpt >= strong_tpt)) { |