Lines Matching refs:br
21 static int br_is_designated_for_some_port(const struct net_bridge *br) in br_is_designated_for_some_port() argument
25 list_for_each_entry(p, &br->port_list, list) { in br_is_designated_for_some_port()
27 !memcmp(&p->designated_bridge, &br->bridge_id, 8)) in br_is_designated_for_some_port()
36 struct net_bridge *br = (struct net_bridge *)arg; in br_hello_timer_expired() local
38 br_debug(br, "hello timer expired\n"); in br_hello_timer_expired()
39 spin_lock(&br->lock); in br_hello_timer_expired()
40 if (br->dev->flags & IFF_UP) { in br_hello_timer_expired()
41 br_config_bpdu_generation(br); in br_hello_timer_expired()
43 mod_timer(&br->hello_timer, round_jiffies(jiffies + br->hello_time)); in br_hello_timer_expired()
45 spin_unlock(&br->lock); in br_hello_timer_expired()
51 struct net_bridge *br = p->br; in br_message_age_timer_expired() local
58 br_info(br, "port %u(%s) neighbor %.2x%.2x.%pM lost\n", in br_message_age_timer_expired()
67 spin_lock(&br->lock); in br_message_age_timer_expired()
70 was_root = br_is_root_bridge(br); in br_message_age_timer_expired()
73 br_configuration_update(br); in br_message_age_timer_expired()
74 br_port_state_selection(br); in br_message_age_timer_expired()
75 if (br_is_root_bridge(br) && !was_root) in br_message_age_timer_expired()
76 br_become_root_bridge(br); in br_message_age_timer_expired()
78 spin_unlock(&br->lock); in br_message_age_timer_expired()
84 struct net_bridge *br = p->br; in br_forward_delay_timer_expired() local
86 br_debug(br, "port %u(%s) forward delay timer\n", in br_forward_delay_timer_expired()
88 spin_lock(&br->lock); in br_forward_delay_timer_expired()
92 jiffies + br->forward_delay); in br_forward_delay_timer_expired()
95 if (br_is_designated_for_some_port(br)) in br_forward_delay_timer_expired()
96 br_topology_change_detection(br); in br_forward_delay_timer_expired()
97 netif_carrier_on(br->dev); in br_forward_delay_timer_expired()
101 spin_unlock(&br->lock); in br_forward_delay_timer_expired()
106 struct net_bridge *br = (struct net_bridge *) arg; in br_tcn_timer_expired() local
108 br_debug(br, "tcn timer expired\n"); in br_tcn_timer_expired()
109 spin_lock(&br->lock); in br_tcn_timer_expired()
110 if (!br_is_root_bridge(br) && (br->dev->flags & IFF_UP)) { in br_tcn_timer_expired()
111 br_transmit_tcn(br); in br_tcn_timer_expired()
113 mod_timer(&br->tcn_timer,jiffies + br->bridge_hello_time); in br_tcn_timer_expired()
115 spin_unlock(&br->lock); in br_tcn_timer_expired()
120 struct net_bridge *br = (struct net_bridge *) arg; in br_topology_change_timer_expired() local
122 br_debug(br, "topo change timer expired\n"); in br_topology_change_timer_expired()
123 spin_lock(&br->lock); in br_topology_change_timer_expired()
124 br->topology_change_detected = 0; in br_topology_change_timer_expired()
125 br->topology_change = 0; in br_topology_change_timer_expired()
126 spin_unlock(&br->lock); in br_topology_change_timer_expired()
133 br_debug(p->br, "port %u(%s) hold timer expired\n", in br_hold_timer_expired()
136 spin_lock(&p->br->lock); in br_hold_timer_expired()
139 spin_unlock(&p->br->lock); in br_hold_timer_expired()
142 void br_stp_timer_init(struct net_bridge *br) in br_stp_timer_init() argument
144 setup_timer(&br->hello_timer, br_hello_timer_expired, in br_stp_timer_init()
145 (unsigned long) br); in br_stp_timer_init()
147 setup_timer(&br->tcn_timer, br_tcn_timer_expired, in br_stp_timer_init()
148 (unsigned long) br); in br_stp_timer_init()
150 setup_timer(&br->topology_change_timer, in br_stp_timer_init()
152 (unsigned long) br); in br_stp_timer_init()
154 setup_timer(&br->gc_timer, br_fdb_cleanup, (unsigned long) br); in br_stp_timer_init()