bridge: tune default stp parameters
[project/netifd.git] / system-linux.c
index e9a19f7e437ee9ec31de81df1500431995c6feca..85942a546d3e75e88fe66a5bc9e7fc21e9b8ae81 100644 (file)
@@ -1276,21 +1276,17 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
        snprintf(buf, sizeof(buf), "%d", cfg->priority);
        system_bridge_set_priority(bridge, buf);
 
+       snprintf(buf, sizeof(buf), "%lu", sec_to_jiffies(cfg->hello_time));
+       system_bridge_set_hello_time(bridge, buf);
+
+       snprintf(buf, sizeof(buf), "%lu", sec_to_jiffies(cfg->max_age));
+       system_bridge_set_max_age(bridge, buf);
+
        if (cfg->flags & BRIDGE_OPT_AGEING_TIME) {
                snprintf(buf, sizeof(buf), "%lu", sec_to_jiffies(cfg->ageing_time));
                system_bridge_set_ageing_time(bridge, buf);
        }
 
-       if (cfg->flags & BRIDGE_OPT_HELLO_TIME) {
-               snprintf(buf, sizeof(buf), "%lu", sec_to_jiffies(cfg->hello_time));
-               system_bridge_set_hello_time(bridge, buf);
-       }
-
-       if (cfg->flags & BRIDGE_OPT_MAX_AGE) {
-               snprintf(buf, sizeof(buf), "%lu", sec_to_jiffies(cfg->max_age));
-               system_bridge_set_max_age(bridge, buf);
-       }
-
        return 0;
 }