Search Linux Wireless

[PATCH] iwlwifi: set 'free_queue' to the loop variable, not a meaningless bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mark Asselstine <asselsm@xxxxxxxxx>

The loop variable 'i' is passed to iwl_mvm_remove_inactive_tids() as
the queue number to operate on. iwl_mvm_remove_inactive_tids()
operates on that queue number then returns true if the queue can be
reused, the returned bool is stored in 'ret'. We do not want to set
'free_queue' to the returned bool stored in 'ret' but rather the loop
variable, so we are actually operating on the right queue through the
rest of iwl_mvm_inactivity_check() and have it return a proper queue
number.

Signed-off-by: Mark Asselstine <asselsm@xxxxxxxxx>
---
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 9db2555518aa..2fcaf779649a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -1166,7 +1166,7 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta)
 						   &changetid_queues);
 		if (ret >= 0 && free_queue < 0) {
 			queue_owner = sta;
-			free_queue = ret;
+			free_queue = i;
 		}
 		/* only unlock sta lock - we still need the queue info lock */
 		spin_unlock_bh(&mvmsta->lock);
-- 
2.20.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux