Skip to content

Commit

Permalink
iwlwifi: mvm: rs: fix TPC action decision algorithm
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gregory Greenman authored and Emmanuel Grumbach committed Feb 1, 2016
1 parent 854c570 commit 6ad6c01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 6ad6c01

Please sign in to comment.