openwrt / openwrt/openwrt

mt7621 + mt7915e wifi not working and kernel panic

Open
#17,895 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug invalid
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

  1. WiFi will only work on cold boot.
  2. 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);

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.