net: bridge: use __ethtool_get_ksettings
Signed-off-by: David Decotigny <decot@googlers.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
577097981d
Коммит
702b26a24d
|
@ -36,10 +36,10 @@
|
||||||
*/
|
*/
|
||||||
static int port_cost(struct net_device *dev)
|
static int port_cost(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct ethtool_cmd ecmd;
|
struct ethtool_link_ksettings ecmd;
|
||||||
|
|
||||||
if (!__ethtool_get_settings(dev, &ecmd)) {
|
if (!__ethtool_get_link_ksettings(dev, &ecmd)) {
|
||||||
switch (ethtool_cmd_speed(&ecmd)) {
|
switch (ecmd.base.speed) {
|
||||||
case SPEED_10000:
|
case SPEED_10000:
|
||||||
return 2;
|
return 2;
|
||||||
case SPEED_1000:
|
case SPEED_1000:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче