Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ad6c01f authored by Gregory Greenman's avatar Gregory Greenman Committed by Emmanuel Grumbach
Browse files

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: default avatarGregory Greenman <gregory.greenman@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 854c5705
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)) {