diff options
author | Valentine Barshak <vbarshak@ru.mvista.com> | 2009-10-12 07:25:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-12 16:26:39 -0400 |
commit | 5402240c0bc621ef6865c80043bda30a29365948 (patch) | |
tree | 4c450c64a194b7c50f50a88eddabb3df595823de /drivers/net/pasemi_mac_ethtool.c | |
parent | fad9ab2cefd3a3b4754f49eb41e2f43ea314cdce (diff) |
pasemi_mac: ethtool set settings support
Add ethtool set settings to pasemi_mac_ethtool.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pasemi_mac_ethtool.c')
-rw-r--r-- | drivers/net/pasemi_mac_ethtool.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/pasemi_mac_ethtool.c b/drivers/net/pasemi_mac_ethtool.c index 28a86224879d..fefa79e34b95 100644 --- a/drivers/net/pasemi_mac_ethtool.c +++ b/drivers/net/pasemi_mac_ethtool.c | |||
@@ -77,6 +77,19 @@ pasemi_mac_ethtool_get_settings(struct net_device *netdev, | |||
77 | return phy_ethtool_gset(phydev, cmd); | 77 | return phy_ethtool_gset(phydev, cmd); |
78 | } | 78 | } |
79 | 79 | ||
80 | static int | ||
81 | pasemi_mac_ethtool_set_settings(struct net_device *netdev, | ||
82 | struct ethtool_cmd *cmd) | ||
83 | { | ||
84 | struct pasemi_mac *mac = netdev_priv(netdev); | ||
85 | struct phy_device *phydev = mac->phydev; | ||
86 | |||
87 | if (!phydev) | ||
88 | return -EOPNOTSUPP; | ||
89 | |||
90 | return phy_ethtool_sset(phydev, cmd); | ||
91 | } | ||
92 | |||
80 | static void | 93 | static void |
81 | pasemi_mac_ethtool_get_drvinfo(struct net_device *netdev, | 94 | pasemi_mac_ethtool_get_drvinfo(struct net_device *netdev, |
82 | struct ethtool_drvinfo *drvinfo) | 95 | struct ethtool_drvinfo *drvinfo) |
@@ -150,6 +163,7 @@ static void pasemi_mac_get_strings(struct net_device *netdev, u32 stringset, | |||
150 | 163 | ||
151 | const struct ethtool_ops pasemi_mac_ethtool_ops = { | 164 | const struct ethtool_ops pasemi_mac_ethtool_ops = { |
152 | .get_settings = pasemi_mac_ethtool_get_settings, | 165 | .get_settings = pasemi_mac_ethtool_get_settings, |
166 | .set_settings = pasemi_mac_ethtool_set_settings, | ||
153 | .get_drvinfo = pasemi_mac_ethtool_get_drvinfo, | 167 | .get_drvinfo = pasemi_mac_ethtool_get_drvinfo, |
154 | .get_msglevel = pasemi_mac_ethtool_get_msglevel, | 168 | .get_msglevel = pasemi_mac_ethtool_get_msglevel, |
155 | .set_msglevel = pasemi_mac_ethtool_set_msglevel, | 169 | .set_msglevel = pasemi_mac_ethtool_set_msglevel, |