diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-04-19 11:29:06 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-06-23 00:13:00 +0300 |
commit | f8565f3329d62dab724b43db3f6ed60b608333fa (patch) | |
tree | 3674aacb7d8ef381d20ad9b45d9c65a586f49f2d | |
parent | aeb8012cdfb5dded160295c92e6bfdb6ae5e8aa1 (diff) | |
download | linux-f8565f3329d62dab724b43db3f6ed60b608333fa.tar.xz |
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: 310181ec34e2 ("iwlwifi: move to TVQM mode")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c index 6e186501f43c..8f00019cd3b4 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c @@ -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; |