From patchwork Thu Jan 14 11:29:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 363331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 017FDC433DB for ; Thu, 14 Jan 2021 11:30:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C52CC23A34 for ; Thu, 14 Jan 2021 11:30:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728929AbhANLam (ORCPT ); Thu, 14 Jan 2021 06:30:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728816AbhANLaY (ORCPT ); Thu, 14 Jan 2021 06:30:24 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 925BDC061798 for ; Thu, 14 Jan 2021 03:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=c5Ag22wQQvDBoNg142bW0jk8oMULth+A1IKpzmgTgCg=; b=A5EXGv7H0tHJRRHnzeTC4IncZ8 +eMUZDu5UODHMMBu7+DfMf4vyTa/xzUfK2Mn6VGoqSCm4GJM9VDXx5mhOP4RsFoiRs2xcUEPW5cgS 3SMA8fZqnTa7ovS8fsWOwNxuqcwWPcaDVB6J9hvCFP57Ad7QicrHL7lZ7hxUHRUCXpQo=; Received: from p54ae91f2.dip0.t-ipconnect.de ([84.174.145.242] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1l00og-0001PU-K2 for linux-wireless@vger.kernel.org; Thu, 14 Jan 2021 12:29:26 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 1/7] mt76: mt7603: fix ED/CCA monitoring with single-stream devices Date: Thu, 14 Jan 2021 12:29:19 +0100 Message-Id: <20210114112925.87646-1-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Do not use the RSSI values of the unavailable chain Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c index 7f0e3df3a094..cc4e7bc48294 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c @@ -1631,9 +1631,13 @@ mt7603_edcca_check(struct mt7603_dev *dev) if (rssi0 > 128) rssi0 -= 256; - rssi1 = FIELD_GET(MT_AGC_41_RSSI_1, val); - if (rssi1 > 128) - rssi1 -= 256; + if (dev->mphy.antenna_mask & BIT(1)) { + rssi1 = FIELD_GET(MT_AGC_41_RSSI_1, val); + if (rssi1 > 128) + rssi1 -= 256; + } else { + rssi1 = rssi0; + } if (max(rssi0, rssi1) >= -40 && dev->ed_strong_signal < MT7603_EDCCA_BLOCK_TH) From patchwork Thu Jan 14 11:29:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 363329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58C9DC43332 for ; Thu, 14 Jan 2021 11:31:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E65A239FD for ; Thu, 14 Jan 2021 11:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729030AbhANLbH (ORCPT ); Thu, 14 Jan 2021 06:31:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727967AbhANLbG (ORCPT ); Thu, 14 Jan 2021 06:31:06 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92E04C06179A for ; Thu, 14 Jan 2021 03:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ixUx+csBL+2MPJ0Q+vaz3WbYKtI0EGHk49a0YtwmS/w=; b=EkW9q6vn9sIqoRRunjeF/lGAcq s24d9tGOWipnYs5ngeiHzTm16JMLU0ftfPeHjKHOWBx7NevWzpIwJFMfU6tRmHm01tBrYCAfGK9kZ zwHjbItDWSMLMXV5X+uS/BaDVKQEriXDlUM4c7wrcGv0CCGmNGPAVO3Wb9wnIIvLphGc=; Received: from p54ae91f2.dip0.t-ipconnect.de ([84.174.145.242] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1l00og-0001PU-Pc for linux-wireless@vger.kernel.org; Thu, 14 Jan 2021 12:29:26 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 2/7] mt76: mt7915: ensure that init work completes before starting the device Date: Thu, 14 Jan 2021 12:29:20 +0100 Message-Id: <20210114112925.87646-2-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210114112925.87646-1-nbd@nbd.name> References: <20210114112925.87646-1-nbd@nbd.name> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Without this change, the start operation could potentially race against eeprom or txbf init Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index 73c5ee10fd3e..05dd75961d95 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -26,6 +26,8 @@ static int mt7915_start(struct ieee80211_hw *hw) struct mt7915_phy *phy = mt7915_hw_phy(hw); bool running; + flush_work(&dev->init_work); + mutex_lock(&dev->mt76.mutex); running = mt7915_dev_running(dev); From patchwork Thu Jan 14 11:29:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 363330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9A51C43381 for ; Thu, 14 Jan 2021 11:31:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E74623A53 for ; Thu, 14 Jan 2021 11:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729015AbhANLa5 (ORCPT ); Thu, 14 Jan 2021 06:30:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728135AbhANLaz (ORCPT ); Thu, 14 Jan 2021 06:30:55 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92BD3C061799 for ; Thu, 14 Jan 2021 03:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=62kr2qOFw/KMM2Uh3WOUF9CQTzobILkZyEx8N4WUNz8=; b=awIXMZDX18nvncEahv0K2bUEsH CkDUuDOKKIRWKv1FXwT/hFnE6uY4ZE07OkvkG+SZ0jn2yLGUyTlgtdULzqIrrYfMJ4Nig+YgJjDxq DGRaBQpA6a0ay3R70Aw/lGCK0mfY9V26LIOhrnFqkiD2qY90CwBd698/QF0OPmqiJUbk=; Received: from p54ae91f2.dip0.t-ipconnect.de ([84.174.145.242] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1l00og-0001PU-WD for linux-wireless@vger.kernel.org; Thu, 14 Jan 2021 12:29:27 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 3/7] mt76: mt7915: do not set DRR group for stations Date: Thu, 14 Jan 2021 12:29:21 +0100 Message-Id: <20210114112925.87646-3-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210114112925.87646-1-nbd@nbd.name> References: <20210114112925.87646-1-nbd@nbd.name> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This is causing some extreme latency spikes when sending traffic to multiple stations at the same time. Disable this until the firmware issue is sorted out Signed-off-by: Felix Fietkau --- .../net/wireless/mediatek/mt76/mt7915/mcu.c | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 6d4c5b7dfd56..ad42e9b48d35 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -2198,32 +2198,6 @@ int mt7915_mcu_add_rate_ctrl(struct mt7915_dev *dev, struct ieee80211_vif *vif, MCU_EXT_CMD_STA_REC_UPDATE, true); } -static int -mt7915_mcu_add_group(struct mt7915_dev *dev, struct ieee80211_vif *vif, - struct ieee80211_sta *sta) -{ -#define MT_STA_BSS_GROUP 1 - struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; - struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; - struct { - __le32 action; - u8 wlan_idx_lo; - u8 status; - u8 wlan_idx_hi; - u8 rsv0[5]; - __le32 val; - u8 rsv1[8]; - } __packed req = { - .action = cpu_to_le32(MT_STA_BSS_GROUP), - .wlan_idx_lo = to_wcid_lo(msta->wcid.idx), - .wlan_idx_hi = to_wcid_hi(msta->wcid.idx), - .val = cpu_to_le32(mvif->idx % 16), - }; - - return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_DRR_CTRL, &req, - sizeof(req), true); -} - int mt7915_mcu_add_sta_adv(struct mt7915_dev *dev, struct ieee80211_vif *vif, struct ieee80211_sta *sta, bool enable) { @@ -2233,10 +2207,6 @@ int mt7915_mcu_add_sta_adv(struct mt7915_dev *dev, struct ieee80211_vif *vif, return 0; /* must keep the order */ - ret = mt7915_mcu_add_group(dev, vif, sta); - if (ret) - return ret; - ret = mt7915_mcu_add_txbf(dev, vif, sta, enable); if (ret) return ret; From patchwork Thu Jan 14 11:29:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 363328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D1E2C43331 for ; Thu, 14 Jan 2021 11:31:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45ED323A34 for ; Thu, 14 Jan 2021 11:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729027AbhANLbH (ORCPT ); Thu, 14 Jan 2021 06:31:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729021AbhANLbG (ORCPT ); Thu, 14 Jan 2021 06:31:06 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3434BC06179E for ; Thu, 14 Jan 2021 03:29:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=YqZaCa4JtBqfsXlzEE7I4bK1FnmxU9ccUxoq0fJ9iIM=; b=AjIQs16BXTDDC+ud4kcm1LcPhW LpFpiBprLHcQftlcB8TnuLWoPYIG8z3FgDf9pVWhQjoFtFPynejJFr0f3jPNtut5YGNvtC8fMdetl BqHqed5rKPkP6C+4a+ta+Tzo37cGriUxJ8v7uu3RmQ4FlylKRfN3Ze21Nk2YdrQX7y/0=; Received: from p54ae91f2.dip0.t-ipconnect.de ([84.174.145.242] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1l00oh-0001PU-Qd for linux-wireless@vger.kernel.org; Thu, 14 Jan 2021 12:29:27 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 6/7] mt76: mt7915: fix eeprom parsing for DBDC Date: Thu, 14 Jan 2021 12:29:24 +0100 Message-Id: <20210114112925.87646-6-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210114112925.87646-1-nbd@nbd.name> References: <20210114112925.87646-1-nbd@nbd.name> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Annotate WIFI_CONF eeprom mask values with the byte number Fix parsing per-band number of chains Signed-off-by: Felix Fietkau --- .../wireless/mediatek/mt76/mt7915/eeprom.c | 26 +++++++++---------- .../wireless/mediatek/mt76/mt7915/eeprom.h | 17 +++++++----- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c index 7807b9165e01..8f12a1bef3fc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c @@ -53,7 +53,7 @@ void mt7915_eeprom_parse_band_config(struct mt7915_phy *phy) u32 val; val = mt7915_eeprom_read(dev, MT_EE_WIFI_CONF + ext_phy); - val = FIELD_GET(MT_EE_WIFI_CONF_BAND_SEL, val); + val = FIELD_GET(MT_EE_WIFI_CONF0_BAND_SEL, val); switch (val) { case MT_EE_5GHZ: phy->mt76->cap.has_5ghz = true; @@ -70,25 +70,25 @@ void mt7915_eeprom_parse_band_config(struct mt7915_phy *phy) static void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev) { - u8 nss, tx_mask[2] = {}, *eeprom = dev->mt76.eeprom.data; + u8 nss, *eeprom = dev->mt76.eeprom.data; mt7915_eeprom_parse_band_config(&dev->phy); /* read tx mask from eeprom */ - tx_mask[0] = FIELD_GET(MT_EE_WIFI_CONF_TX_MASK, - eeprom[MT_EE_WIFI_CONF]); - if (dev->dbdc_support) - tx_mask[1] = FIELD_GET(MT_EE_WIFI_CONF_TX_MASK, - eeprom[MT_EE_WIFI_CONF + 1]); - - nss = tx_mask[0] + tx_mask[1]; - if (!nss || nss > 4) { - tx_mask[0] = 4; + nss = FIELD_GET(MT_EE_WIFI_CONF0_TX_PATH, eeprom[MT_EE_WIFI_CONF]); + if (!nss || nss > 4) nss = 4; - } dev->chainmask = BIT(nss) - 1; - dev->mphy.antenna_mask = BIT(tx_mask[0]) - 1; + + if (dev->dbdc_support) { + nss = FIELD_GET(MT_EE_WIFI_CONF3_TX_PATH_B0, + eeprom[MT_EE_WIFI_CONF + 3]); + if (!nss || nss > 2) + nss = 2; + } + + dev->mphy.antenna_mask = BIT(nss) - 1; dev->mphy.chainmask = dev->mphy.antenna_mask; } diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h index 6712032b40df..7999e95560a8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h @@ -25,11 +25,14 @@ enum mt7915_eeprom_field { __MT_EE_MAX = 0xe00 }; -#define MT_EE_WIFI_CONF_TX_MASK GENMASK(2, 0) -#define MT_EE_WIFI_CONF_BAND_SEL GENMASK(7, 6) -#define MT_EE_WIFI_CONF_TSSI0_2G BIT(0) -#define MT_EE_WIFI_CONF_TSSI0_5G BIT(2) -#define MT_EE_WIFI_CONF_TSSI1_5G BIT(4) +#define MT_EE_WIFI_CONF0_TX_PATH GENMASK(2, 0) +#define MT_EE_WIFI_CONF0_BAND_SEL GENMASK(7, 6) +#define MT_EE_WIFI_CONF1_BAND_SEL GENMASK(7, 6) +#define MT_EE_WIFI_CONF3_TX_PATH_B0 GENMASK(1, 0) +#define MT_EE_WIFI_CONF3_TX_PATH_B1 GENMASK(5, 4) +#define MT_EE_WIFI_CONF7_TSSI0_2G BIT(0) +#define MT_EE_WIFI_CONF7_TSSI0_5G BIT(2) +#define MT_EE_WIFI_CONF7_TSSI1_5G BIT(4) enum mt7915_eeprom_band { MT_EE_DUAL_BAND, @@ -116,9 +119,9 @@ mt7915_tssi_enabled(struct mt7915_dev *dev, enum nl80211_band band) /* TODO: DBDC */ if (band == NL80211_BAND_5GHZ) - return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF_TSSI0_5G; + return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF7_TSSI0_5G; else - return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF_TSSI0_2G; + return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF7_TSSI0_2G; } extern const struct sku_group mt7915_sku_groups[];