From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [patch 04/14] smc: convert to net_device_ops
Date: Tue, 25 Nov 2008 17:14:23 -0800 [thread overview]
Message-ID: <20081126011545.505564954@linux-foundation.org> (raw)
In-Reply-To: 20081126011419.402319779@linux-foundation.org
[-- Attachment #1: smc-netdev-ops.patch --]
[-- Type: text/plain, Size: 2311 bytes --]
Convert both eisa and mca versions of this driver, though I doubt
anyone still has the hardware.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/smc-mca.c 2008-11-25 16:23:38.000000000 -0800
+++ b/drivers/net/smc-mca.c 2008-11-25 16:41:33.000000000 -0800
@@ -182,6 +182,22 @@ static char *smc_mca_adapter_names[] __i
static int ultra_found = 0;
+
+static const struct net_device_ops ultra_netdev_ops = {
+ .ndo_open = ultramca_open,
+ .ndo_stop = ultramca_close_card,
+
+ .ndo_start_xmit = ei_start_xmit,
+ .ndo_tx_timeout = ei_tx_timeout,
+ .ndo_get_stats = ei_get_stats,
+ .ndo_set_multicast_list = ei_set_multicast_list,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_change_mtu = eth_change_mtu,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = ei_poll,
+#endif
+};
+
static int __init ultramca_probe(struct device *gen_dev)
{
unsigned short ioaddr;
@@ -384,11 +400,7 @@ static int __init ultramca_probe(struct
ei_status.priv = slot;
- dev->open = &ultramca_open;
- dev->stop = &ultramca_close_card;
-#ifdef CONFIG_NET_POLL_CONTROLLER
- dev->poll_controller = ei_poll;
-#endif
+ dev->netdev_ops = &ultramca_netdev_ops;
NS8390_init(dev, 0);
--- a/drivers/net/smc-ultra.c 2008-11-25 16:23:38.000000000 -0800
+++ b/drivers/net/smc-ultra.c 2008-11-25 16:41:33.000000000 -0800
@@ -187,6 +187,21 @@ out:
}
#endif
+static const struct net_device_ops ultra_netdev_ops = {
+ .ndo_open = ultra_open,
+ .ndo_stop = ultra_close_card,
+
+ .ndo_start_xmit = ei_start_xmit,
+ .ndo_tx_timeout = ei_tx_timeout,
+ .ndo_get_stats = ei_get_stats,
+ .ndo_set_multicast_list = ei_set_multicast_list,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_change_mtu = eth_change_mtu,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = ei_poll,
+#endif
+};
+
static int __init ultra_probe1(struct net_device *dev, int ioaddr)
{
int i, retval;
@@ -300,11 +315,8 @@ static int __init ultra_probe1(struct ne
ei_status.get_8390_hdr = &ultra_get_8390_hdr;
}
ei_status.reset_8390 = &ultra_reset_8390;
- dev->open = &ultra_open;
- dev->stop = &ultra_close_card;
-#ifdef CONFIG_NET_POLL_CONTROLLER
- dev->poll_controller = ei_poll;
-#endif
+
+ dev->netdev_ops = &ultra_netdev_ops;
NS8390_init(dev, 0);
retval = register_netdev(dev);
next prev parent reply other threads:[~2008-11-26 1:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 1:14 [patch 00/14] Network devices ops (wave 4) Stephen Hemminger
2008-11-26 1:14 ` [patch 01/14] 8390: add common net_device ops Stephen Hemminger
2008-11-26 1:14 ` [patch 02/14] wd: use net_device_ops Stephen Hemminger
2008-11-26 1:14 ` [patch 03/14] hp-plus: convert to net_device_ops Stephen Hemminger
2008-11-26 1:14 ` Stephen Hemminger [this message]
2008-11-26 1:14 ` [patch 05/14] ne3210: " Stephen Hemminger
2008-11-26 1:14 ` [patch 06/14] es3210: " Stephen Hemminger
2008-11-26 1:14 ` [patch 07/14] e2100: " Stephen Hemminger
2008-11-26 1:14 ` [patch 08/14] lne390: " Stephen Hemminger
2008-11-26 1:14 ` [patch 09/14] hp: " Stephen Hemminger
2008-11-26 1:14 ` [patch 10/14] ne2: " Stephen Hemminger
2008-11-26 1:14 ` [patch 11/14] apne: " Stephen Hemminger
2008-11-26 1:14 ` [patch 12/14] stnic: " Stephen Hemminger
2008-11-26 1:14 ` [patch 13/14] 3c503: " Stephen Hemminger
2008-11-26 1:14 ` [patch 14/14] ne2000: " Stephen Hemminger
2008-11-26 5:06 ` [patch 00/14] Network devices ops (wave 4) David Miller
2008-11-26 9:53 ` David Miller
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=20081126011545.505564954@linux-foundation.org \
--to=shemminger@linux-foundation.org \
--cc=davem@davemloft.net \
--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;
as well as URLs for NNTP newsgroup(s).