diff options
author | David Spinadel <david.spinadel@intel.com> | 2013-10-17 10:49:12 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-18 18:02:38 +0400 |
commit | 246dd9922e859768aa522daa6c1c601785e57e0c (patch) | |
tree | f9ee27959f71ba0e32982682e3a9ad33ad86246e /drivers | |
parent | 3f617281a64b8a9c1c9f9fb76ea6bc642e1a1b01 (diff) | |
download | linux-246dd9922e859768aa522daa6c1c601785e57e0c.tar.xz |
iwlwifi: mvm: fix operator precedence
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/quota.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |