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 pr_debug("%s: hello timer expired\n", br->dev->name); 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
60 br->dev->name, in br_message_age_timer_expired()
71 spin_lock(&br->lock); in br_message_age_timer_expired()
74 was_root = br_is_root_bridge(br); in br_message_age_timer_expired()
77 br_configuration_update(br); in br_message_age_timer_expired()
78 br_port_state_selection(br); in br_message_age_timer_expired()
79 if (br_is_root_bridge(br) && !was_root) in br_message_age_timer_expired()
80 br_become_root_bridge(br); in br_message_age_timer_expired()
82 spin_unlock(&br->lock); in br_message_age_timer_expired()
88 struct net_bridge *br = p->br; in br_forward_delay_timer_expired() local
91 br->dev->name, p->port_no, p->dev->name); in br_forward_delay_timer_expired()
92 spin_lock(&br->lock); in br_forward_delay_timer_expired()
96 jiffies + br->forward_delay); in br_forward_delay_timer_expired()
99 if (br_is_designated_for_some_port(br)) in br_forward_delay_timer_expired()
100 br_topology_change_detection(br); in br_forward_delay_timer_expired()
103 spin_unlock(&br->lock); in br_forward_delay_timer_expired()
108 struct net_bridge *br = (struct net_bridge *) arg; in br_tcn_timer_expired() local
110 pr_debug("%s: tcn timer expired\n", br->dev->name); in br_tcn_timer_expired()
111 spin_lock(&br->lock); in br_tcn_timer_expired()
112 if (br->dev->flags & IFF_UP) { in br_tcn_timer_expired()
113 br_transmit_tcn(br); in br_tcn_timer_expired()
115 mod_timer(&br->tcn_timer,jiffies + br->bridge_hello_time); in br_tcn_timer_expired()
117 spin_unlock(&br->lock); in br_tcn_timer_expired()
122 struct net_bridge *br = (struct net_bridge *) arg; in br_topology_change_timer_expired() local
124 pr_debug("%s: topo change timer expired\n", br->dev->name); in br_topology_change_timer_expired()
125 spin_lock(&br->lock); in br_topology_change_timer_expired()
126 br->topology_change_detected = 0; in br_topology_change_timer_expired()
127 br->topology_change = 0; in br_topology_change_timer_expired()
128 spin_unlock(&br->lock); in br_topology_change_timer_expired()
136 p->br->dev->name, p->port_no, p->dev->name); in br_hold_timer_expired()
138 spin_lock(&p->br->lock); in br_hold_timer_expired()
141 spin_unlock(&p->br->lock); in br_hold_timer_expired()
144 void br_stp_timer_init(struct net_bridge *br) in br_stp_timer_init() argument
146 setup_timer(&br->hello_timer, br_hello_timer_expired, in br_stp_timer_init()
147 (unsigned long) br); in br_stp_timer_init()
149 setup_timer(&br->tcn_timer, br_tcn_timer_expired, in br_stp_timer_init()
150 (unsigned long) br); in br_stp_timer_init()
152 setup_timer(&br->topology_change_timer, in br_stp_timer_init()
154 (unsigned long) br); in br_stp_timer_init()
156 setup_timer(&br->gc_timer, br_fdb_cleanup, (unsigned long) br); in br_stp_timer_init()