aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/quota.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-05-23 10:13:57 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-07-07 14:41:15 -0400
commit99a1230d9d1cb5d52bb37b8c03f3931502f0e44d (patch)
tree0f10a21f838ebca861bb8d89c0b3029a813c3482 /drivers/net/wireless/iwlwifi/mvm/quota.c
parent63faceb60b8e026d62db228ff04038e8089fa74a (diff)
iwlwifi: mvm: validate that we don't send zero quota
The firmware currently deals with zero quota for a given binding, but it seems odd to send that down. Make sure that we don't do that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/quota.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/quota.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/quota.c b/drivers/net/wireless/iwlwifi/mvm/quota.c
index 8bb2fced0811..3f18786311f4 100644
--- a/drivers/net/wireless/iwlwifi/mvm/quota.c
+++ b/drivers/net/wireless/iwlwifi/mvm/quota.c
@@ -297,6 +297,14 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
297 297
298 iwl_mvm_adjust_quota_for_noa(mvm, &cmd); 298 iwl_mvm_adjust_quota_for_noa(mvm, &cmd);
299 299
300 /* check that we have non-zero quota for all valid bindings */
301 for (i = 0; i < MAX_BINDINGS; i++) {
302 if (cmd.quotas[i].id_and_color == cpu_to_le32(FW_CTXT_INVALID))
303 continue;
304 WARN_ONCE(cmd.quotas[i].quota == 0,
305 "zero quota on binding %d\n", i);
306 }
307
300 ret = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, 0, 308 ret = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, 0,
301 sizeof(cmd), &cmd); 309 sizeof(cmd), &cmd);
302 if (ret) 310 if (ret)