mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
net: ethernet: dwc_eth_qos: use phy_ethtool_{get|set}_link_ksettings
There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ce554d32eb
commit
8a79813c14
@ -2524,28 +2524,6 @@ dwceqos_get_stats64(struct net_device *ndev, struct rtnl_link_stats64 *s)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
dwceqos_get_settings(struct net_device *ndev, struct ethtool_cmd *ecmd)
|
|
||||||
{
|
|
||||||
struct phy_device *phydev = ndev->phydev;
|
|
||||||
|
|
||||||
if (!phydev)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
return phy_ethtool_gset(phydev, ecmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
dwceqos_set_settings(struct net_device *ndev, struct ethtool_cmd *ecmd)
|
|
||||||
{
|
|
||||||
struct phy_device *phydev = ndev->phydev;
|
|
||||||
|
|
||||||
if (!phydev)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
return phy_ethtool_sset(phydev, ecmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dwceqos_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo *ed)
|
dwceqos_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo *ed)
|
||||||
{
|
{
|
||||||
@ -2764,8 +2742,6 @@ static void dwceqos_set_msglevel(struct net_device *ndev, u32 msglevel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct ethtool_ops dwceqos_ethtool_ops = {
|
static struct ethtool_ops dwceqos_ethtool_ops = {
|
||||||
.get_settings = dwceqos_get_settings,
|
|
||||||
.set_settings = dwceqos_set_settings,
|
|
||||||
.get_drvinfo = dwceqos_get_drvinfo,
|
.get_drvinfo = dwceqos_get_drvinfo,
|
||||||
.get_link = ethtool_op_get_link,
|
.get_link = ethtool_op_get_link,
|
||||||
.get_pauseparam = dwceqos_get_pauseparam,
|
.get_pauseparam = dwceqos_get_pauseparam,
|
||||||
@ -2779,6 +2755,8 @@ static struct ethtool_ops dwceqos_ethtool_ops = {
|
|||||||
.set_eee = dwceqos_set_eee,
|
.set_eee = dwceqos_set_eee,
|
||||||
.get_msglevel = dwceqos_get_msglevel,
|
.get_msglevel = dwceqos_get_msglevel,
|
||||||
.set_msglevel = dwceqos_set_msglevel,
|
.set_msglevel = dwceqos_set_msglevel,
|
||||||
|
.get_link_ksettings = phy_ethtool_get_link_ksettings,
|
||||||
|
.set_link_ksettings = phy_ethtool_set_link_ksettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct net_device_ops netdev_ops = {
|
static struct net_device_ops netdev_ops = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user