Skip to content

Commit

Permalink
ethernet: set ethernet nic settings
Browse files Browse the repository at this point in the history
Set link speed, duplex and port.
  • Loading branch information
kmroz committed Jul 16, 2014
1 parent bec8fd8 commit ff8b3b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ethernet.c
Expand Up @@ -594,5 +594,13 @@ __ni_system_ethernet_set(const char *ifname, const ni_ethernet_t *ether)
__ni_ethtool_set_value(ifname, &__ethtool_sflags, value);
}

__ni_system_ethernet_set_advertising(ifname, &ecmd);

if (__ni_ethtool(ifname, ETHTOOL_SSET, &ecmd) < 0) {
if (errno != EOPNOTSUPP)
ni_error("%s: ETHTOOL_SSET failed: %m", ifname);
return -1;
}

return 0;
}

0 comments on commit ff8b3b2

Please sign in to comment.