From: Murad Dadashev via B4 Relay <devnull+llamapersonaltv.gmail.com@kernel.org>
To: Felix Fietkau <nbd@nbd.name>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Ryder Lee <ryder.lee@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
Murad Dadashev <llamapersonaltv@gmail.com>
Subject: [PATCH 04/10] wifi: mt76: mt7603: only enable TSSI with valid calibration data
Date: Fri, 27 Nov 2026 11:35:15 +0300 [thread overview]
Message-ID: <20261127-mt7603u-v1-4-369bee9846f8@gmail.com> (raw)
In-Reply-To: <20261127-mt7603u-v1-0-369bee9846f8@gmail.com>
From: Murad Dadashev <llamapersonaltv@gmail.com>
The TSSI enable flag in NIC_CONF_1 is passed to the firmware as is in
the TX power control command. Some devices set the flag without any
TSSI calibration in the eFuse; one MT7603U dongle has NIC_CONF_1 set to
0x2000 with a TSSI slope of 0.
With TSSI enabled on such a device the firmware stops transmitting
shortly after the first frames are sent in AP mode, and the device has
to be power cycled.
Only keep TSSI enabled when a TSSI slope is programmed.
Signed-off-by: Murad Dadashev <llamapersonaltv@gmail.com>
---
drivers/net/wireless/mediatek/mt76/mt7603/eeprom.h | 2 ++
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/eeprom.h b/drivers/net/wireless/mediatek/mt76/mt7603/eeprom.h
index b6b746d1e56f9442aa12ab48bb211085798d89e8..6003d9233c12aa0e3e0517a380cb9d89cc596d59 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/eeprom.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/eeprom.h
@@ -88,4 +88,6 @@ enum mt7603_eeprom_source {
#define MT_EE_NIC_CONF_0_RX_PATH GENMASK(3, 0)
#define MT_EE_NIC_CONF_0_TX_PATH GENMASK(7, 4)
+#define MT_EE_NIC_CONF_1_TSSI_EN BIT(5)
+
#endif
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
index bbc8402fc98e3c99a9073cc70c3c492e21b761cd..eb633f5d7171e99a0339a2f44fa0ab39379642f1 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
@@ -384,6 +384,10 @@ static int mt7603_mcu_set_tx_power(struct mt7603_dev *dev)
memcpy(req.temp_comp_power, eep + MT_EE_STEP_NUM_NEG_6_7,
sizeof(req.temp_comp_power));
+ if (!eep[MT_EE_TX_POWER_0_GRP4_TSSI_SLOPE] ||
+ eep[MT_EE_TX_POWER_0_GRP4_TSSI_SLOPE] == 0xff)
+ req.tssi &= ~MT_EE_NIC_CONF_1_TSSI_EN;
+
return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_TX_POWER_CTRL,
&req, sizeof(req), true);
}
--
2.47.3
next prev parent reply other threads:[~2026-11-27 8:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 8:35 [PATCH 00/10] wifi: mt76: mt7603: add MT7603U USB support Murad Dadashev via B4 Relay
2026-11-27 8:35 ` [PATCH 01/10] wifi: mt76: mt7603: split core code into mt7603-common Murad Dadashev via B4 Relay
2026-11-27 8:35 ` [PATCH 02/10] wifi: mt76: mt7603: make mcu message helpers usable by other buses Murad Dadashev via B4 Relay
2026-11-27 8:35 ` [PATCH 03/10] wifi: mt76: mt7603: set beacon and CAB queue index in the TXD directly Murad Dadashev via B4 Relay
2026-11-27 8:35 ` Murad Dadashev via B4 Relay [this message]
2026-11-27 8:35 ` [PATCH 05/10] wifi: mt76: mt7603: allow configuring TX and RX antennas separately Murad Dadashev via B4 Relay
2026-11-27 8:35 ` [PATCH 06/10] wifi: mt76: mt7603: defer WTBL updates when register access can sleep Murad Dadashev via B4 Relay
2026-11-27 8:35 ` [PATCH 07/10] wifi: mt76: mt7603: skip PCIe specific setup on non-MMIO buses Murad Dadashev via B4 Relay
2026-11-27 8:35 ` [PATCH 08/10] wifi: mt76: usb: add MT7603 queue mapping Murad Dadashev via B4 Relay
2026-11-27 8:35 ` [PATCH 10/10] wifi: mt76: mt7603: add AP mode support for USB devices Murad Dadashev via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127-mt7603u-v1-4-369bee9846f8@gmail.com \
--to=devnull+llamapersonaltv.gmail.com@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=llamapersonaltv@gmail.com \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox