/* Get the media mode stored in EEPROM or module options and load mii_status accordingly. The requested link state information is also returned.  */
static u32 velocity_get_opt_media_mode(struct velocity_info *vptr)
/* Get the media mode stored in EEPROM or module options and load mii_status accordingly. The requested link state information is also returned.  */
static u32 velocity_get_opt_media_mode(struct velocity_info *vptr)
{
	u32 status = 0;
	switch (vptr->options.spd_dpx) {
	case SPD_DPX_AUTO:
		status = VELOCITY_AUTONEG_ENABLE;
		break;
	case SPD_DPX_100_FULL:
		status = VELOCITY_SPEED_100 | VELOCITY_DUPLEX_FULL;
		break;
	case SPD_DPX_10_FULL:
		status = VELOCITY_SPEED_10 | VELOCITY_DUPLEX_FULL;
		break;
	case SPD_DPX_100_HALF:
		status = VELOCITY_SPEED_100;
		break;
	case SPD_DPX_10_HALF:
		status = VELOCITY_SPEED_10;
		break;
	}
	vptr->mii_status = status;
	return status;
}