Skip to contentSkip to conversation

vcan: convert to net_device_ops

PATCH Applied Oliver Hartkopp 2 participants 2 messages Dec 15, 2008 – Dec 16, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vcan: convert to net_device_ops

vcan: convert to net_device_ops

CC Stephen Hemminger <[email protected]>

---

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

Regards,
Oliver

drivers/net/can/vcan.c +5 -1
index 103f0f1..f127ec9 100644
@@ -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;
 }