netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] vcan: convert to net_device_ops
@ 2008-12-15 20:54 Oliver Hartkopp
  2008-12-16  9:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Hartkopp @ 2008-12-15 20:54 UTC (permalink / raw)
  To: David Miller; +Cc: Stephen Hemminger, Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

vcan: convert to net_device_ops

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
CC: Stephen Hemminger <shemminger@vyatta.com>
---

This patch converts the virtual CAN driver vcan to use net_device_ops.
It's functionally tested.

Regards,
Oliver



[-- Attachment #2: vcan_netdev_ops.patch --]
[-- Type: text/x-patch, Size: 677 bytes --]

diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index 103f0f1..f127ec9 100644
--- a/drivers/net/can/vcan.c
+++ b/drivers/net/can/vcan.c
@@ -128,6 +128,10 @@ static int vcan_tx(struct sk_buff *skb, struct net_device *dev)
 	return NETDEV_TX_OK;
 }
 
+static const struct net_device_ops vcan_netdev_ops = {
+	.ndo_start_xmit = vcan_tx,
+};
+
 static void vcan_setup(struct net_device *dev)
 {
 	dev->type              = ARPHRD_CAN;
@@ -141,7 +145,7 @@ static void vcan_setup(struct net_device *dev)
 	if (echo)
 		dev->flags |= IFF_ECHO;
 
-	dev->hard_start_xmit   = vcan_tx;
+	dev->netdev_ops        = &vcan_netdev_ops;
 	dev->destructor        = free_netdev;
 }
 

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

* Re: [PATCH net-next] vcan: convert to net_device_ops
  2008-12-15 20:54 [PATCH net-next] vcan: convert to net_device_ops Oliver Hartkopp
@ 2008-12-16  9:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-12-16  9:42 UTC (permalink / raw)
  To: oliver; +Cc: shemminger, netdev

From: Oliver Hartkopp <oliver@hartkopp.net>
Date: Mon, 15 Dec 2008 21:54:49 +0100

> vcan: convert to net_device_ops
> 
> Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
> CC: Stephen Hemminger <shemminger@vyatta.com>

Applied, thanks Oliver.

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

end of thread, other threads:[~2008-12-16  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-15 20:54 [PATCH net-next] vcan: convert to net_device_ops Oliver Hartkopp
2008-12-16  9:42 ` 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).