Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4231592pxk; Tue, 8 Sep 2020 14:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2DW8XiYp8VXDYTBvYaZl8MntBG28pHJXPln/Zc6HX3IB8jLSbwmnIXjKNrhCgi9h8P8Lg X-Received: by 2002:a17:906:1b55:: with SMTP id p21mr404093ejg.457.1599600048375; Tue, 08 Sep 2020 14:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599600048; cv=none; d=google.com; s=arc-20160816; b=xNP8koK2we6rqx+Du1t+QsnMwcCQlnw5T0GvylZv8EL4Dm7VWyWLASbutknKuS7oLW 92TAYYPrLFJ5vX5+cxWHEhDG+SWnsf15LdFrgZDWzBw5j0lcnIQ9RLMaEZm2TtaJp8j8 EeEWnqiTVUvmY7K0Fpr31dOhSoD0FO8+Dj2dxR0KDMS4p71+G8jsLeMpp32mWLz/FjGX jd4MxacGYuHKV3W2vQC2eE71AhsOaCGyMiwuoP/A3z2xpxFSYJ9e/sXSkbrebHQMpHjN ozfx4TIdzytP28Rnpsna69LcpP6Wa4G9419iQd/TML+2eQtcls2nZDxeRTWXJ6Jqw9Tm hqIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=DROicD7xQI1KGUrU5PIXUBoYP+VU6OmNWzVs5m7D0vU=; b=QBPygxdmw44vwxei1sP69BqUkFUn+Becmn9bCJEggbbaHBAhxyon7mLv8yiConxS8/ FqW5BJ6J4P4Uf1RcbXMfVw00NP98qsisUvasy5xFBfQI3zxwRYl1IZydSgN4Akggac+8 DfF3rluF28dwBTtYIxzJ7umtbQK9AF39Tx7bNjzz9oAmSSotlbOQYOWgC6SJTQQf1QHx erp4YBcG0gPdrQX3K4KJnoeqhjl5M+qjq3XWd07JjhSAaQ0Vy10kr2URXYIPJhPgyvQ1 zC6HH6sDtJp3iNrXHFnV+fJbKl/ObZIsudPMcJ5Ghg6ZnPmKmCiA0NCWz0phNYXJe2Ue X8XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=S7fkX01H; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de17si178862edb.89.2020.09.08.14.20.24; Tue, 08 Sep 2020 14:20:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=S7fkX01H; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730184AbgIHVSK (ORCPT + 99 others); Tue, 8 Sep 2020 17:18:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730159AbgIHVSE (ORCPT ); Tue, 8 Sep 2020 17:18:04 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6294C0613ED for ; Tue, 8 Sep 2020 14:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DROicD7xQI1KGUrU5PIXUBoYP+VU6OmNWzVs5m7D0vU=; b=S7fkX01HTFX/5TBFmJZjXfuQTd f/+26OTGDDkFfv31+rX74LeyPIcA/IVDRnRpyJymrEGhJBY1wZSSEgUNa77TBrayIapnbkhbpOBKc H17GRDC3sleVNfhABYEL1oCZo4FCniImgv3LYQobaz0doEuRKcpP9YtImk+vAYPjvvso=; Received: from p4ff13fcb.dip0.t-ipconnect.de ([79.241.63.203] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1kFl03-0002Cx-K9 for linux-wireless@vger.kernel.org; Tue, 08 Sep 2020 23:17:59 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 09/11] mt76: mt7915: fix queue/tid mapping for airtime reporting Date: Tue, 8 Sep 2020 23:17:54 +0200 Message-Id: <20200908211756.15998-9-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908211756.15998-1-nbd@nbd.name> References: <20200908211756.15998-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Unlike 7615, 7915 uses the same AC index for rx and tx, which matches the LMAC queue mapping Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index 54088d8e151f..defd0a98f7e2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -105,12 +105,6 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev) [IEEE80211_AC_VI] = 4, [IEEE80211_AC_VO] = 6 }; - static const u8 hw_queue_map[] = { - [IEEE80211_AC_BK] = 0, - [IEEE80211_AC_BE] = 1, - [IEEE80211_AC_VI] = 2, - [IEEE80211_AC_VO] = 3, - }; struct ieee80211_sta *sta; struct mt7915_sta *msta; u32 tx_time[IEEE80211_NUM_ACS], rx_time[IEEE80211_NUM_ACS]; @@ -169,8 +163,9 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev) sta = container_of((void *)msta, struct ieee80211_sta, drv_priv); for (i = 0; i < IEEE80211_NUM_ACS; i++) { - u32 tx_cur = tx_time[i]; - u32 rx_cur = rx_time[hw_queue_map[i]]; + u8 q = mt7915_lmac_mapping(dev, i); + u32 tx_cur = tx_time[q]; + u32 rx_cur = rx_time[q]; u8 tid = ac_to_tid[i]; if (!tx_cur && !rx_cur) -- 2.28.0