mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Marc Gauthier <marc@cadence.com>,
	Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH 1/4] net: ethoc: implement basic ethtool operations
Date: Wed, 29 Jan 2014 23:56:34 +0400	[thread overview]
Message-ID: <1391025397-14965-2-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1391025397-14965-1-git-send-email-jcmvbkbc@gmail.com>

The following methods are implemented:
- get link state (standard implementation);
- get timestamping info (standard implementation).

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 drivers/net/ethernet/ethoc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index 5854d41..6de6352 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -900,6 +900,11 @@ out:
 	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 = {
 	.ndo_open = ethoc_open,
 	.ndo_stop = ethoc_stop,
@@ -1148,6 +1153,7 @@ static int ethoc_probe(struct platform_device *pdev)
 	netdev->netdev_ops = &ethoc_netdev_ops;
 	netdev->watchdog_timeo = ETHOC_TIMEOUT;
 	netdev->features |= 0;
+	netdev->ethtool_ops = &ethoc_ethtool_ops;
 
 	/* setup NAPI */
 	netif_napi_add(netdev, &priv->napi, ethoc_poll, 64);
-- 
1.8.1.4


  reply	other threads:[~2014-01-29 19:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 19:56 [PATCH 0/4] OpenCores 10/100 MAC " Max Filippov
2014-01-29 19:56 ` Max Filippov [this message]
2014-01-30 13:59   ` [PATCH 1/4] net: ethoc: implement basic " Ben Hutchings
2014-01-29 19:56 ` [PATCH 2/4] net: ethoc: implement ethtool get/set settings Max Filippov
2014-01-29 19:56 ` [PATCH 3/4] net: ethoc: implement ethtool get registers Max Filippov
2014-01-30 14:01   ` Ben Hutchings
2014-01-29 19:56 ` [PATCH 4/4] net: ethoc: implement ethtool get/set ring parameters Max Filippov
2014-01-29 20:01 ` [PATCH 0/4] OpenCores 10/100 MAC ethtool operations Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391025397-14965-2-git-send-email-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc@cadence.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome