diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 080e61d2414a..630ca7ac962a 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -76,7 +76,7 @@ void br_port_carrier_check(struct net_bridge_port *p, bool *notified) struct net_device *dev = p->dev; struct net_bridge *br = p->br; - if (!(p->flags & BR_ADMIN_COST) && + if (!test_bit(BR_ADMIN_COST_BIT, &p->flags) && netif_running(dev) && netif_oper_up(dev)) p->path_cost = port_cost(dev); diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 28c1d3f7e22f..b29dc97b9ad8 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -340,7 +340,7 @@ int br_stp_set_path_cost(struct net_bridge_port *p, unsigned long path_cost) path_cost > BR_MAX_PATH_COST) return -ERANGE; - p->flags |= BR_ADMIN_COST; + set_bit(BR_ADMIN_COST_BIT, &p->flags); p->path_cost = path_cost; br_configuration_update(p->br); br_port_state_selection(p->br);