[openwrt/openwrt] wifi-scripts: retry setup of wireless devices that show up late
LEDE Commits
lede-commits at lists.infradead.org
Thu Oct 2 04:31:01 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/727d8b27ab94f8f9e3c75571e2a8c1322a7c28d9
commit 727d8b27ab94f8f9e3c75571e2a8c1322a7c28d9
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Oct 2 13:29:57 2025 +0200
wifi-scripts: retry setup of wireless devices that show up late
When a phy appears after setup has already been attempted, tell netifd
to retry setup for all failed wireless devices.
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
.../files/etc/hotplug.d/ieee80211/10-wifi-detect | 1 +
.../wifi-scripts/files/lib/netifd/wireless-device.uc | 14 ++++++++++++++
.../config/wifi-scripts/files/lib/netifd/wireless.uc | 11 +++++++++++
3 files changed, 26 insertions(+)
diff --git a/package/network/config/wifi-scripts/files/etc/hotplug.d/ieee80211/10-wifi-detect b/package/network/config/wifi-scripts/files/etc/hotplug.d/ieee80211/10-wifi-detect
index b865552661..64eeb7235b 100644
--- a/package/network/config/wifi-scripts/files/etc/hotplug.d/ieee80211/10-wifi-detect
+++ b/package/network/config/wifi-scripts/files/etc/hotplug.d/ieee80211/10-wifi-detect
@@ -2,4 +2,5 @@
[ "${ACTION}" = "add" ] && {
/sbin/wifi config
+ ubus call network.wireless retry
}
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
index e982338737..cccb6c9c8c 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
@@ -405,6 +405,19 @@ function start()
this.setup();
}
+
+function retry_setup()
+{
+ if (this.delete)
+ return;
+
+ if (this.state != "down" || !this.autostart)
+ return;
+
+ this.start();
+}
+
+
function stop()
{
this.dbg("stop, state=" + this.state);
@@ -604,6 +617,7 @@ function dbg(msg)
const wdev_proto = {
update,
destroy,
+ retry_setup,
start,
stop,
setup,
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index 500033be97..7c5913ac60 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -446,6 +446,17 @@ const ubus_obj = {
});
}
},
+ retry: {
+ args: wdev_args,
+ call: function(req) {
+ hostapd_update_mlo();
+
+ return wdev_call(req, (dev) => {
+ dev.retry_setup();
+ return 0;
+ });
+ }
+ },
reconf: {
args: wdev_args,
call: function(req) {
More information about the lede-commits
mailing list