Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2444759rdf; Mon, 6 Nov 2023 14:39:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9b7jVCW0OteqQKFCbnkYkU9HkWnx4FAEIsKA0NoH6yOG+N6LCKQEk7HV+5a1EeSODpuof X-Received: by 2002:a05:6a20:3ca2:b0:161:28e0:9abd with SMTP id b34-20020a056a203ca200b0016128e09abdmr28951301pzj.16.1699310365064; Mon, 06 Nov 2023 14:39:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699310365; cv=none; d=google.com; s=arc-20160816; b=LSmP8e7urmPmWmR3+MnpBDIo0By+02UNvAp//cMb7j62whRcg/ivymDh8j5oD87osm xNP9Xpa3yOhnDDzEbsxVy796UHCF6Y1p2uin+LSQHFBBkCDXHsUnGHsyg7Ywj8H8WVKD lIzaceCRGp7vzyhA61/YxnHSgXk2belKoLhebIU0l/LM57mcD0i5GVHjifLoMDFZN4Tw gyRvFoid/NpH8fyzR90JwiPMUwmmk3l0YcFhBE4KLAPr2Reel3JcxyDl7VOKUE0uxdlv qnMuB7Qn3pktNKQAS+WQcQZSHBk7CXyclxIhM06Fy8dLiNGPG5bQnyn+G2bLtSYqe2a3 ex6A== 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=tMn14H5cOnhQfacK9JtPKAA4YmUdzNoO7mFBZI5REN+1ZoYj44Te7DvJ6nngGybza7 VZBOdYrTAwAIbnnGavqUaDbdjrhc5C6uMyyrBQmzdAmX94iK83H7EsXdsbDZX8UJhUp4 uuiBc56CNuNsSdgcYShUWfz2+669WyRiE/WQQg4of9dchwuHwblHAl9e5RpNPbDzjsoJ MBPE4BjR5tqy3Z6xpV2eXHLJl1entOqsXtYxapRwySw58Y5r65NyQoip2OmGUHZlyws5 4Z03V/6leXcSheiARM9e6CwfYY9EL3QNdZv82MDofdxafifv5ykcR+NzaXtsdvmeNX3B UXlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ei5-20020a056a0080c500b006c34753bcf6si8183285pfb.355.2023.11.06.14.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 14:39:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 05ACA80BA97A; Mon, 6 Nov 2023 14:39:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233217AbjKFWjS (ORCPT + 56 others); Mon, 6 Nov 2023 17:39:18 -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-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 14:39:18 -0800 (PST) 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; -- 2.42.0