From patchwork Mon Nov 6 22:38:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 162210 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2969167vqu; Mon, 6 Nov 2023 14:39:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGy8i+3rinix2Z3OaKS3aVpIsyFDjCZCWPnvbby9NEzIFaPeZvgnFEXL32uZHjNRGvetOgh X-Received: by 2002:a17:90a:e516:b0:280:1dca:f699 with SMTP id t22-20020a17090ae51600b002801dcaf699mr19624740pjy.42.1699310362101; Mon, 06 Nov 2023 14:39:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699310362; cv=none; d=google.com; s=arc-20160816; b=DxGq5vRSyuOPttqYB2hwUiHyIfXt9CeQwVLBcLOkI3jVnfH21MB1KS7qgh/5tOQulP 52hVqro9n5VktYmuJW7VEja+OZ+ZAzBrJ9MsfAtLMsTlAPfPGLveTCIuPxDvrCvzAPWP XvMcTP/yl07N3gi06V2fZwNJdOSI0zNu5WRy04bTVOVMJr5VgTDvkfutyRPkLkO+SVoN b1GoY0mdJ4KYFHE98422+3ecA2IqFulfWCrluDV9orMr9ytBRZf7Qlw/njM9Lu2H/JPI P8Zonqc052WbHN/ftGQn8UbjucOYARzGHvk8MCZzWy26gj+lF3Yl0uQ+tBjrYUs95wXx mEpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date; bh=jnSDzk8wrqhQGpd94G/JRsvh5jl3zlwkyNlzJaFcsvc=; fh=dR9hnX7zpzfkb6MxmueecnnlUsoo7OQBV21MCWFph74=; b=PSPpS/B6p9lb6q0I/nR7KiUKKPPP59h/hVaqEglpj2NVNGpnTmvzkZi/drEgEtpT+M tYsZHuFj8CBEsT3tYLT2XNBZbsRTaJz44DOqDtVxkEqbOKtDqWtvGVwH/JsyfQ3HuXat 1wPRsvjkSd2JlVnuaXBRbJr7XCeyb0oMktJ6OPEIS8n8qCzdtJ2LuLWTYkgfy11Mmtbt 0qMXNiCsi9lsTjXwbjwIotSYMWgrDZXxQF+KD8AhmDQFPgfOu+ea4286rCDg8IMasTVV Eu0FWASJjUDGkZXavUC08t3mUN+N27l/YQ6TTq2UrDPtcyxZkPUeA5PNQLZRO57gm7Mz l0GQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id mq5-20020a17090b380500b00280c2b23021si10044338pjb.108.2023.11.06.14.39.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 14:39:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5B78680E069A; Mon, 6 Nov 2023 14:39:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233227AbjKFWjT (ORCPT + 34 others); Mon, 6 Nov 2023 17:39:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233166AbjKFWjS (ORCPT ); Mon, 6 Nov 2023 17:39:18 -0500 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A80ABD57; Mon, 6 Nov 2023 14:39:15 -0800 (PST) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1r08FI-0004vV-2h; Mon, 06 Nov 2023 22:39:00 +0000 Date: Mon, 6 Nov 2023 22:38:53 +0000 From: Daniel Golle To: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Kalle Valo , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Golle , StanleyYP Wang , Peter Chiu , Howard Hsu , Rany Hany , Simon Horman , Alexander Couzens , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 1/2] wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on MT7981 Message-ID: <58c999ad9fd073183bec5532fe62782b7d4be0d5.1699310162.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 06 Nov 2023 14:39:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781856062012751991 X-GMAIL-MSGID: 1781856062012751991 From: StanleyYP Wang The offset of the TSSI flag on the EEPROM of MT7981 devices was wrong. Set the correct offset instead. Fixes: 6bad146d162e ("wifi: mt76: mt7915: add support for MT7981") Signed-off-by: StanleyYP Wang Signed-off-by: Daniel Golle --- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h index f3e56817d36e9..adc26a222823b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h @@ -144,7 +144,8 @@ static inline bool mt7915_tssi_enabled(struct mt7915_dev *dev, enum nl80211_band band) { u8 *eep = dev->mt76.eeprom.data; - u8 val = eep[MT_EE_WIFI_CONF + 7]; + u8 offs = is_mt7981(&dev->mt76) ? 8 : 7; + u8 val = eep[MT_EE_WIFI_CONF + offs]; if (band == NL80211_BAND_2GHZ) return val & MT_EE_WIFI_CONF7_TSSI0_2G;