Lines Matching refs:mii_info
418 struct uec_mii_info *mii_info; in init_phy() local
429 mii_info = malloc(sizeof(*mii_info)); in init_phy()
430 if (!mii_info) { in init_phy()
434 memset(mii_info, 0, sizeof(*mii_info)); in init_phy()
437 mii_info->speed = SPEED_1000; in init_phy()
439 mii_info->speed = SPEED_100; in init_phy()
441 mii_info->duplex = DUPLEX_FULL; in init_phy()
442 mii_info->pause = 0; in init_phy()
443 mii_info->link = 1; in init_phy()
445 mii_info->advertising = (ADVERTISED_10baseT_Half | in init_phy()
450 mii_info->autoneg = 1; in init_phy()
451 mii_info->mii_id = uec->uec_info->phy_address; in init_phy()
452 mii_info->dev = dev; in init_phy()
454 mii_info->mdio_read = &uec_read_phy_reg; in init_phy()
455 mii_info->mdio_write = &uec_write_phy_reg; in init_phy()
457 uec->mii_info = mii_info; in init_phy()
468 curphy = uec_get_phy_info(uec->mii_info); in init_phy()
475 mii_info->phyinfo = curphy; in init_phy()
479 err = curphy->init(uec->mii_info); in init_phy()
489 free(mii_info); in init_phy()
496 struct uec_mii_info *mii_info = uec->mii_info; in adjust_link() local
498 if (mii_info->link) { in adjust_link()
503 if (mii_info->duplex != uec->oldduplex) { in adjust_link()
504 if (!(mii_info->duplex)) { in adjust_link()
511 uec->oldduplex = mii_info->duplex; in adjust_link()
514 if (mii_info->speed != uec->oldspeed) { in adjust_link()
518 switch (mii_info->speed) { in adjust_link()
531 dev->name, mii_info->speed); in adjust_link()
537 change_phy_interface_mode(dev, mode, mii_info->speed); in adjust_link()
539 uec_set_mac_if_mode(uec, mode, mii_info->speed); in adjust_link()
541 printf("%s: Speed %dBT\n", dev->name, mii_info->speed); in adjust_link()
542 uec->oldspeed = mii_info->speed; in adjust_link()
573 uec->mii_info->phyinfo->read_status(uec->mii_info); in phy_change()
1219 curphy = uec->mii_info->phyinfo; in uec_init()
1222 err = curphy->config_aneg(uec->mii_info); in uec_init()
1232 err = curphy->read_status(uec->mii_info); in uec_init()
1233 if (!(((i-- > 0) && !uec->mii_info->link) || err)) in uec_init()
1266 return uec->mii_info->link ? 0 : -1; in uec_init()