if (nway_advertise) {
if (nway_advertise > 0) {
static int do_one_xcvr(int skfd, char *ifname, int maybe){    struct mii_data *mii = (struct mii_data *)&ifr.ifr_data;    /* Get the vitals from the interface. */    strncpy(ifr.ifr_name, ifname, IFNAMSIZ);    if (ioctl(skfd, SIOCGMIIPHY, &ifr) < 0) {	if (!maybe || (errno != ENODEV))	    fprintf(stderr, "SIOCGMIIPHY on '%s' failed: %s\n",		    ifname, strerror(errno));	return 1;    }    if (override_phy >= 0) {	printf("using the specified MII index %d.\n", override_phy);	mii->phy_id = override_phy;    }    if (opt_reset) {	printf("resetting the transceiver...\n");	mdio_write(skfd, MII_BMCR, MII_BMCR_RESET);    }    if (nway_advertise) {	mdio_write(skfd, MII_ANAR, nway_advertise | 1);	opt_restart = 1;    }    if (opt_restart) {	printf("restarting autonegotiation...\n");	mdio_write(skfd, MII_BMCR, 0x0000);	mdio_write(skfd, MII_BMCR, MII_BMCR_AN_ENA|MII_BMCR_RESTART);    }    if (fixed_speed) {	int bmcr = 0;	if (fixed_speed & (MII_AN_100BASETX_FD|MII_AN_100BASETX_HD))	    bmcr |= MII_BMCR_100MBIT;	if (fixed_speed & (MII_AN_100BASETX_FD|MII_AN_10BASET_FD))	    bmcr |= MII_BMCR_DUPLEX;	mdio_write(skfd, MII_BMCR, bmcr);    }    if (!opt_restart && !opt_reset && !fixed_speed && !nway_advertise)	show_basic_mii(skfd, mii->phy_id);    return 0;}