Lines Matching refs:br
17 static int br_is_designated_for_some_port(const struct net_bridge *br)
21 list_for_each_entry(p, &br->port_list, list) {
23 !memcmp(&p->designated_bridge, &br->bridge_id, 8))
32 struct net_bridge *br = from_timer(br, t, hello_timer);
34 br_debug(br, "hello timer expired\n");
35 spin_lock(&br->lock);
36 if (br->dev->flags & IFF_UP) {
37 br_config_bpdu_generation(br);
39 if (br->stp_enabled == BR_KERNEL_STP)
40 mod_timer(&br->hello_timer,
41 round_jiffies(jiffies + br->hello_time));
43 spin_unlock(&br->lock);
49 struct net_bridge *br = p->br;
56 br_info(br, "port %u(%s) neighbor %.2x%.2x.%pM lost\n",
65 spin_lock(&br->lock);
68 was_root = br_is_root_bridge(br);
71 br_configuration_update(br);
72 br_port_state_selection(br);
73 if (br_is_root_bridge(br) && !was_root)
74 br_become_root_bridge(br);
76 spin_unlock(&br->lock);
82 struct net_bridge *br = p->br;
84 br_debug(br, "port %u(%s) forward delay timer\n",
86 spin_lock(&br->lock);
90 jiffies + br->forward_delay);
93 if (br_is_designated_for_some_port(br))
94 br_topology_change_detection(br);
95 netif_carrier_on(br->dev);
100 spin_unlock(&br->lock);
105 struct net_bridge *br = from_timer(br, t, tcn_timer);
107 br_debug(br, "tcn timer expired\n");
108 spin_lock(&br->lock);
109 if (!br_is_root_bridge(br) && (br->dev->flags & IFF_UP)) {
110 br_transmit_tcn(br);
112 mod_timer(&br->tcn_timer, jiffies + br->bridge_hello_time);
114 spin_unlock(&br->lock);
119 struct net_bridge *br = from_timer(br, t, topology_change_timer);
121 br_debug(br, "topo change timer expired\n");
122 spin_lock(&br->lock);
123 br->topology_change_detected = 0;
124 __br_set_topology_change(br, 0);
125 spin_unlock(&br->lock);
132 br_debug(p->br, "port %u(%s) hold timer expired\n",
135 spin_lock(&p->br->lock);
138 spin_unlock(&p->br->lock);
141 void br_stp_timer_init(struct net_bridge *br)
143 timer_setup(&br->hello_timer, br_hello_timer_expired, 0);
144 timer_setup(&br->tcn_timer, br_tcn_timer_expired, 0);
145 timer_setup(&br->topology_change_timer,