iwlwifi: mvm: fix array out of bounds reference
authorAvraham Stern <avraham.stern@intel.com>
Mon, 5 Mar 2018 09:26:53 +0000 (11:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:17 +0000 (07:52 +0200)
commit3a297d091edbf61176f18842b27b07448dfcad67
treeafeec2fe58ab49a657afaf849d8bd875bee59b62
parent7867e6d82fc9c35e02ae407641f5603bdbcc1a6f
iwlwifi: mvm: fix array out of bounds reference

[ Upstream commit 4a6d2e525b43eba5870ea7e360f59aa65de00705 ]

When starting aggregation, the code checks the status of the queue
allocated to the aggregation tid, which might not yet be allocated
and thus the queue index may be invalid.
Fix this by reserving a new queue in case the queue id is invalid.

While at it, clean up some unreachable code (a condition that is
already handled earlier) and remove all the non-DQA comments since
non-DQA mode is no longer supported.

Fixes: cf961e16620f ("iwlwifi: mvm: support dqa-mode agg on non-shared queue")
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/mvm/sta.c