netifd: send event after running wireless handler
authorFelix Fietkau <[email protected]>
Thu, 2 Oct 2025 09:04:36 +0000 (11:04 +0200)
committerFelix Fietkau <[email protected]>
Thu, 2 Oct 2025 09:04:38 +0000 (11:04 +0200)
This can be used by other services to trigger reconfiguration, or detect when
PHY renaming has been performed.

Signed-off-by: Felix Fietkau <[email protected]>
package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc

index 36ec3e7d35786ec6be1dde1635e71718c6f49bb0..e982338737a10d577a469ddf74c92007c0abe5ae 100644 (file)
@@ -17,7 +17,7 @@ let wdev_handler = {};
 let wdev_script_task, wdev_script_timeout;
 let handler_timer;
 
-function supplicant_start_mlo()
+function wireless_config_done()
 {
        ubus.call({
                object: "wpa_supplicant",
@@ -25,6 +25,16 @@ function supplicant_start_mlo()
                return: "ignore",
                data: { },
        });
+
+       ubus.call({
+               object: "service",
+               method: "event",
+               return: "ignore",
+               data: {
+                       type: "netifd.wireless.done",
+                       data: {},
+               },
+       });
 }
 
 function delete_wdev(name)
@@ -228,7 +238,7 @@ function run_next_handler()
                __run_next_handler();
 
        if (!wdev_cur && !length(wdev_handler))
-               supplicant_start_mlo();
+               wireless_config_done();
 }
 
 function run_handler(wdev, op, cb)