Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp658231pxv; Thu, 15 Jul 2021 12:41:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoDLnzb60g6VtMrgDMu4oE/X84UXMOO+k5uTNkvq/hfGwt6D3z6Jfnp5qG49bMLdsE9gxN X-Received: by 2002:aa7:c89a:: with SMTP id p26mr9171598eds.373.1626378109337; Thu, 15 Jul 2021 12:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378109; cv=none; d=google.com; s=arc-20160816; b=tbto0GcD3N+eIy1c7l6MknJPQuRNdqN2l98WzT7b9mbntOxDlbAYxYBZnBuZD2qpOB IzG1eoqj/MM5wQdDeJO6xUJbawU1MCA52CpjTz8XzHKs4hpDSekK8O3YetYXSBhcVpJu DBejGnXl+nXCDBu3MksW8dPRlYqgshrn5edi4KVrL7YGWIIQL6tzE8T37H6OUGOJ3Pv1 BmgXDE6TM0k7+20KrRuv5zo/2Cj0k/Z1rryv1Oo6wPOH5QvkuXabbLv4xGa2kwuemmrE uyog3ASDl3XeAsnfUiGpVlwCF+FHdK2C/Nr7F6voIU/9N+WgZWS6E/8dkmX6x5k+H//j Hz4g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=z/78Pdfj7DSgT4aHMT7epl1tp0fiD9mzMlLU8C93D8M=; b=ZO+P1XoViGWYE12bogu2mkWzohGKofFAI3KXNNd2XlRx5mcn9fjoQG6bfn39qN186M xeqwGYD8W+HbGvWS2gjROpj4ysL4qNIXoJd14n9mFgeAydWggQJZOwRzpzdsKQ3dTEEh erDMyfy1PUS6U3E3/Bb/bpmp724l+mnvY84/TLsxlBtPvVUjP86Ro3HreV52MKq7orxk Fx5bRJojD1ZVHXsygmuAfQ0B1YEnWpyQ14TOv7ldnJ7r3KpAH/MN3ntxcKpydFrEBwVw 2dvgHYOm5YMXvkJ60qDFvTCNacPMyTxbx+jc9Iih4es/hZD7YcrN/e9UJdLu/nkMighE J/hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Dx77SZ2R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q19si8929232edv.125.2021.07.15.12.41.26; Thu, 15 Jul 2021 12:41:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=Dx77SZ2R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344109AbhGOTjy (ORCPT + 99 others); Thu, 15 Jul 2021 15:39:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:50730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243776AbhGOTOF (ORCPT ); Thu, 15 Jul 2021 15:14:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D01E5601FE; Thu, 15 Jul 2021 19:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376185; bh=xekxq414vliRZk8DWKUeUEWjmWWLGY1Y0jia8LZAVdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dx77SZ2R/tb7HAirXVSDzt6gO9N7Q/GrjBHnZ+LKYoJg2V1msI5aiqdeHiW1vP23Q nlp318vMKYnwsowkM0dRc1OIvVi/2PxWef66YswRkVnw2swTTVwac25sEukjnF2NkP gjpCzITdetpwCmKxeCWFh+HNbenti5JHYcaObLAY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evelyn Tsai , Shayne Chen , Felix Fietkau , Sasha Levin Subject: [PATCH 5.13 121/266] mt76: mt7915: fix tssi indication field of DBDC NICs Date: Thu, 15 Jul 2021 20:37:56 +0200 Message-Id: <20210715182635.264926819@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Evelyn Tsai [ Upstream commit 64cf5ad3c2fa841e4b416343a7ea69c63d60fa4e ] Correct the bitfield which indicates TSSI on/off for MT7915D NIC. Signed-off-by: Evelyn Tsai Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h index 30bf41b8ed15..a43389a41800 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h @@ -99,12 +99,15 @@ 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]; - /* TODO: DBDC */ - if (band == NL80211_BAND_5GHZ) - return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF7_TSSI0_5G; + if (band == NL80211_BAND_2GHZ) + return val & MT_EE_WIFI_CONF7_TSSI0_2G; + + if (dev->dbdc_support) + return val & MT_EE_WIFI_CONF7_TSSI1_5G; else - return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF7_TSSI0_2G; + return val & MT_EE_WIFI_CONF7_TSSI0_5G; } extern const u8 mt7915_sku_group_len[MAX_SKU_RATE_GROUP_NUM]; -- 2.30.2