From patchwork Wed Dec 23 08:50:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1419962 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D16t36Smtz9sTg; Wed, 23 Dec 2020 20:12:27 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ks0By-0001qx-WB; Wed, 23 Dec 2020 09:12:23 +0000 Received: from mail-pj1-f49.google.com ([209.85.216.49]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ks04o-0003y4-9K for kernel-team@lists.ubuntu.com; Wed, 23 Dec 2020 09:04:58 +0000 Received: by mail-pj1-f49.google.com with SMTP id lb18so2689410pjb.5 for ; Wed, 23 Dec 2020 01:04:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qUNVhjAGB3Ahg47eb7su6HoOXzdBD3P5F9SYCmhx62E=; b=d8zWp5wq3amjTlw8uYxkO1sodwgD+3NgTVh038EbGjm6rcYx9P12qP4znNGbb5Lz3I VOBPvlSxuhS6c0HgZxLGbmD/dE2agelGmtNYHdhQBE9v/x9/yHHfauKrGQ35ZZDYe8YJ iA0fe2ONAs6kwZ5Kvr3/8jsL40gdU9GSHQvYqqAXI1/XKfuLvuayynfVQPQjnfRMb4Vz QiNd2aAqMFeeKFiPWHAQYSw2FuyaSlW0xO8gKUgOMQLDP7/dcUUYxDJgCkYesu+bLrOF BqEQkfBgzNYEtF44YXd9wbvDnqDY6vivhKRmvXkiMDAKhmglzjt+N/ctSY+5oBAjnIq/ vtxw== X-Gm-Message-State: AOAM532YCROGmBEZeHw+3Rja7SN2b/NBIE9IyEzfIXXNRMyscVM8OvxY Eg9n6diBrch2wiKCNBxiyveMjHjeF3DBfjIo X-Google-Smtp-Source: ABdhPJy/0b9SwKaXsrQgBNZ8IwOYTv2Vtmh4DZrHDGU1IycM/Anm6v7AdsCHlYVtIW1zbV9jb1RDGw== X-Received: by 2002:a17:90a:d494:: with SMTP id s20mr26264560pju.178.1608714278151; Wed, 23 Dec 2020 01:04:38 -0800 (PST) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id t9sm17266328pgh.41.2020.12.23.01.04.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Dec 2020 01:04:37 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 292/379][SRU][OEM-5.6] mac80211: remove tx status call to ieee80211_sta_register_airtime Date: Wed, 23 Dec 2020 16:50:25 +0800 Message-Id: <20201223085152.554896-293-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201223085152.554896-1-vicamo.yang@canonical.com> References: <20201223085152.554896-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.49; envelope-from=vicamo@gmail.com; helo=mail-pj1-f49.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Felix Fietkau BugLink: https://bugs.launchpad.net/bugs/1879633 All drivers using airtime fairness are calling ieee80211_sta_register_airtime directly, now they must. Document this as well. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200908123702.88454-8-nbd@nbd.name [johannes: update the documentation to suit] Signed-off-by: Johannes Berg (cherry picked from commit c74114d7d51521bd785bf6aa0f90ee87d99bee8a) Signed-off-by: You-Sheng Yang --- include/net/mac80211.h | 5 +++-- net/mac80211/status.c | 6 ------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 86496cdd5265..3c7fbf138697 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -997,7 +997,8 @@ ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *rate) * @status.ampdu_ack_len: AMPDU ack length * @status.ampdu_len: AMPDU length * @status.antenna: (legacy, kept only for iwlegacy) - * @status.tx_time: airtime consumed for transmission + * @status.tx_time: airtime consumed for transmission; note this is only + * used for WMM AC, not for airtime fairness * @status.is_valid_ack_signal: ACK signal is valid * @status.status_driver_data: driver use area * @ack: union part for pure ACK data @@ -5613,7 +5614,7 @@ void ieee80211_send_eosp_nullfunc(struct ieee80211_sta *pubsta, int tid); /** * ieee80211_sta_register_airtime - register airtime usage for a sta/tid * - * Register airtime usage for a given sta on a given tid. The driver can call + * Register airtime usage for a given sta on a given tid. The driver must call * this function to notify mac80211 that a station used a certain amount of * airtime. This information will be used by the TXQ scheduler to schedule * stations in a way that ensures airtime fairness. diff --git a/net/mac80211/status.c b/net/mac80211/status.c index dee9292df31c..f41632c0e12b 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -982,12 +982,6 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw, ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data, acked, info->status.tx_time); - if (info->status.tx_time && - wiphy_ext_feature_isset(local->hw.wiphy, - NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) - ieee80211_sta_register_airtime(&sta->sta, tid, - info->status.tx_time, 0); - if ((tx_time_est = ieee80211_info_get_tx_time_est(info)) > 0) { /* Do this here to avoid the expensive lookup of the sta * in ieee80211_report_used_skb().