• Home
  • Raw
  • Download

Lines Matching refs:p

33 void br_init_port(struct net_bridge_port *p)  in br_init_port()  argument
37 p->port_id = br_make_port_id(p->priority, p->port_no); in br_init_port()
38 br_become_designated_port(p); in br_init_port()
39 br_set_state(p, BR_STATE_BLOCKING); in br_init_port()
40 p->topology_change_ack = 0; in br_init_port()
41 p->config_pending = 0; in br_init_port()
43 err = __set_ageing_time(p->dev, p->br->ageing_time); in br_init_port()
45 netdev_err(p->dev, "failed to offload ageing time\n"); in br_init_port()
51 struct net_bridge_port *p; in br_stp_enable_bridge() local
60 list_for_each_entry(p, &br->port_list, list) { in br_stp_enable_bridge()
61 if (netif_running(p->dev) && netif_oper_up(p->dev)) in br_stp_enable_bridge()
62 br_stp_enable_port(p); in br_stp_enable_bridge()
71 struct net_bridge_port *p; in br_stp_disable_bridge() local
74 list_for_each_entry(p, &br->port_list, list) { in br_stp_disable_bridge()
75 if (p->state != BR_STATE_DISABLED) in br_stp_disable_bridge()
76 br_stp_disable_port(p); in br_stp_disable_bridge()
91 void br_stp_enable_port(struct net_bridge_port *p) in br_stp_enable_port() argument
93 br_init_port(p); in br_stp_enable_port()
94 br_port_state_selection(p->br); in br_stp_enable_port()
95 br_ifinfo_notify(RTM_NEWLINK, NULL, p); in br_stp_enable_port()
99 void br_stp_disable_port(struct net_bridge_port *p) in br_stp_disable_port() argument
101 struct net_bridge *br = p->br; in br_stp_disable_port()
105 br_become_designated_port(p); in br_stp_disable_port()
106 br_set_state(p, BR_STATE_DISABLED); in br_stp_disable_port()
107 p->topology_change_ack = 0; in br_stp_disable_port()
108 p->config_pending = 0; in br_stp_disable_port()
110 br_ifinfo_notify(RTM_NEWLINK, NULL, p); in br_stp_disable_port()
112 del_timer(&p->message_age_timer); in br_stp_disable_port()
113 del_timer(&p->forward_delay_timer); in br_stp_disable_port()
114 del_timer(&p->hold_timer); in br_stp_disable_port()
116 if (!rcu_access_pointer(p->backup_port)) in br_stp_disable_port()
117 br_fdb_delete_by_port(br, p, 0, 0); in br_stp_disable_port()
118 br_multicast_disable_port(p); in br_stp_disable_port()
227 struct net_bridge_port *p; in br_stp_change_bridge_id() local
238 list_for_each_entry(p, &br->port_list, list) { in br_stp_change_bridge_id()
239 if (ether_addr_equal(p->designated_bridge.addr, oldaddr)) in br_stp_change_bridge_id()
240 memcpy(p->designated_bridge.addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
242 if (ether_addr_equal(p->designated_root.addr, oldaddr)) in br_stp_change_bridge_id()
243 memcpy(p->designated_root.addr, addr, ETH_ALEN); in br_stp_change_bridge_id()
261 struct net_bridge_port *p; in br_stp_recalculate_bridge_id() local
267 list_for_each_entry(p, &br->port_list, list) { in br_stp_recalculate_bridge_id()
269 memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0) in br_stp_recalculate_bridge_id()
270 addr = p->dev->dev_addr; in br_stp_recalculate_bridge_id()
284 struct net_bridge_port *p; in br_stp_set_bridge_priority() local
290 list_for_each_entry(p, &br->port_list, list) { in br_stp_set_bridge_priority()
291 if (p->state != BR_STATE_DISABLED && in br_stp_set_bridge_priority()
292 br_is_designated_port(p)) { in br_stp_set_bridge_priority()
293 p->designated_bridge.prio[0] = (newprio >> 8) & 0xFF; in br_stp_set_bridge_priority()
294 p->designated_bridge.prio[1] = newprio & 0xFF; in br_stp_set_bridge_priority()
309 int br_stp_set_port_priority(struct net_bridge_port *p, unsigned long newprio) in br_stp_set_port_priority() argument
316 new_port_id = br_make_port_id(newprio, p->port_no); in br_stp_set_port_priority()
317 if (br_is_designated_port(p)) in br_stp_set_port_priority()
318 p->designated_port = new_port_id; in br_stp_set_port_priority()
320 p->port_id = new_port_id; in br_stp_set_port_priority()
321 p->priority = newprio; in br_stp_set_port_priority()
322 if (!memcmp(&p->br->bridge_id, &p->designated_bridge, 8) && in br_stp_set_port_priority()
323 p->port_id < p->designated_port) { in br_stp_set_port_priority()
324 br_become_designated_port(p); in br_stp_set_port_priority()
325 br_port_state_selection(p->br); in br_stp_set_port_priority()
332 int br_stp_set_path_cost(struct net_bridge_port *p, unsigned long path_cost) in br_stp_set_path_cost() argument
338 p->flags |= BR_ADMIN_COST; in br_stp_set_path_cost()
339 p->path_cost = path_cost; in br_stp_set_path_cost()
340 br_configuration_update(p->br); in br_stp_set_path_cost()
341 br_port_state_selection(p->br); in br_stp_set_path_cost()