Lines Matching defs:dev
50 #include <linux/can/dev.h>
71 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)
89 struct net_device_stats *stats = &dev->stats;
92 if (can_dropped_invalid_skb(dev, skb))
122 vcan_rx(skb, dev);
130 static int vcan_change_mtu(struct net_device *dev, int new_mtu)
133 if (dev->flags & IFF_UP)
139 dev->mtu = new_mtu;
148 static void vcan_setup(struct net_device *dev)
150 dev->type = ARPHRD_CAN;
151 dev->mtu = CANFD_MTU;
152 dev->hard_header_len = 0;
153 dev->addr_len = 0;
154 dev->tx_queue_len = 0;
155 dev->flags = IFF_NOARP;
156 can_set_ml_priv(dev, netdev_priv(dev));
160 dev->flags |= IFF_ECHO;
162 dev->netdev_ops = &vcan_netdev_ops;
163 dev->needs_free_netdev = true;