From ff205dd6b3a439e590f623d44d46484f8f387149 Mon Sep 17 00:00:00 2001 From: Qubot <1445788683@qq.com> Date: Sat, 6 Jun 2026 22:22:50 +0800 Subject: [PATCH] sun60iw2: allow rfkill SDIO WiFi rescans --- bsp/drivers/mmc/sunxi-mmc-export.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bsp/drivers/mmc/sunxi-mmc-export.c b/bsp/drivers/mmc/sunxi-mmc-export.c index 65e36b07e..7fb4ea382 100644 --- a/bsp/drivers/mmc/sunxi-mmc-export.c +++ b/bsp/drivers/mmc/sunxi-mmc-export.c @@ -62,6 +62,13 @@ void sunxi_mmc_rescan_card(unsigned id) return; } + /* + * WiFi modules are described as non-removable SDIO devices, but their + * power can be controlled later by rfkill. If the first boot-time scan + * runs while the module is still off, MMC core marks the host as already + * scanned and ignores later rescans unless this flag is cleared. + */ + sunxi_hosts[id]->mmc->rescan_entered = 0; mmc_detect_change(sunxi_hosts[id]->mmc, 0); } EXPORT_SYMBOL_GPL(sunxi_mmc_rescan_card);