mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-04 03:33:58 +08:00
net: calxeda: xgmac: use new api ethtool_{get|set}_link_ksettings
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5397b31bce
commit
b0da4f743d
@ -1530,15 +1530,14 @@ static const struct net_device_ops xgmac_netdev_ops = {
|
|||||||
.ndo_set_features = xgmac_set_features,
|
.ndo_set_features = xgmac_set_features,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int xgmac_ethtool_getsettings(struct net_device *dev,
|
static int xgmac_ethtool_get_link_ksettings(struct net_device *dev,
|
||||||
struct ethtool_cmd *cmd)
|
struct ethtool_link_ksettings *cmd)
|
||||||
{
|
{
|
||||||
cmd->autoneg = 0;
|
cmd->base.autoneg = 0;
|
||||||
cmd->duplex = DUPLEX_FULL;
|
cmd->base.duplex = DUPLEX_FULL;
|
||||||
ethtool_cmd_speed_set(cmd, 10000);
|
cmd->base.speed = 10000;
|
||||||
cmd->supported = 0;
|
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, 0);
|
||||||
cmd->advertising = 0;
|
ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, 0);
|
||||||
cmd->transceiver = XCVR_INTERNAL;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1681,7 +1680,6 @@ static int xgmac_set_wol(struct net_device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct ethtool_ops xgmac_ethtool_ops = {
|
static const struct ethtool_ops xgmac_ethtool_ops = {
|
||||||
.get_settings = xgmac_ethtool_getsettings,
|
|
||||||
.get_link = ethtool_op_get_link,
|
.get_link = ethtool_op_get_link,
|
||||||
.get_pauseparam = xgmac_get_pauseparam,
|
.get_pauseparam = xgmac_get_pauseparam,
|
||||||
.set_pauseparam = xgmac_set_pauseparam,
|
.set_pauseparam = xgmac_set_pauseparam,
|
||||||
@ -1690,6 +1688,7 @@ static const struct ethtool_ops xgmac_ethtool_ops = {
|
|||||||
.get_wol = xgmac_get_wol,
|
.get_wol = xgmac_get_wol,
|
||||||
.set_wol = xgmac_set_wol,
|
.set_wol = xgmac_set_wol,
|
||||||
.get_sset_count = xgmac_get_sset_count,
|
.get_sset_count = xgmac_get_sset_count,
|
||||||
|
.get_link_ksettings = xgmac_ethtool_get_link_ksettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user