Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2426988pxb; Tue, 9 Mar 2021 02:10:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPi0v70FzhOqbMrbv9oLtjSLkiDh03/b2sioKcN2qsCv7Dd9nHpuwB0pEc74fmCHnTcf5p X-Received: by 2002:a17:906:81c9:: with SMTP id e9mr19193475ejx.456.1615284628391; Tue, 09 Mar 2021 02:10:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615284628; cv=none; d=google.com; s=arc-20160816; b=gv/aGZQGZdxB40QjqHN/Rzn8PpVAsK2ZHHe2Hq+H4Yv3W8LuGuBTQN0JZlzcNf/DBv hQQTFxPJj85PI70EYYrmAsgiIes6IzSxe2BVXdpj1w87DsyrgllcYQA4RAUap1YIDOLE SVj98DaW15FqWPSUf+8RLoO1ohYTLEUElYcsO6SgHZO0fbv0falu0uhkkJZvvVMC0s6q Bg7oBkJRcb6XaamP6KG8pkTmp1i48iUQtpO1eAxUEpIbS1OyXG/jnDW8hYiDdmjQ4Mj0 VNCk5yecZQ4tWG+Ur/z+alefKg+Xj99MEEnJILVZfLvnfkWaWfSgcAUBVwYrUMwkavLb xLQg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=B+sE9BQPPD7REDcLBXtYyho3xRgGMEXlqnPs00fkmsQ=; b=MskojMHWbYSLNL/xC4IDX8/dTAqI4l+Sr8Q/fx4mgL7jxvyC710itQPFoiP6aAe7Hr ZO92lpe6rOHlaUUyMs4K+2vFr/e8NmgZFgWtM7xtEybtCnDdRzfjzbjLnO6LrUJhpGI3 IaTKcURuZX3Ps19zRATMqB4ZsbaC9YPy2lg0PNRS740d6DgWijkfyEOTYch+DaQNVaPJ PFf+lFqQbRGj33WujCZb38r6LgmdbNxjez5FgrnwxPn8j+roHgTJXRItccA2ddiPdMgO HAUpycz34dVGq5QO0LBI08hM6LXYmViCLx+Umw40ytM/KNW52DuVH6DIsQ0/Ut37KLqZ odig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q+ULo8fA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si8909708ejd.159.2021.03.09.02.10.04; Tue, 09 Mar 2021 02:10:28 -0800 (PST) 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=pass header.i=@kernel.org header.s=k20201202 header.b=q+ULo8fA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230140AbhCIKJc (ORCPT + 99 others); Tue, 9 Mar 2021 05:09:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:37400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbhCIKJQ (ORCPT ); Tue, 9 Mar 2021 05:09:16 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0513765257; Tue, 9 Mar 2021 10:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615284556; bh=ExrBKg4inI96baXa7XVTQenb1XjPd1DKTrvHab2xmZU=; h=From:To:Cc:Subject:Date:From; b=q+ULo8fAmC8t46aqt8Q/6dXQjN8J63jFF/teoCf0odzyI3WQ+pjb5EMHTauslLb6p g1meO0lODdBj085IZOiHNPJ4q4KPDmoey4Knxmq5cgWolh16qhzx6iYnYFM/6D2U0Y Xc3SvKIEthX9PjCrWdo+erhjl+pzM1evvucBJIo3ifHdz5wEsjAqyWtUuIrsCztLTO kWSdlxRgbUKmmiWp2FiWptcM3frHLeV0h8JgUq9Z9dycXAKwRCIQx127K4qEY8+sC/ 4pyBQKN0WqT7kzcJ8duN9j7cYpxjUcdTXojZb0cWm5/MgahsufevriS+LqjSUFW0CW TiNGrkpYSsTDA== From: Lorenzo Bianconi To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, nbd@nbd.name, sean.wang@mediatek.com, leon.yen@mediatek.com Subject: [PATCH wireless-drivers] mt76: mt7921: fix airtime reporting Date: Tue, 9 Mar 2021 11:09:03 +0100 Message-Id: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix {tx,rx}_airtime reporting for mt7921 driver. Wrong register definitions trigger a tx hangs before resetting airtime stats. Fixes: 163f4d22c118d ("mt76: mt7921: add MAC support") Tested-by: Leon Yen Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7921/regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/regs.h b/drivers/net/wireless/mediatek/mt76/mt7921/regs.h index 18980bb32dee..6dad7f6ab09d 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/regs.h +++ b/drivers/net/wireless/mediatek/mt76/mt7921/regs.h @@ -135,10 +135,10 @@ #define MT_WTBLON_TOP_BASE 0x34000 #define MT_WTBLON_TOP(ofs) (MT_WTBLON_TOP_BASE + (ofs)) -#define MT_WTBLON_TOP_WDUCR MT_WTBLON_TOP(0x0) +#define MT_WTBLON_TOP_WDUCR MT_WTBLON_TOP(0x200) #define MT_WTBLON_TOP_WDUCR_GROUP GENMASK(2, 0) -#define MT_WTBL_UPDATE MT_WTBLON_TOP(0x030) +#define MT_WTBL_UPDATE MT_WTBLON_TOP(0x230) #define MT_WTBL_UPDATE_WLAN_IDX GENMASK(9, 0) #define MT_WTBL_UPDATE_ADM_COUNT_CLEAR BIT(12) #define MT_WTBL_UPDATE_BUSY BIT(31) -- 2.29.2