diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2014-01-31 00:41:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-01 19:56:48 -0500 |
commit | fba9110c47855050b38a5a19bbcd3728b5f21bfe (patch) | |
tree | c2da243c7012b7befbd536223ba18f5c0c702c18 /drivers/net | |
parent | 65b80cae7a72e94df9335552e1a77a3a8946566c (diff) |
net: ethoc: implement basic ethtool operations
The following methods are implemented:
- get link state (standard implementation);
- get timestamping info (standard implementation).
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/ethoc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index 4de8cfd149cf..0623c20131bb 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c | |||
@@ -890,6 +890,11 @@ out: | |||
890 | return NETDEV_TX_OK; | 890 | return NETDEV_TX_OK; |
891 | } | 891 | } |
892 | 892 | ||
893 | const struct ethtool_ops ethoc_ethtool_ops = { | ||
894 | .get_link = ethtool_op_get_link, | ||
895 | .get_ts_info = ethtool_op_get_ts_info, | ||
896 | }; | ||
897 | |||
893 | static const struct net_device_ops ethoc_netdev_ops = { | 898 | static const struct net_device_ops ethoc_netdev_ops = { |
894 | .ndo_open = ethoc_open, | 899 | .ndo_open = ethoc_open, |
895 | .ndo_stop = ethoc_stop, | 900 | .ndo_stop = ethoc_stop, |
@@ -1111,6 +1116,7 @@ static int ethoc_probe(struct platform_device *pdev) | |||
1111 | netdev->netdev_ops = ðoc_netdev_ops; | 1116 | netdev->netdev_ops = ðoc_netdev_ops; |
1112 | netdev->watchdog_timeo = ETHOC_TIMEOUT; | 1117 | netdev->watchdog_timeo = ETHOC_TIMEOUT; |
1113 | netdev->features |= 0; | 1118 | netdev->features |= 0; |
1119 | netdev->ethtool_ops = ðoc_ethtool_ops; | ||
1114 | 1120 | ||
1115 | /* setup NAPI */ | 1121 | /* setup NAPI */ |
1116 | netif_napi_add(netdev, &priv->napi, ethoc_poll, 64); | 1122 | netif_napi_add(netdev, &priv->napi, ethoc_poll, 64); |