From: silverducks <silverducks@altlinux.org>
To: Sean Wang <sean.wang@kernel.org>
Cc: linux-wireless@vger.kernel.org, nbd@nbd.name, lorenzo@kernel.org,
ryder.lee@mediatek.com, shayne.chen@mediatek.com,
sean.wang@mediatek.com, matthias.bgg@gmail.com,
angelogioacchino.delregno@collabora.com,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>
Subject: Re: [BUG] mt7921e: Intermittent connection failure
Date: Thu, 9 Apr 2026 15:18:27 +0300 [thread overview]
Message-ID: <651b9626-0c2c-4993-829a-3259141109dc@altlinux.org> (raw)
In-Reply-To: <CAGp9LzrfD+a84ZVGjUnrv7KYCpgfe88NyrXos8wW8U7aKM8BZw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4164 bytes --]
On 02/04/2026 01:58, Sean Wang wrote:
> I think the current test setup is still mixing too many variables, so
> it is hard to tell what is actually triggering the issue.
>
> In particular, if the goal is to test the NetworkManager path, the
> script should not also manually manage wpa_supplicant, and iwd should
> not be part of the same test either. NetworkManager normally manages
> the Wi-Fi backend itself, so mixing manual wpa_supplicant handling,
> iwd, and NetworkManager in one setup makes the result difficult to
> interpret.
> Could you first simplify the setup and test one path at a time?
> If you want to test NetworkManager, use only NetworkManager, for
> example by using nmcli to explicitly control the connection steps.
> If you want to test plain wpa_supplicant, stop NetworkManager
> completely and use only wpa_supplicant + wpa_cli. I would suggest
> starting with this path, since that is also the setup I usually use
> for testing.
> If you want to test iwd, please test it separately as well.
Some confusion here: I have indeed tested them separately. I left in
wpa_supplicant start in that particular script by mistake. Extra stop
commands
for iwd and supplicant at the end of the loop are also redundant. I
don't think
either affects outcome of the tests, but just in case, I'll clean up the
test
scripts and rerun.
I am also attaching all scripts used alongside the resulting logs for
clarity.
> Also suggest to avoid suspend/resume or hibernation for now.
> The log you shared includes a clear S4 resume path (ACPI: PM: Waking
> up from system sleep state S4 and pci_pm_restore returns -110), which
> does not match a simple reconnect or module reload test.
Those are the logs I collected when originally diagnosing the issue. Scripts
reload kernel module instead because I since realised that this is enough to
trigger the bug and it's much faster to do it this way when searching for a
failstate.
I am attaching logs where module reload is used for all cases.
------------
New data
------------
After some additional testing, I noticed simply reconnecting enough
times seems
to trigger the bug as well. I'll attach an additional script for this too.
Given this, I've looked through the code relevant to connection process. I
think I may have found something of interest. The following patch gets
rid of
original lockup state, but introduces a new error into dmesg.
---
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index 462b4a68c4f0..47621ff13839 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -1788,7 +1788,7 @@ int mt76_connac_mcu_cancel_hw_scan(struct mt76_phy
*phy,
}
return mt76_mcu_send_msg(phy->dev, MCU_CE_CMD(CANCEL_HW_SCAN),
- &req, sizeof(req), false);
+ &req, sizeof(req), true);
}
EXPORT_SYMBOL_GPL(mt76_connac_mcu_cancel_hw_scan);
--
2.50.1
Seems like making this call wait for the response is fixing the issue at
least
partially. Judging from the relevant logs, it effectively makes the driver
reset on it's own whenever there's a problem.
Logs of two runs with a kernel compiled with this patch are attached.
One for reconnecting variant, one for module reload variant.
------------
Attachments
------------
I've structured the archive with a subfolder for each testing run, each
containing the relevant logs and the script, if applicable. Overview:
iwd and wpa_supplicant -only setups work as expected.
NetworkManager with module reload ends up in failstate.
NetworkManager with reconnection ends up in failstate.
Both of the latter start to have additional driver reloads instead of
locking
when run with patched kernel.
Finally, I am also attaching a case where problem occurred immediately
after boot.
All failed cases were ended after confirming the failstate.
All successful cases were interrupted manually after a few minutes.
[-- Attachment #2: attachments.tar.gz --]
[-- Type: application/gzip, Size: 712828 bytes --]
next prev parent reply other threads:[~2026-04-09 12:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 14:13 [BUG] mt7921e: Intermittent connection failure silverducks
2026-03-31 7:33 ` silverducks
2026-04-01 22:58 ` Sean Wang
2026-04-09 12:18 ` silverducks [this message]
2026-04-14 6:22 ` silverducks
2026-04-16 21:59 ` Sean Wang
2026-04-17 10:51 ` silverducks
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=651b9626-0c2c-4993-829a-3259141109dc@altlinux.org \
--to=silverducks@altlinux.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@kernel.org \
--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