From: David Spinadel Date: Thu, 17 Oct 2013 06:49:12 +0000 (+0300) Subject: iwlwifi: mvm: fix operator precedence X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=246dd9922e859768aa522daa6c1c601785e57e0c;p=linux-beck.git 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 --- 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); }