Skip to content

Commit

Permalink
iwlwifi: mvm: fix operator precedence
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Spinadel authored and Johannes Berg committed Oct 18, 2013
1 parent 3f61728 commit 246dd99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/iwlwifi/mvm/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 246dd99

Please sign in to comment.