mt7621 + mt7915e wifi not working and kernel panic
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 28.5k
- Forks
- 13k
- PR merge metrics
- PR metrics pending
Description
Describe the bug
On OpenWRT 24.10 configured on an mt7621 SOC using mt7915e WiFi PCIe module
- WiFi will only work on cold boot.
- on warm boot the kernel will panic and cause a reboot and eventually will startup but the WiFi will not work generating driver errors.
The issue is caused by the mt7621 driver not waiting long enough after resetting the wifi module. The following patch fixes the issue
`Index: linux-6.6.73/drivers/pci/controller/pcie-mt7621.c
--- linux-6.6.73.orig/drivers/pci/controller/pcie-mt7621.c
+++ linux-6.6.73/drivers/pci/controller/pcie-mt7621.c
@@ -60,7 +60,7 @@
#define PCIE_PORT_LINKUP BIT(0)
#define PCIE_PORT_CNT 3
-#define INIT_PORTS_DELAY_MS 100
+#define INIT_PORTS_DELAY_MS 500
#define PERST_DELAY_MS 100
/**
@@ -319,7 +319,13 @@ static void mt7621_pcie_reset_assert(str
list_for_each_entry(port, &pcie->ports, list) {
/ PCIe RC reset assert /
mt7621_control_assert(port);
-
}
-
mdelay(PERST_DELAY_MS);
-
list_for_each_entry(port, &pcie->ports, list) {
/ PCIe EP reset assert /
mt7621_rst_gpio_pcie_assert(port);
}`
OpenWrt version
v24.10.0-5-gef122aa73d
OpenWrt release
24.10
OpenWrt target/subtarget
mt7621
Device
mt7915e
Image kind
Official downloaded image
Steps to reproduce
No response
Actual behaviour
No response
Expected behaviour
No response
Additional info
No response
Diffconfig
Terms
- I am reporting an issue for OpenWrt, not an unsupported fork.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with drivers/pci/controller/pcie-mt7621.c in the Linux 6.6.73 source and inspect the mt7621 PCIe reset and initialization paths. Compare the proposed delay changes, then validate warm-boot behavior with the mt7915e module on an mt7621 OpenWrt 24.10 system; done means WiFi initializes without driver errors or a kernel panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100