1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-17 06:04:07 +03:00

ethtool: Fix speed in 593022fa377d40d9a645919759b04c53cf4eace8

We should use the DIV_ROUND_UP
This commit is contained in:
Susant Sahani 2017-06-26 18:37:38 +05:30
parent c8ec393b25
commit 9c5e117239

View File

@ -527,7 +527,7 @@ int ethtool_set_glinksettings(int *fd, const char *ifname, struct link_config *l
}
if (link->speed)
u->base.speed = link->speed;
u->base.speed = DIV_ROUND_UP(link->speed, 1000000);
if (link->duplex != _DUP_INVALID)
u->base.duplex = link->duplex;