Lines Matching defs:netdev
438 static int cfv_netdev_open(struct net_device *netdev)
440 struct cfv_info *cfv = netdev_priv(netdev);
445 netif_carrier_on(netdev);
454 static int cfv_netdev_close(struct net_device *netdev)
456 struct cfv_info *cfv = netdev_priv(netdev);
461 netif_carrier_off(netdev);
522 static netdev_tx_t cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev)
524 struct cfv_info *cfv = netdev_priv(netdev);
566 netif_tx_stop_all_queues(netdev);
583 /* update netdev statistics */
613 static void cfv_netdev_setup(struct net_device *netdev)
615 netdev->netdev_ops = &cfv_netdev_ops;
616 netdev->type = ARPHRD_CAIF;
617 netdev->tx_queue_len = 100;
618 netdev->flags = IFF_POINTOPOINT | IFF_NOARP;
619 netdev->mtu = CFV_DEF_MTU_SIZE;
620 netdev->needs_free_netdev = true;
653 struct net_device *netdev;
657 netdev = alloc_netdev(sizeof(struct cfv_info), cfv_netdev_name,
659 if (!netdev)
662 cfv = netdev_priv(netdev);
664 cfv->ndev = netdev;
705 netdev->needed_headroom = cfv->tx_hr;
706 netdev->needed_tailroom = cfv->tx_tr;
711 netdev->mtu = cfv->mtu - cfv->tx_tr;
717 netif_napi_add_weight(netdev, &cfv->napi, cfv_rx_poll,
723 netif_carrier_off(netdev);
725 /* serialize netdev register + virtio_device_ready() with ndo_open() */
729 err = register_netdevice(netdev);
732 dev_err(&vdev->dev, "Unable to register netdev (%d)\n", err);
750 free_netdev(netdev);