提交 3d4060d5 编写于 作者: J Johannes Berg 提交者: Emmanuel Grumbach

iwlwifi: mvm: fix quota update avoidance

When not updating the quota, the new command shouldn't be stored
as otherwise slowly drifting quota would never update the firmware.
Fix this by storing the command only when it was also sent.

Since the error message also only makes sense when attempting to
send the command, just short-circuit the function when there's no
need to send the command.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
上级 4bfa47f3
无相关合并请求
...@@ -309,17 +309,16 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm, ...@@ -309,17 +309,16 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm,
"zero quota on binding %d\n", i); "zero quota on binding %d\n", i);
} }
if (send) { if (!send) {
err = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, 0,
sizeof(cmd), &cmd);
} else {
/* don't send a practically unchanged command, the firmware has /* don't send a practically unchanged command, the firmware has
* to re-initialize a lot of state and that can have an adverse * to re-initialize a lot of state and that can have an adverse
* impact on it * impact on it
*/ */
err = 0; return 0;
} }
err = iwl_mvm_send_cmd_pdu(mvm, TIME_QUOTA_CMD, 0, sizeof(cmd), &cmd);
if (err) if (err)
IWL_ERR(mvm, "Failed to send quota: %d\n", err); IWL_ERR(mvm, "Failed to send quota: %d\n", err);
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部