From: Anthony Liu <anthony.liu@mediatek.com>
To: <nbd@nbd.name>, <lorenzo@kernel.org>
Cc: <Sean.Wang@mediatek.com>, <Leon.Yen@mediatek.com>,
<Quan.Zhou@mediatek.com>, <Ryder.lee@mediatek.com>,
<litien.chang@mediatek.com>, <kun.wu@mediatek.com>,
<jb.tsai@mediatek.com>, <emery.hsin@mediatek.com>,
<linux-wireless@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
Anthony Liu <anthony.liu@mediatek.com>
Subject: [PATCH v1] [PATCH 01/05] wifi: mt76: refactor chip_config to accept generic commands
Date: Thu, 20 Aug 2026 19:11:58 +0800 [thread overview]
Message-ID: <20260820111202.1935373-1-anthony.liu@mediatek.com> (raw)
The API, mt76_connac_mcu_chip_config(), was only used to send reset
command but the chip_config command is a carrier of more commands.
This patch enables other FW commands to be carried over
mt76_connac_mcu_chip_config().
Change-Id: I2b05c0805e28169cdb09ab6bf486b70e974866cd
CR-Id: WCNCR00542202
Signed-off-by: Anthony Liu <anthony.liu@mediatek.com>
Reviewed-on: https://gerrit.mediatek.inc/c/neptune/oss/nbd168_wireless/+/12378110
Reviewed-by: jb.tsai <jb.tsai@mediatek.com>
AutoUT-Review-Label: srv_neptune_adm <srv_neptune_adm@mediatek.com>
GAI-Code-Review: srv_ai_review001 <srv_ai_review001@mediatek.com>
Commit-Check: srv_check_service <srv_check_service@mediatek.com>
Code-Review-Course-Train: srv_check_service <srv_check_service@mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h | 2 +-
drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c
index 6a1475e3c899..83cffa94bc0e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c
@@ -54,7 +54,7 @@ static int mt7615_config(void *data, u64 val)
int ret;
mt7615_mutex_acquire(dev);
- ret = mt76_connac_mcu_chip_config(&dev->mt76);
+ ret = mt76_connac_mcu_chip_config(&dev->mt76, "assert");
mt7615_mutex_release(dev);
return ret;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index 2f925d22b9aa..de83d41ca9c9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -2044,13 +2044,13 @@ int mt76_connac_mcu_sched_scan_enable(struct mt76_phy *phy,
}
EXPORT_SYMBOL_GPL(mt76_connac_mcu_sched_scan_enable);
-int mt76_connac_mcu_chip_config(struct mt76_dev *dev)
+int mt76_connac_mcu_chip_config(struct mt76_dev *dev, const char *cmd)
{
struct mt76_connac_config req = {
.resp_type = 0,
};
- strscpy(req.data, "assert");
+ strscpy(req.data, cmd);
return mt76_mcu_send_msg(dev, MCU_CE_CMD(CHIP_CONFIG),
&req, sizeof(req), false);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
index 0ededa569e9a..45f77c80e879 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
@@ -2098,7 +2098,7 @@ void mt76_connac_mcu_set_suspend_iter(void *priv, u8 *mac,
int mt76_connac_sta_state_dp(struct mt76_dev *dev,
enum ieee80211_sta_state old_state,
enum ieee80211_sta_state new_state);
-int mt76_connac_mcu_chip_config(struct mt76_dev *dev);
+int mt76_connac_mcu_chip_config(struct mt76_dev *dev, const char *cmd);
int mt76_connac_mcu_set_deep_sleep(struct mt76_dev *dev, bool enable);
void mt76_connac_mcu_coredump_event(struct mt76_dev *dev, struct sk_buff *skb,
struct mt76_connac_coredump *coredump);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
index a5a70d8e8544..62bf33347e9e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
@@ -237,7 +237,7 @@ static int mt7921_chip_reset(void *data, u64 val)
default:
/* Collect the core dump before reset wifisys. */
mt792x_mutex_acquire(dev);
- ret = mt76_connac_mcu_chip_config(&dev->mt76);
+ ret = mt76_connac_mcu_chip_config(&dev->mt76, "assert");
mt792x_mutex_release(dev);
break;
}
--
2.45.2
next reply other threads:[~2026-08-20 11:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 11:11 Anthony Liu [this message]
2026-08-20 11:11 ` [PATCH v1] [PATCH 02/05] wifi: mt76: refactor chip_cfg commands to be a generic API Anthony Liu
2026-08-20 11:12 ` [PATCH v1] [PATCH 03/05] wifi: mt76: add ACPI MTFG option for bus configuration Anthony Liu
2026-08-20 11:12 ` [PATCH v1] [PATCH 04/05] wifi: mt76: add PCIe speed tuning for mt7922/mt7928 Anthony Liu
2026-08-20 11:12 ` [PATCH v1] [PATCH 05/05] wifi: mt76: add PERF_IND " Anthony Liu
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=20260820111202.1935373-1-anthony.liu@mediatek.com \
--to=anthony.liu@mediatek.com \
--cc=Leon.Yen@mediatek.com \
--cc=Quan.Zhou@mediatek.com \
--cc=Ryder.lee@mediatek.com \
--cc=Sean.Wang@mediatek.com \
--cc=emery.hsin@mediatek.com \
--cc=jb.tsai@mediatek.com \
--cc=kun.wu@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=litien.chang@mediatek.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
/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