aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-16 11:48:17 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-17 04:14:53 -0400
commitd32da050a340214c5dae0d014e39f75548cac2f2 (patch)
treede659d52413447b8dc4fd482d087e7f873b2a87a /drivers/net/wan
parentf6a2629353718e588820b731af43a445b6f35648 (diff)
wan/pc300_drv: convert to net_device_ops
On Fri, Apr 17, 2009 at 05:23:02AM +0400, Alexander Beregalov wrote: > > Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> > --- > drivers/net/wan/pc300_drv.c | 22 ++++++++++++++-------- > 1 files changed, 14 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c > index c23fde0..df10a4c 100644 > --- a/drivers/net/wan/pc300_drv.c > +++ b/drivers/net/wan/pc300_drv.c > @@ -225,6 +225,7 @@ static char rcsid[] = > #include <linux/skbuff.h> > #include <linux/if_arp.h> > #include <linux/netdevice.h> > +#include <linux/etherdevice.h> > #include <linux/spinlock.h> > #include <linux/if.h> > #include <net/arp.h> > @@ -3246,6 +3247,18 @@ static inline void show_version(void) > rcsvers, rcsdate, __DATE__, __TIME__); > } /* show_version */ > > +static const struct net_device_ops cpc_netdev_ops = { > + .ndo_init = NULL, > + .ndo_open = cpc_open, > + .ndo_stop = cpc_close, > + .ndo_tx_timeout = cpc_tx_timeout, > + .ndo_set_multicast_list = NULL, In this case ndo_init and ndo_set_multicast_list are not needed. >From 1507a5a797a5f0005696a9bf10e390caca9c3800 Mon Sep 17 00:00:00 2001 From: Alexander Beregalov <a.beregalov@gmail.com> Date: Fri, 17 Apr 2009 05:45:48 +0400 Subject: [PATCH] wan/pc300_drv: convert to net_device_ops Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/pc300_drv.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index c23fde0c0344..79dabc557bd3 100644
--- a/drivers/net/wan/pc300_drv.c
+++ b/drivers/net/wan/pc300_drv.c
@@ -225,6 +225,7 @@ static char rcsid[] =
225#include <linux/skbuff.h> 225#include <linux/skbuff.h>
226#include <linux/if_arp.h> 226#include <linux/if_arp.h>
227#include <linux/netdevice.h> 227#include <linux/netdevice.h>
228#include <linux/etherdevice.h>
228#include <linux/spinlock.h> 229#include <linux/spinlock.h>
229#include <linux/if.h> 230#include <linux/if.h>
230#include <net/arp.h> 231#include <net/arp.h>
@@ -3246,6 +3247,16 @@ static inline void show_version(void)
3246 rcsvers, rcsdate, __DATE__, __TIME__); 3247 rcsvers, rcsdate, __DATE__, __TIME__);
3247} /* show_version */ 3248} /* show_version */
3248 3249
3250static const struct net_device_ops cpc_netdev_ops = {
3251 .ndo_open = cpc_open,
3252 .ndo_stop = cpc_close,
3253 .ndo_tx_timeout = cpc_tx_timeout,
3254 .ndo_set_mac_address = NULL,
3255 .ndo_change_mtu = cpc_change_mtu,
3256 .ndo_do_ioctl = cpc_ioctl,
3257 .ndo_validate_addr = eth_validate_addr,
3258};
3259
3249static void cpc_init_card(pc300_t * card) 3260static void cpc_init_card(pc300_t * card)
3250{ 3261{
3251 int i, devcount = 0; 3262 int i, devcount = 0;
@@ -3357,18 +3368,11 @@ static void cpc_init_card(pc300_t * card)
3357 dev->mem_start = card->hw.ramphys; 3368 dev->mem_start = card->hw.ramphys;
3358 dev->mem_end = card->hw.ramphys + card->hw.ramsize - 1; 3369 dev->mem_end = card->hw.ramphys + card->hw.ramsize - 1;
3359 dev->irq = card->hw.irq; 3370 dev->irq = card->hw.irq;
3360 dev->init = NULL;
3361 dev->tx_queue_len = PC300_TX_QUEUE_LEN; 3371 dev->tx_queue_len = PC300_TX_QUEUE_LEN;
3362 dev->mtu = PC300_DEF_MTU; 3372 dev->mtu = PC300_DEF_MTU;
3363 3373
3364 dev->open = cpc_open; 3374 dev->netdev_ops = &cpc_netdev_ops;
3365 dev->stop = cpc_close;
3366 dev->tx_timeout = cpc_tx_timeout;
3367 dev->watchdog_timeo = PC300_TX_TIMEOUT; 3375 dev->watchdog_timeo = PC300_TX_TIMEOUT;
3368 dev->set_multicast_list = NULL;
3369 dev->set_mac_address = NULL;
3370 dev->change_mtu = cpc_change_mtu;
3371 dev->do_ioctl = cpc_ioctl;
3372 3376
3373 if (register_hdlc_device(dev) == 0) { 3377 if (register_hdlc_device(dev) == 0) {
3374 printk("%s: Cyclades-PC300/", dev->name); 3378 printk("%s: Cyclades-PC300/", dev->name);