Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3705468rwb; Fri, 30 Sep 2022 07:16:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7iHccaplbXRE0nwgdxfRmna5P13W4uZtU+PAy2b+k0SjoD9unw6PuQnBCjBwCqhLTxN0hj X-Received: by 2002:a05:6a00:1c69:b0:53e:a212:2b0b with SMTP id s41-20020a056a001c6900b0053ea2122b0bmr9201352pfw.30.1664547409758; Fri, 30 Sep 2022 07:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664547409; cv=none; d=google.com; s=arc-20160816; b=Xwa2J2a0v0ZoJB9jzV+rHgH121xAJpOEQvnjmEJQU7uDOnGy0psoCB0ODBmewmBcTM vMqb+fWF7GNyetGrljal64qvBddshgOZZxzI4nXXn5vjbDQ/LN6C323n2biofEXcp72p NIlT8QwOJs29Ab3dfqw39LF1RpIOFzCBt3FPhntd6/6+ji1PSvgwcLiG12jNR8H6QdE5 nYi44gJrXHs6lT8E4o+DzBCQREVgLoUVIXSaxmqRamHOASc/d4pLdAcVda/fRLnQj2AG JELFKY9QzA7kDP3gLMyxq3MtaSfZ5AODTEyk9x6fdl1rGRqRZSUAl0pB/or2P3xF55gQ wdrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=N0vI1OqZfdfsJZl6IwWDIAz3rwTaNgNrLU6ZaDRJutQ=; b=HrJo99znrYImj4zQXJnDx7qcoYk7YivybdcSf6K2mCt/jfBp5q71Exr0ElLLwHMIyh S/JI/vAc3e9I16X//8p0y+/mIf89j2gHpvbWH5OkyI5EMJD8rlms1v8W69/SObPYx7lT seKdHeNTUc8bzPh4fqZea5Igvey7vrsaIjhHWHiy+Cx5qADLWnOzpwouvvxejHG9Desz FE1/60CeOZ0MeI5jO59cAdhBsIKzRjjeU9naoRGeMwRLP2/spEr45zn5Jo8S0MuB6WvR KnqYnk9dLvekNM+eAd8ILXynDe/o3gKBcthghBUkvmQ3nqkwAdXHYHYzHThI+t/+TD2D OaEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=q7uOL9vQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r26-20020a638f5a000000b0042ac2632327si2838916pgn.249.2022.09.30.07.16.39; Fri, 30 Sep 2022 07:16:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=q7uOL9vQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231793AbiI3OPT (ORCPT + 59 others); Fri, 30 Sep 2022 10:15:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231776AbiI3OPR (ORCPT ); Fri, 30 Sep 2022 10:15:17 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B89C3AD997 for ; Fri, 30 Sep 2022 07:15:08 -0700 (PDT) X-UUID: 6b2f15dd03e4428a976a5f3cdcdd5790-20220930 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=N0vI1OqZfdfsJZl6IwWDIAz3rwTaNgNrLU6ZaDRJutQ=; b=q7uOL9vQCzFY3YaVJtGViPsRo74z0VW2KFaxL5aop9Ls+Mc5OE1TiYxJLV/S1bP6a/fr7hLvHdgqUikQv+DH0wiM6LtYF2Y41xI52Ca1iwwTvP3AnYlRbhc3YaM831+bXalQ7CcjmIARWIjFyOOYvBSM8c9uUCGBYAYqiTXd6ec=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:dfee1097-d4e8-465f-bee5-2bc405feacf0,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:39a5ff1,CLOUDID:3f6bcce4-87f9-4bb0-97b6-34957dc0fbbe,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 6b2f15dd03e4428a976a5f3cdcdd5790-20220930 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1873167069; Fri, 30 Sep 2022 22:15:03 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 30 Sep 2022 22:15:02 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 30 Sep 2022 22:15:02 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , linux-mediatek , Shayne Chen Subject: [PATCH] wifi: mt76: mt7915: reserve 8 bits for the index of rf registers Date: Fri, 30 Sep 2022 22:14:41 +0800 Message-ID: <20220930141441.16314-1-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_SPF_TEMPERROR,UNPARSEABLE_RELAY,URIBL_CSS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Evelyn Tsai The value of regidx of rf registers is combined with WF selection and offset. Extend the WF selection field from 4 to 8 bits since the adie index should also be specified. Signed-off-by: Evelyn Tsai Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c index 6ef3431cad64..e1d15394a621 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c @@ -963,7 +963,7 @@ mt7915_twt_stats(struct seq_file *s, void *data) } /* The index of RF registers use the generic regidx, combined with two parts: - * WF selection [31:28] and offset [27:0]. + * WF selection [31:24] and offset [23:0]. */ static int mt7915_rf_regval_get(void *data, u64 *val) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 8d297e4aa7d4..1b9f3da8ae96 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -3447,8 +3447,8 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set) __le32 ofs; __le32 data; } __packed req = { - .idx = cpu_to_le32(u32_get_bits(regidx, GENMASK(31, 28))), - .ofs = cpu_to_le32(u32_get_bits(regidx, GENMASK(27, 0))), + .idx = cpu_to_le32(u32_get_bits(regidx, GENMASK(31, 24))), + .ofs = cpu_to_le32(u32_get_bits(regidx, GENMASK(23, 0))), .data = set ? cpu_to_le32(*val) : 0, }; struct sk_buff *skb; -- 2.25.1