]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commite5b72e3bc4763152e24bf4b8333bae21cc526c56
tree1cf2a7ea750367966c7a07ef30fa49c26630cb35
parentd8d663970234fe885f29edf4f06394d0928c89f4
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