Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp707880pxv; Thu, 15 Jul 2021 14:04:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKAaOLqGKBDwjKGA+cqCIQ3jFYNv1GDKtdn003CjQ0sI8ApAbd8hUclCFeuBiMqJI35gU6 X-Received: by 2002:aa7:c4d1:: with SMTP id p17mr9690255edr.2.1626383040468; Thu, 15 Jul 2021 14:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383040; cv=none; d=google.com; s=arc-20160816; b=1BebAN7h7V5tmmN6nCayp0GNGfaguAnPxKHLhl3+xjbePoVc/A88ujTC6RfDLnuAQ7 eOwQwG1a2VMwpl96aij2gLNS1ynodhi5voxu5cv4bTtnA6gR8yZXOxZWHN+eJBYn/+Tk GtbJp3MN82GfoaWy6lJ2Y81DxApomdGD+2xBYlgjCqHG3BKWKt34omVPClxVYNIRZTcm RRnxGZevym6aY3nLC9rRTlCxx0KthgnPSg9yLJk50vmADcLWMZvO+VxDaEu9AjvifXrj 8R/UdHpeZV2xx+yjvJxAY6WkRgqkADE0T5morfW4TAr2fPJLtX0n6YaZiLUwdqXYI3Dv e2pQ== 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=fGz4c2So3DQq8RayKzYdxcK/44PqnZ2ffiShwfBUaD4=; b=Zft1Oh+1DHYHP/VCKj48SDfXd8BtzCSTHCBAYhATl2ZcjWagLuK708GP0c1KBM8M3H tZxJ8S6UyWh/ZNvJb2GYvDUEi7S0kWAjZg+y/hXkVYthzBU3QQUXJg/XaKiZ+ReenIyC FI8rRS62GW4S5fum7KyLdJUuYpW6nVq0VSEcSXaacAV0EGBlFbgYlHIJ1Pmda4YrWjMI KJHRdnw2yFJZweyfocIscLxbW8FWfMTcGF83cxW+iLzL5PAUfvzmTOrm444fChE2wsku I00j8LkbFcqwIXM2/0GFVxfiioMUkn4BZwoYanr4YEa6lcW0TxU1puqUtoBitd9se2PM 498w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MehYmks3; 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 ck13si511967ejb.145.2021.07.15.14.03.37; Thu, 15 Jul 2021 14:04:00 -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=MehYmks3; 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 S241795AbhGOTNr (ORCPT + 99 others); Thu, 15 Jul 2021 15:13:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:38158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241463AbhGOTBP (ORCPT ); Thu, 15 Jul 2021 15:01:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B2A5E613D4; Thu, 15 Jul 2021 18:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375480; bh=0Em+bgYmrDU1JOZhftUS5xrrOixdfruBKkFRuFCROBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MehYmks3hPIAXbE8JZzu8NrN4v2mQ0A6saVx+484vV+m2YqyHeoWAJoiX7G05rZgE Q6nvtbwZd8v8EgjHephxvOAxU+YPZkvPe1hRv8ESiFRcu70bmI60QWM1C17UQun170 LNkZ3m58TwyoqB0NHLMJq6SNQIxu4Sg/XMD4mZMk= 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.12 104/242] mt76: mt7915: fix tssi indication field of DBDC NICs Date: Thu, 15 Jul 2021 20:37:46 +0200 Message-Id: <20210715182611.324416592@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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 3ee8c27bb61b..40a51d99a781 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h @@ -116,12 +116,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 struct sku_group mt7915_sku_groups[]; -- 2.30.2