+static void bridge_stp_notify(struct bridge_state *bst)
+{
+ struct bridge_config *cfg = &bst->config;
+
+ if (!cfg->stp || cfg->stp_kernel)
+ return;
+
+ blob_buf_init(&b, 0);
+ blobmsg_add_string(&b, "name", bst->dev.ifname);
+ if (cfg->stp_proto)
+ blobmsg_add_string(&b, "proto", cfg->stp_proto);
+ blobmsg_add_u32(&b, "forward_delay", cfg->forward_delay);
+ if (cfg->flags & BRIDGE_OPT_HELLO_TIME)
+ blobmsg_add_u32(&b, "hello_time", cfg->hello_time);
+ if (cfg->flags & BRIDGE_OPT_MAX_AGE)
+ blobmsg_add_u32(&b, "max_age", cfg->max_age);
+ if (cfg->flags & BRIDGE_OPT_AGEING_TIME)
+ blobmsg_add_u32(&b, "ageing_time", cfg->ageing_time);
+ netifd_ubus_device_notify("stp_init", b.head, 1000);
+}
+