Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1245316pxb; Fri, 22 Jan 2021 10:26:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxz8YGWpllBiiXsU5pdL8DJ8CGcyGWEXPQdWDCXXjzCqKKrAzDH+C8o9HvEKf64hMKGho62 X-Received: by 2002:aa7:ca13:: with SMTP id y19mr4150890eds.59.1611339970294; Fri, 22 Jan 2021 10:26:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611339970; cv=none; d=google.com; s=arc-20160816; b=ltDC/0NSJfBDsA2XOmF596QO3VON60LGwukqN8FBqeODNdNgjwaqSHYnaPJ0gF7GCP YNsmVUwJG2zvmtwArpXLnDLoVzzh2xX1tXZOoSQH37mjhNhSIWt6sSHxPcalKx9tcbi1 1A2Ff0lNvsFaWBc4Y8eReCPiPT7GT+1zMB8JmGCtRO6soi6n3qRhLsOX4u2D9Cu88TI3 KwwbuRl79x0qjk2Xh+EG7njUiNmLMQekL28bP5mbDqg1MP2vTF2ADLdoIqKI+4H+vKo3 AViRhB4fokd7ICf7DXGcjeWJjMvZjTcy/3x69Gsl6qRZg1gDH6MsSH/kjqpJRxleVbYC bp8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ib/C+1keKD+xch39+liE6TIam/WN4lzySqEG6J/Lals=; b=sJiFUlPNBuvTxlOl+eX6Qtey8apko7H4MC+JiQULXDWa38rgRmp70i1yfZzL9LTyta gU7oQmN1SScsqYltgbQOI/LcoLGchjjFRXH8gQ0uR5RdskgR31nVR1nSdCCXPn5aDJoc s0E9K6yuMEU+gAsRLMnOigrLi9oBbnC/vR1K403CJ1BVEBT0TleLT8kg5jKd2mQrTEip DuAxn4gliOH8ht47o8fSAfOOMZqlYI0063O6ZrpIInO1UaCUESJcH6OUy+79deTQrzac Z4vXlxf1wq1HKjj+EEJTJ7J008nb4NSkCohAOmfcOIGXH2GHC1Geaa9lt+Vld6eX2C8g ueoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vINfAtRH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si2858395edw.174.2021.01.22.10.25.46; Fri, 22 Jan 2021 10:26:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vINfAtRH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730012AbhAVSYN (ORCPT + 99 others); Fri, 22 Jan 2021 13:24:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:40006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728586AbhAVOXQ (ORCPT ); Fri, 22 Jan 2021 09:23:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6CE1323B06; Fri, 22 Jan 2021 14:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611325053; bh=slNKWI3YtTg4B5ukyQdfvTULlGzwnRNCQa9aW5EQ7M4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vINfAtRHB8VDBdGU5rB1BnNSDE2cYS/7vX4yPLkyi+Je78eLX7/M7bLrPr8iMTxeA YwRiW5/aGzsMwhw48Gaa9KEghgN5noSwb8mz3ndESX2LGW4Ug/ZXdhQnxHg1Wsdtpo XXgFr7QdlelPbztI6JHM/l3bknDLoxuk/ZilxBpk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Johannes Berg Subject: [PATCH 5.4 32/33] mac80211: check if atf has been disabled in __ieee80211_schedule_txq Date: Fri, 22 Jan 2021 15:12:48 +0100 Message-Id: <20210122135734.865268210@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135733.565501039@linuxfoundation.org> References: <20210122135733.565501039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lorenzo Bianconi commit c13cf5c159660451c8fbdc37efb998b198e1d305 upstream. Check if atf has been disabled in __ieee80211_schedule_txq() in order to avoid a given sta is always put to the beginning of the active_txqs list and never moved to the end since deficit is not decremented in ieee80211_sta_register_airtime() Fixes: b4809e9484da1 ("mac80211: Add airtime accounting and scheduling to TXQs") Signed-off-by: Lorenzo Bianconi Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/93889406c50f1416214c079ca0b8c9faecc5143e.1608975195.git.lorenzo@kernel.org Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3773,7 +3773,7 @@ void __ieee80211_schedule_txq(struct iee * get immediately moved to the back of the list on the next * call to ieee80211_next_txq(). */ - if (txqi->txq.sta && + if (txqi->txq.sta && local->airtime_flags && wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) list_add(&txqi->schedule_order,