Skip to content

Commit e6d419f

Browse files
jmberg-intelKalle Valo
authored andcommitted
iwlwifi: mvm: fix inactive TID removal return value usage
The function iwl_mvm_remove_inactive_tids() returns bool, so we should just check "if (ret)", not "if (ret >= 0)" (which would do nothing useful here). We obviously therefore cannot use the return value of the function for the free_queue, we need to use the queue (i) we're currently dealing with instead. Cc: [email protected] # v5.4+ Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20200417100405.9d862ed72535.I9e27ccc3ee3c8855fc13682592b571581925dfbd@changeid
1 parent 38af8d5 commit e6d419f

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-2
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/sta.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,9 +1169,9 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta)
11691169
inactive_tid_bitmap,
11701170
&unshare_queues,
11711171
&changetid_queues);
1172-
if (ret >= 0 && free_queue < 0) {
1172+
if (ret && free_queue < 0) {
11731173
queue_owner = sta;
1174-
free_queue = ret;
1174+
free_queue = i;
11751175
}
11761176
/* only unlock sta lock - we still need the queue info lock */
11771177
spin_unlock_bh(&mvmsta->lock);

0 commit comments

Comments
 (0)