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

Commit 246dd992 authored by David Spinadel's avatar David Spinadel Committed by Johannes Berg
Browse files

iwlwifi: mvm: fix operator precedence



Integers need to be multiplied before division.

Signed-off-by: default avatarDavid Spinadel <david.spinadel@intel.com>
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 3f617281
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -151,7 +151,8 @@ static void iwl_mvm_adjust_quota_for_noa(struct iwl_mvm *mvm,
		if (id != phy_id)
			continue;

		quota *= (beacon_int - mvm->noa_duration) / beacon_int;
		quota *= (beacon_int - mvm->noa_duration);
		quota /= beacon_int;

		cmd->quotas[i].quota = cpu_to_le32(quota);
	}