netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops
@ 2009-04-17  1:23 Alexander Beregalov
  2009-04-17  1:23 ` [PATCH -next 2/2] irda: include etherdevice.h for eth_*() functions Alexander Beregalov
  2009-04-17  1:48 ` [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops Alexander Beregalov
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Beregalov @ 2009-04-17  1:23 UTC (permalink / raw)
  To: netdev; +Cc: Alexander Beregalov


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,
+	.ndo_set_mac_address	= NULL,
+	.ndo_change_mtu		= cpc_change_mtu,
+	.ndo_do_ioctl		= cpc_ioctl,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static void cpc_init_card(pc300_t * card)
 {
 	int i, devcount = 0;
@@ -3357,18 +3370,11 @@ static void cpc_init_card(pc300_t * card)
 		dev->mem_start = card->hw.ramphys;
 		dev->mem_end = card->hw.ramphys + card->hw.ramsize - 1;
 		dev->irq = card->hw.irq;
-		dev->init = NULL;
 		dev->tx_queue_len = PC300_TX_QUEUE_LEN;
 		dev->mtu = PC300_DEF_MTU;
 
-		dev->open = cpc_open;
-		dev->stop = cpc_close;
-		dev->tx_timeout = cpc_tx_timeout;
+		dev->netdev_ops = &cpc_netdev_ops;
 		dev->watchdog_timeo = PC300_TX_TIMEOUT;
-		dev->set_multicast_list = NULL;
-		dev->set_mac_address = NULL;
-		dev->change_mtu = cpc_change_mtu;
-		dev->do_ioctl = cpc_ioctl;
 
 		if (register_hdlc_device(dev) == 0) {
 			printk("%s: Cyclades-PC300/", dev->name);
-- 
1.6.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH -next 2/2] irda: include etherdevice.h for eth_*() functions
  2009-04-17  1:23 [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops Alexander Beregalov
@ 2009-04-17  1:23 ` Alexander Beregalov
  2009-04-17  8:15   ` David Miller
  2009-04-17  1:48 ` [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops Alexander Beregalov
  1 sibling, 1 reply; 5+ messages in thread
From: Alexander Beregalov @ 2009-04-17  1:23 UTC (permalink / raw)
  To: netdev; +Cc: Alexander Beregalov


Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
 drivers/net/irda/au1k_ir.c    |    1 +
 drivers/net/irda/pxaficp_ir.c |    1 +
 drivers/net/irda/sa1100_ir.c  |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index 204def0..269153e 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -23,6 +23,7 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
+#include <linux/etherdevice.h>
 #include <linux/slab.h>
 #include <linux/rtnetlink.h>
 #include <linux/interrupt.h>
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index e8ced56..3376a4f 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -14,6 +14,7 @@
  */
 #include <linux/module.h>
 #include <linux/netdevice.h>
+#include <linux/etherdevice.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 44a748e..4ed7636 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -24,6 +24,7 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
+#include <linux/etherdevice.h>
 #include <linux/slab.h>
 #include <linux/rtnetlink.h>
 #include <linux/interrupt.h>
-- 
1.6.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops
  2009-04-17  1:23 [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops Alexander Beregalov
  2009-04-17  1:23 ` [PATCH -next 2/2] irda: include etherdevice.h for eth_*() functions Alexander Beregalov
@ 2009-04-17  1:48 ` Alexander Beregalov
  2009-04-17  8:15   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Alexander Beregalov @ 2009-04-17  1:48 UTC (permalink / raw)
  To: netdev

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>
---
 drivers/net/wan/pc300_drv.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index c23fde0..79dabc5 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,16 @@ static inline void show_version(void)
 		rcsvers, rcsdate, __DATE__, __TIME__);
 }				/* show_version */
 
+static const struct net_device_ops cpc_netdev_ops = {
+	.ndo_open		= cpc_open,
+	.ndo_stop		= cpc_close,
+	.ndo_tx_timeout		= cpc_tx_timeout,
+	.ndo_set_mac_address	= NULL,
+	.ndo_change_mtu		= cpc_change_mtu,
+	.ndo_do_ioctl		= cpc_ioctl,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
 static void cpc_init_card(pc300_t * card)
 {
 	int i, devcount = 0;
@@ -3357,18 +3368,11 @@ static void cpc_init_card(pc300_t * card)
 		dev->mem_start = card->hw.ramphys;
 		dev->mem_end = card->hw.ramphys + card->hw.ramsize - 1;
 		dev->irq = card->hw.irq;
-		dev->init = NULL;
 		dev->tx_queue_len = PC300_TX_QUEUE_LEN;
 		dev->mtu = PC300_DEF_MTU;
 
-		dev->open = cpc_open;
-		dev->stop = cpc_close;
-		dev->tx_timeout = cpc_tx_timeout;
+		dev->netdev_ops = &cpc_netdev_ops;
 		dev->watchdog_timeo = PC300_TX_TIMEOUT;
-		dev->set_multicast_list = NULL;
-		dev->set_mac_address = NULL;
-		dev->change_mtu = cpc_change_mtu;
-		dev->do_ioctl = cpc_ioctl;
 
 		if (register_hdlc_device(dev) == 0) {
 			printk("%s: Cyclades-PC300/", dev->name);
-- 
1.6.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next 2/2] irda: include etherdevice.h for eth_*() functions
  2009-04-17  1:23 ` [PATCH -next 2/2] irda: include etherdevice.h for eth_*() functions Alexander Beregalov
@ 2009-04-17  8:15   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2009-04-17  8:15 UTC (permalink / raw)
  To: a.beregalov; +Cc: netdev

From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Fri, 17 Apr 2009 05:23:03 +0400

> 
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops
  2009-04-17  1:48 ` [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops Alexander Beregalov
@ 2009-04-17  8:15   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2009-04-17  8:15 UTC (permalink / raw)
  To: a.beregalov; +Cc: netdev

From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Fri, 17 Apr 2009 05:48:17 +0400

> On Fri, Apr 17, 2009 at 05:23:02AM +0400, Alexander Beregalov wrote:
>> +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.
 ...
> wan/pc300_drv: convert to net_device_ops
> 
> 
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-17  8:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-17  1:23 [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops Alexander Beregalov
2009-04-17  1:23 ` [PATCH -next 2/2] irda: include etherdevice.h for eth_*() functions Alexander Beregalov
2009-04-17  8:15   ` David Miller
2009-04-17  1:48 ` [PATCH -next 1/2] wan/pc300_drv: convert to net_device_ops Alexander Beregalov
2009-04-17  8:15   ` David Miller

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).