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: 310181ec34 ("iwlwifi: move to TVQM mode")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
Johannes Berg 2017-04-19 10:29:06 +02:00 committed by Luca Coelho
parent aeb8012cdf
commit f8565f3329
1 changed files with 1 additions and 1 deletions

View File

@ -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;