Commit fba9110c authored by Max Filippov's avatar Max Filippov Committed by David S. Miller

net: ethoc: implement basic ethtool operations

The following methods are implemented:
- get link state (standard implementation);
- get timestamping info (standard implementation).
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 65b80cae
...@@ -890,6 +890,11 @@ static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -890,6 +890,11 @@ static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
const struct ethtool_ops ethoc_ethtool_ops = {
.get_link = ethtool_op_get_link,
.get_ts_info = ethtool_op_get_ts_info,
};
static const struct net_device_ops ethoc_netdev_ops = { static const struct net_device_ops ethoc_netdev_ops = {
.ndo_open = ethoc_open, .ndo_open = ethoc_open,
.ndo_stop = ethoc_stop, .ndo_stop = ethoc_stop,
...@@ -1111,6 +1116,7 @@ static int ethoc_probe(struct platform_device *pdev) ...@@ -1111,6 +1116,7 @@ static int ethoc_probe(struct platform_device *pdev)
netdev->netdev_ops = &ethoc_netdev_ops; netdev->netdev_ops = &ethoc_netdev_ops;
netdev->watchdog_timeo = ETHOC_TIMEOUT; netdev->watchdog_timeo = ETHOC_TIMEOUT;
netdev->features |= 0; netdev->features |= 0;
netdev->ethtool_ops = &ethoc_ethtool_ops;
/* setup NAPI */ /* setup NAPI */
netif_napi_add(netdev, &priv->napi, ethoc_poll, 64); netif_napi_add(netdev, &priv->napi, ethoc_poll, 64);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment