aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/vcan.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index 103f0f1df280..f127ec983d03 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)
128 return NETDEV_TX_OK; 128 return NETDEV_TX_OK;
129} 129}
130 130
131static const struct net_device_ops vcan_netdev_ops = {
132 .ndo_start_xmit = vcan_tx,
133};
134
131static void vcan_setup(struct net_device *dev) 135static void vcan_setup(struct net_device *dev)
132{ 136{
133 dev->type = ARPHRD_CAN; 137 dev->type = ARPHRD_CAN;
@@ -141,7 +145,7 @@ static void vcan_setup(struct net_device *dev)
141 if (echo) 145 if (echo)
142 dev->flags |= IFF_ECHO; 146 dev->flags |= IFF_ECHO;
143 147
144 dev->hard_start_xmit = vcan_tx; 148 dev->netdev_ops = &vcan_netdev_ops;
145 dev->destructor = free_netdev; 149 dev->destructor = free_netdev;
146} 150}
147 151