mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 01:51:53 +00:00
net: dsa: add ethtool pause configuration support
This patch adds glue logic to make pause settings per port configurable vie ethtool. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1d7a55267f
commit
a2a1a13b81
@ -789,6 +789,22 @@ static int dsa_slave_set_link_ksettings(struct net_device *dev,
|
|||||||
return phylink_ethtool_ksettings_set(dp->pl, cmd);
|
return phylink_ethtool_ksettings_set(dp->pl, cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dsa_slave_get_pauseparam(struct net_device *dev,
|
||||||
|
struct ethtool_pauseparam *pause)
|
||||||
|
{
|
||||||
|
struct dsa_port *dp = dsa_slave_to_port(dev);
|
||||||
|
|
||||||
|
phylink_ethtool_get_pauseparam(dp->pl, pause);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int dsa_slave_set_pauseparam(struct net_device *dev,
|
||||||
|
struct ethtool_pauseparam *pause)
|
||||||
|
{
|
||||||
|
struct dsa_port *dp = dsa_slave_to_port(dev);
|
||||||
|
|
||||||
|
return phylink_ethtool_set_pauseparam(dp->pl, pause);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
static int dsa_slave_netpoll_setup(struct net_device *dev,
|
static int dsa_slave_netpoll_setup(struct net_device *dev,
|
||||||
struct netpoll_info *ni)
|
struct netpoll_info *ni)
|
||||||
@ -1192,6 +1208,8 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
|
|||||||
.get_eee = dsa_slave_get_eee,
|
.get_eee = dsa_slave_get_eee,
|
||||||
.get_link_ksettings = dsa_slave_get_link_ksettings,
|
.get_link_ksettings = dsa_slave_get_link_ksettings,
|
||||||
.set_link_ksettings = dsa_slave_set_link_ksettings,
|
.set_link_ksettings = dsa_slave_set_link_ksettings,
|
||||||
|
.get_pauseparam = dsa_slave_get_pauseparam,
|
||||||
|
.set_pauseparam = dsa_slave_set_pauseparam,
|
||||||
.get_rxnfc = dsa_slave_get_rxnfc,
|
.get_rxnfc = dsa_slave_get_rxnfc,
|
||||||
.set_rxnfc = dsa_slave_set_rxnfc,
|
.set_rxnfc = dsa_slave_set_rxnfc,
|
||||||
.get_ts_info = dsa_slave_get_ts_info,
|
.get_ts_info = dsa_slave_get_ts_info,
|
||||||
|
Loading…
Reference in New Issue
Block a user