Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8565f33 authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho
Browse files

iwlwifi: pcie: fix TVQM queue ID range check



The queue ID should never be 512 either, so correct the check
to be >= instead of just >.

Fixes: 310181ec ("iwlwifi: move to TVQM mode")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent aeb8012c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1076,7 +1076,7 @@ int iwl_trans_pcie_dyn_txq_alloc(struct iwl_trans *trans,
	rsp = (void *)hcmd.resp_pkt->data;
	qid = le16_to_cpu(rsp->queue_number);

	if (qid > ARRAY_SIZE(trans_pcie->txq)) {
	if (qid >= ARRAY_SIZE(trans_pcie->txq)) {
		WARN_ONCE(1, "queue index %d unsupported", qid);
		ret = -EIO;
		goto error_free_resp;