/* Initializes the SW state maintained for each link, including the link's capabilities and default speed/duplex/flow-control/autonegotiation settings.  */
static void init_link_config(struct link_config *lc, unsigned int caps)
/* Initializes the SW state maintained for each link, including the link's capabilities and default speed/duplex/flow-control/autonegotiation settings.  */
static void init_link_config(struct link_config *lc, unsigned int caps)
{
	lc->supported = caps;
	lc->requested_speed = lc->speed = SPEED_INVALID;
	lc->requested_duplex = lc->duplex = DUPLEX_INVALID;
	lc->requested_fc = lc->fc = PAUSE_RX | PAUSE_TX;
	if (lc->supported & SUPPORTED_Autoneg) {
		lc->advertising = lc->supported;
		lc->autoneg = AUTONEG_ENABLE;
		lc->requested_fc |= PAUSE_AUTONEG;
	} else {
		lc->advertising = 0;
		lc->autoneg = AUTONEG_DISABLE;
	}
}