diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-08-17 05:31:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-17 05:31:15 -0400 |
commit | 01414802054c382072b6cb9a1bdc6e243c74b2d5 (patch) | |
tree | f09b05eb9fff16a69d83ec28653992d1bae8d74c /drivers/net/pasemi_mac_ethtool.c | |
parent | bb8a10bbd10a45db0eb45bac520489bdbc0917ef (diff) |
ethtool: Provide a default implementation of ethtool_ops::get_drvinfo
The driver name and bus address for a net_device can normally be found
through the driver model now. Instead of requiring drivers to provide
this information redundantly through the ethtool_ops::get_drvinfo
operation, use the driver model to do so if the driver does not define
the operation. Since ETHTOOL_GDRVINFO no longer requires the driver
to implement any operations, do not require net_device::ethtool_ops to
be set either.
Remove implementations of get_drvinfo and ethtool_ops that provide
only this information.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
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 | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/pasemi_mac_ethtool.c b/drivers/net/pasemi_mac_ethtool.c index fefa79e34b95..4825959a0efe 100644 --- a/drivers/net/pasemi_mac_ethtool.c +++ b/drivers/net/pasemi_mac_ethtool.c | |||
@@ -90,21 +90,6 @@ pasemi_mac_ethtool_set_settings(struct net_device *netdev, | |||
90 | return phy_ethtool_sset(phydev, cmd); | 90 | return phy_ethtool_sset(phydev, cmd); |
91 | } | 91 | } |
92 | 92 | ||
93 | static void | ||
94 | pasemi_mac_ethtool_get_drvinfo(struct net_device *netdev, | ||
95 | struct ethtool_drvinfo *drvinfo) | ||
96 | { | ||
97 | struct pasemi_mac *mac; | ||
98 | mac = netdev_priv(netdev); | ||
99 | |||
100 | /* clear and fill out info */ | ||
101 | memset(drvinfo, 0, sizeof(struct ethtool_drvinfo)); | ||
102 | strncpy(drvinfo->driver, "pasemi_mac", 12); | ||
103 | strcpy(drvinfo->version, "N/A"); | ||
104 | strcpy(drvinfo->fw_version, "N/A"); | ||
105 | strncpy(drvinfo->bus_info, pci_name(mac->pdev), 32); | ||
106 | } | ||
107 | |||
108 | static u32 | 93 | static u32 |
109 | pasemi_mac_ethtool_get_msglevel(struct net_device *netdev) | 94 | pasemi_mac_ethtool_get_msglevel(struct net_device *netdev) |
110 | { | 95 | { |
@@ -164,7 +149,6 @@ static void pasemi_mac_get_strings(struct net_device *netdev, u32 stringset, | |||
164 | const struct ethtool_ops pasemi_mac_ethtool_ops = { | 149 | const struct ethtool_ops pasemi_mac_ethtool_ops = { |
165 | .get_settings = pasemi_mac_ethtool_get_settings, | 150 | .get_settings = pasemi_mac_ethtool_get_settings, |
166 | .set_settings = pasemi_mac_ethtool_set_settings, | 151 | .set_settings = pasemi_mac_ethtool_set_settings, |
167 | .get_drvinfo = pasemi_mac_ethtool_get_drvinfo, | ||
168 | .get_msglevel = pasemi_mac_ethtool_get_msglevel, | 152 | .get_msglevel = pasemi_mac_ethtool_get_msglevel, |
169 | .set_msglevel = pasemi_mac_ethtool_set_msglevel, | 153 | .set_msglevel = pasemi_mac_ethtool_set_msglevel, |
170 | .get_link = ethtool_op_get_link, | 154 | .get_link = ethtool_op_get_link, |