iwlwifi: mvm: fix operator precedence
authorDavid Spinadel <david.spinadel@intel.com>
Thu, 17 Oct 2013 06:49:12 +0000 (09:49 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 18 Oct 2013 14:02:38 +0000 (16:02 +0200)
Integers need to be multiplied before division.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/mvm/quota.c

index 3fc986eb0d6c561cdd5911d31f8a66cfdbe57ca0..17e2bc827f9a3b20b7da9e0d7ee4dd43ac00606a 100644 (file)
@@ -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);
        }