]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: limit maximum queue appropriately
authorJohannes Berg <johannes.berg@intel.com>
Fri, 17 Apr 2020 07:08:12 +0000 (10:08 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Apr 2020 12:39:03 +0000 (15:39 +0300)
commitd101e0676c7121132aa4a4316b130676b7d57d66
tree1cf2a7ea750367966c7a07ef30fa49c26630cb35
parent3c728662d29c61d69ccea373c828b1e098217fde
iwlwifi: mvm: limit maximum queue appropriately

Due to some hardware issues, queue 31 isn't usable on devices that have
32 queues (7000, 8000, 9000 families), which is correctly reflected in
the configuration and TX queue initialization.

However, the firmware API and queue allocation code assumes that there
are 32 queues, and if something actually attempts to use #31 this leads
to a NULL-pointer dereference since it's not allocated.

Fix this by limiting to 31 in the IWL_MVM_DQA_MAX_DATA_QUEUE, and also
add some code to catch this earlier in the future, if the configuration
changes perhaps.

Cc: stable@vger.kernel.org # v4.9+
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20200417100405.98a79be2db6a.I3a4af6b03b87a6bc18db9b1ff9a812f397bee1fc@changeid
drivers/net/wireless/intel/iwlwifi/fw/api/txq.h
drivers/net/wireless/intel/iwlwifi/mvm/sta.c