From 246dd9922e859768aa522daa6c1c601785e57e0c Mon Sep 17 00:00:00 2001 From: David Spinadel Date: Thu, 17 Oct 2013 09:49:12 +0300 Subject: [PATCH] iwlwifi: mvm: fix operator precedence Integers need to be multiplied before division. Signed-off-by: David Spinadel Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- drivers/net/wireless/iwlwifi/mvm/quota.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/quota.c b/drivers/net/wireless/iwlwifi/mvm/quota.c index 3fc986eb0d6c..17e2bc827f9a 100644 --- a/drivers/net/wireless/iwlwifi/mvm/quota.c +++ b/drivers/net/wireless/iwlwifi/mvm/quota.c @@ -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); } -- 2.20.1