/* Check for port carrier transistions. Called from work queue to allow for calling functions that might sleep (such as speed check), and to debounce.  */
void br_port_carrier_check(struct net_bridge_port *p)
/* Check for port carrier transistions. Called from work queue to allow for calling functions that might sleep (such as speed check), and to debounce.  */
void br_port_carrier_check(struct net_bridge_port *p)
{
	struct net_device *dev = p->dev;
	struct net_bridge *br = p->br;
	if (netif_carrier_ok(dev))
		p->path_cost = port_cost(dev);
	if (netif_running(br->dev)) {
		spin_lock_bh(&br->lock);
		if (netif_carrier_ok(dev)) {
			if (p->state == BR_STATE_DISABLED)
				br_stp_enable_port(p);
		} else {
			if (p->state != BR_STATE_DISABLED)
				br_stp_disable_port(p);
		}
		spin_unlock_bh(&br->lock);
	}
}