Lines Matching refs:dev
10 static netdev_tx_t nlmon_xmit(struct sk_buff *skb, struct net_device *dev)
12 dev_lstats_add(dev, skb->len);
19 static int nlmon_dev_init(struct net_device *dev)
21 dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats);
22 return dev->lstats == NULL ? -ENOMEM : 0;
25 static void nlmon_dev_uninit(struct net_device *dev)
27 free_percpu(dev->lstats);
34 static int nlmon_open(struct net_device *dev)
36 struct nlmon *nlmon = netdev_priv(dev);
38 nlmon->nt.dev = dev;
43 static int nlmon_close(struct net_device *dev)
45 struct nlmon *nlmon = netdev_priv(dev);
51 nlmon_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
55 dev_lstats_read(dev, &packets, &bytes);
64 static u32 always_on(struct net_device *dev)
82 static void nlmon_setup(struct net_device *dev)
84 dev->type = ARPHRD_NETLINK;
85 dev->priv_flags |= IFF_NO_QUEUE;
87 dev->netdev_ops = &nlmon_ops;
88 dev->ethtool_ops = &nlmon_ethtool_ops;
89 dev->needs_free_netdev = true;
91 dev->features = NETIF_F_SG | NETIF_F_FRAGLIST |
93 dev->flags = IFF_NOARP;
99 dev->mtu = NLMSG_GOODSIZE;
100 dev->min_mtu = sizeof(struct nlmsghdr);