From: Alexander Beregalov <a.beregalov@gmail.com>
To: netdev@vger.kernel.org
Subject: [PATCH 03/11] tc35815: convert to net_device_ops
Date: Sat, 11 Apr 2009 21:38:54 +0400 [thread overview]
Message-ID: <20090411173854.GC16999@orion> (raw)
In-Reply-To: <20090411173019.GA16999@orion>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/net/tc35815.c | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index d91e95b..0ce2db6 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -862,6 +862,22 @@ static int __devinit tc35815_init_dev_addr(struct net_device *dev)
return 0;
}
+static const struct net_device_ops tc35815_netdev_ops = {
+ .ndo_open = tc35815_open,
+ .ndo_stop = tc35815_close,
+ .ndo_start_xmit = tc35815_send_packet,
+ .ndo_get_stats = tc35815_get_stats,
+ .ndo_set_multicast_list = tc35815_set_multicast_list,
+ .ndo_tx_timeout = tc35815_tx_timeout,
+ .ndo_do_ioctl = tc35815_ioctl,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_change_mtu = eth_change_mtu,
+ .ndo_set_mac_address = eth_mac_addr,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = tc35815_poll_controller,
+#endif
+};
+
static int __devinit tc35815_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
@@ -904,21 +920,12 @@ static int __devinit tc35815_init_one(struct pci_dev *pdev,
ioaddr = pcim_iomap_table(pdev)[1];
/* Initialize the device structure. */
- dev->open = tc35815_open;
- dev->hard_start_xmit = tc35815_send_packet;
- dev->stop = tc35815_close;
- dev->get_stats = tc35815_get_stats;
- dev->set_multicast_list = tc35815_set_multicast_list;
- dev->do_ioctl = tc35815_ioctl;
+ dev->netdev_ops = &tc35815_netdev_ops;
dev->ethtool_ops = &tc35815_ethtool_ops;
- dev->tx_timeout = tc35815_tx_timeout;
dev->watchdog_timeo = TC35815_TX_TIMEOUT;
#ifdef TC35815_NAPI
netif_napi_add(dev, &lp->napi, tc35815_poll, NAPI_WEIGHT);
#endif
-#ifdef CONFIG_NET_POLL_CONTROLLER
- dev->poll_controller = tc35815_poll_controller;
-#endif
dev->irq = pdev->irq;
dev->base_addr = (unsigned long)ioaddr;
next prev parent reply other threads:[~2009-04-11 17:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-11 17:30 [PATCH 01/11] xtsonic: convert to net_device_ops Alexander Beregalov
2009-04-11 17:37 ` [PATCH 02/11] tsi108_eth: " Alexander Beregalov
2009-04-13 22:19 ` David Miller
2009-04-11 17:38 ` Alexander Beregalov [this message]
2009-04-13 22:19 ` [PATCH 03/11] tc35815: " David Miller
2009-04-11 17:39 ` [PATCH 04/11] sun3_82586: " Alexander Beregalov
2009-04-13 22:19 ` David Miller
2009-04-11 17:40 ` [PATCH 05/11] sh_eth: " Alexander Beregalov
2009-04-13 22:19 ` David Miller
2009-04-11 17:41 ` [PATCH 06/11] macsonic: " Alexander Beregalov
2009-04-13 22:19 ` David Miller
2009-04-11 17:42 ` [PATCH 07/11] macb: " Alexander Beregalov
2009-04-13 22:19 ` David Miller
2009-04-11 17:43 ` [PATCH 08/11] mac89x0: " Alexander Beregalov
2009-04-13 22:19 ` David Miller
2009-04-11 17:44 ` [PATCH 09/11] isa-skeleton: " Alexander Beregalov
2009-04-13 22:19 ` David Miller
2009-04-11 17:44 ` [PATCH 10/11] ioc3-eth: " Alexander Beregalov
2009-04-13 22:19 ` David Miller
2009-04-11 17:45 ` [PATCH 11/11] eth_v10: " Alexander Beregalov
2009-04-13 22:20 ` David Miller
2009-04-13 22:19 ` [PATCH 01/11] xtsonic: " David Miller
2009-04-13 23:12 ` Alexander Beregalov
2009-04-13 23:19 ` 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=20090411173854.GC16999@orion \
--to=a.beregalov@gmail.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;
as well as URLs for NNTP newsgroup(s).