Lines Matching defs:dev
51 #include <linux/can/dev.h>
72 static void vcan_rx(struct sk_buff *skb, struct net_device *dev)
74 struct net_device_stats *stats = &dev->stats;
80 skb->dev = dev;
86 static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev)
88 struct net_device_stats *stats = &dev->stats;
92 if (can_dropped_invalid_skb(dev, skb))
125 vcan_rx(skb, dev);
133 static int vcan_change_mtu(struct net_device *dev, int new_mtu)
136 if (dev->flags & IFF_UP)
143 dev->mtu = new_mtu;
156 static void vcan_setup(struct net_device *dev)
158 dev->type = ARPHRD_CAN;
159 dev->mtu = CANFD_MTU;
160 dev->hard_header_len = 0;
161 dev->addr_len = 0;
162 dev->tx_queue_len = 0;
163 dev->flags = IFF_NOARP;
164 can_set_ml_priv(dev, netdev_priv(dev));
168 dev->flags |= IFF_ECHO;
170 dev->netdev_ops = &vcan_netdev_ops;
171 dev->ethtool_ops = &vcan_ethtool_ops;
172 dev->needs_free_netdev = true;