mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
net: net_netdev: 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. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3e3eec0931
commit
a062d19e94
1 changed files with 13 additions and 12 deletions
|
@ -372,18 +372,19 @@ static void ntb_get_drvinfo(struct net_device *ndev,
|
||||||
strlcpy(info->bus_info, pci_name(dev->pdev), sizeof(info->bus_info));
|
strlcpy(info->bus_info, pci_name(dev->pdev), sizeof(info->bus_info));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ntb_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
|
static int ntb_get_link_ksettings(struct net_device *dev,
|
||||||
|
struct ethtool_link_ksettings *cmd)
|
||||||
{
|
{
|
||||||
cmd->supported = SUPPORTED_Backplane;
|
ethtool_link_ksettings_zero_link_mode(cmd, supported);
|
||||||
cmd->advertising = ADVERTISED_Backplane;
|
ethtool_link_ksettings_add_link_mode(cmd, supported, Backplane);
|
||||||
ethtool_cmd_speed_set(cmd, SPEED_UNKNOWN);
|
ethtool_link_ksettings_zero_link_mode(cmd, advertising);
|
||||||
cmd->duplex = DUPLEX_FULL;
|
ethtool_link_ksettings_add_link_mode(cmd, advertising, Backplane);
|
||||||
cmd->port = PORT_OTHER;
|
|
||||||
cmd->phy_address = 0;
|
cmd->base.speed = SPEED_UNKNOWN;
|
||||||
cmd->transceiver = XCVR_DUMMY1;
|
cmd->base.duplex = DUPLEX_FULL;
|
||||||
cmd->autoneg = AUTONEG_ENABLE;
|
cmd->base.port = PORT_OTHER;
|
||||||
cmd->maxtxpkt = 0;
|
cmd->base.phy_address = 0;
|
||||||
cmd->maxrxpkt = 0;
|
cmd->base.autoneg = AUTONEG_ENABLE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -391,7 +392,7 @@ static int ntb_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
|
||||||
static const struct ethtool_ops ntb_ethtool_ops = {
|
static const struct ethtool_ops ntb_ethtool_ops = {
|
||||||
.get_drvinfo = ntb_get_drvinfo,
|
.get_drvinfo = ntb_get_drvinfo,
|
||||||
.get_link = ethtool_op_get_link,
|
.get_link = ethtool_op_get_link,
|
||||||
.get_settings = ntb_get_settings,
|
.get_link_ksettings = ntb_get_link_ksettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ntb_queue_handlers ntb_netdev_handlers = {
|
static const struct ntb_queue_handlers ntb_netdev_handlers = {
|
||||||
|
|
Loading…
Reference in a new issue