Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp233978ybb; Fri, 3 Apr 2020 01:31:29 -0700 (PDT) X-Google-Smtp-Source: APiQypLIC11vttW2T04DVu4ZeuImjcqbwy6pzdmNpu9SEvhApPgHmWEogyoHWMzy0f1+ihUToUqK X-Received: by 2002:a05:6808:4e:: with SMTP id v14mr2251093oic.70.1585902689381; Fri, 03 Apr 2020 01:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585902689; cv=none; d=google.com; s=arc-20160816; b=gMpdRJrxZBkzbuuBfiwkfkr2AdCK7fWekYEVRFK4UFowwTy/9l1DA9ouaO6pXnnrqk iMh53zbNXVOJBqyuH1HaJ+GShuTJopaG9j4amh1ErRskLfQierqn/09yb4qv+9tdnITq yejfJHwYC8RIw6MMVkov4voObSpH6iSayCtxAnvsmgBT25EqM4DkihuC7bxzvHlEB/h7 zXHBZuMYl+6uhAtrO50Tpto1LBZbPVtYr260u7yM7A73FDmGLcAXjXI/TkjNPjzNbCvh bs6LhVUb4KvlCNeWshSF+S521TP2uwhDfMQA/1caUE4RU0SDm37+2ruH4ypRuOWnHvdt +Bog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=dcaPJlkT3B064ApTqbWIar067pGTDkz/4gcZUkZ+W4A=; b=Nbz7GIH3lU288BUYWK112iAEoP1lH/FtaWPstoP2MDi+wlziyM5R4h6oHlLdfTTBUt V/YO/zg/rLiV7t5F87NyfgnXRJKJJftUKVecc2tFxocmbGFuGaSeJX9cD6YqdyBZkm6d tF7aUWPTEzIU87hNrgOxkRErcI1mJ6qeDtfmd0dgoIvKsYFTD8Kkd7cNfjIjmleHc/kd th2vCvXM3XoOY3610358iNdA1xWImqG0tKwdj542si1Sc2JsWPQBiCiXkD6BY06z0h4k m3zPLst1i3diV42z6XMNy/LCmeBlO+dgjGkSl4gDBwTh6962gH5lo0HYPpptTH2144FU To1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n190si3447241oig.207.2020.04.03.01.31.18; Fri, 03 Apr 2020 01:31:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390556AbgDCIaM (ORCPT + 99 others); Fri, 3 Apr 2020 04:30:12 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:45478 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390435AbgDCIaK (ORCPT ); Fri, 3 Apr 2020 04:30:10 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jKHiK-0008yu-NZ; Fri, 03 Apr 2020 11:30:09 +0300 From: Luca Coelho To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org Date: Fri, 3 Apr 2020 11:29:54 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200403082955.1126339-1-luca@coelho.fi> References: <20200403082955.1126339-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.4 Subject: [PATCH v5.7 7/8] iwlwifi: mvm: fix inactive TID removal return value usage Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg 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: stable@vger.kernel.org # v5.4+ Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index 251d6fbb1da5..56ae72debb96 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -1169,9 +1169,9 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta) inactive_tid_bitmap, &unshare_queues, &changetid_queues); - if (ret >= 0 && free_queue < 0) { + if (ret && 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.25.1