]> Pileus Git - ~andy/linux/commitdiff
pasemi_mac: ethtool set settings support
authorValentine Barshak <vbarshak@ru.mvista.com>
Mon, 12 Oct 2009 11:25:05 +0000 (04:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Oct 2009 20:26:39 +0000 (13:26 -0700)
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>
drivers/net/pasemi_mac_ethtool.c

index 28a86224879db42187fae1adffcca056236b79b0..fefa79e34b95c43386ef1488cfbb673f1d4af886 100644 (file)
@@ -77,6 +77,19 @@ pasemi_mac_ethtool_get_settings(struct net_device *netdev,
        return phy_ethtool_gset(phydev, cmd);
 }
 
+static int
+pasemi_mac_ethtool_set_settings(struct net_device *netdev,
+                              struct ethtool_cmd *cmd)
+{
+       struct pasemi_mac *mac = netdev_priv(netdev);
+       struct phy_device *phydev = mac->phydev;
+
+       if (!phydev)
+               return -EOPNOTSUPP;
+
+       return phy_ethtool_sset(phydev, cmd);
+}
+
 static void
 pasemi_mac_ethtool_get_drvinfo(struct net_device *netdev,
                               struct ethtool_drvinfo *drvinfo)
@@ -150,6 +163,7 @@ static void pasemi_mac_get_strings(struct net_device *netdev, u32 stringset,
 
 const struct ethtool_ops pasemi_mac_ethtool_ops = {
        .get_settings           = pasemi_mac_ethtool_get_settings,
+       .set_settings           = pasemi_mac_ethtool_set_settings,
        .get_drvinfo            = pasemi_mac_ethtool_get_drvinfo,
        .get_msglevel           = pasemi_mac_ethtool_get_msglevel,
        .set_msglevel           = pasemi_mac_ethtool_set_msglevel,