bridge: add support for an external STP daemon
[project/netifd.git] / device.c
index 521d9a6c0fe1fe348b6558f9112014a18db76d48..bb39ea7f8d71b46c750a770b771a5bc33d362bb9 100644 (file)
--- a/device.c
+++ b/device.c
@@ -139,6 +139,18 @@ void device_vlan_update(bool done)
        }
 }
 
+void device_stp_init(void)
+{
+       struct device *dev;
+
+       avl_for_each_element(&devices, dev, avl) {
+               if (!dev->type->stp_init)
+                       continue;
+
+               dev->type->stp_init(dev);
+       }
+}
+
 static int set_device_state(struct device *dev, bool state)
 {
        if (state) {