Пример #1
0
/* called under bridge lock */
void br_init_port(struct net_bridge_port *p)
{
	p->port_id = br_make_port_id(p);
	br_become_designated_port(p);
	p->state = BR_STATE_BLOCKING;

#if defined( CONFIG_RTL865X)&&defined(CONFIG_RE865X)
	{
		int retval=0, vlanPort;
		char name[IFNAMSIZ];
		strcpy(name, p->dev->name);
		vlanPort=name[strlen(name)-1]-'0';
		retval=rtl8651_setSpanningTreeInstancePortState(0, vlanPort,1);
		if(0==retval)
			printk("RTL865x Port %d state=BLOCKING\n", vlanPort);
		else
			printk("RTL865x port %d set state error=%d", vlanPort, retval);
	}
#endif
	p->topology_change_ack = 0;
	p->config_pending = 0;
	br_timer_clear(&p->message_age_timer);
	br_timer_clear(&p->forward_delay_timer);
	br_timer_clear(&p->hold_timer);
}
Пример #2
0
/* called under bridge lock */
void br_init_port(struct net_bridge_port *p)
{
	p->port_id = br_make_port_id(p);
	br_become_designated_port(p);
	p->state = BR_STATE_BLOCKING;
	p->topology_change_ack = 0;
	p->config_pending = 0;
	br_timer_clear(&p->message_age_timer);
	br_timer_clear(&p->forward_delay_timer);
	br_timer_clear(&p->hold_timer);
}