Lines Matching refs:dev
54 struct net_device *dev; member
78 struct net_device *dev = qdisc_dev(sch); in teql_enqueue() local
81 if (q->q.qlen < dev->tx_queue_len) { in teql_enqueue()
98 dat_queue = netdev_get_tx_queue(dat->m->dev, 0); in teql_dequeue()
151 txq = netdev_get_tx_queue(master->dev, 0); in teql_destroy()
171 struct net_device *dev = qdisc_dev(sch); in teql_qdisc_init() local
175 if (dev->hard_header_len > m->dev->hard_header_len) in teql_qdisc_init()
178 if (m->dev == dev) in teql_qdisc_init()
186 if (m->dev->flags & IFF_UP) { in teql_qdisc_init()
187 if ((m->dev->flags & IFF_POINTOPOINT && in teql_qdisc_init()
188 !(dev->flags & IFF_POINTOPOINT)) || in teql_qdisc_init()
189 (m->dev->flags & IFF_BROADCAST && in teql_qdisc_init()
190 !(dev->flags & IFF_BROADCAST)) || in teql_qdisc_init()
191 (m->dev->flags & IFF_MULTICAST && in teql_qdisc_init()
192 !(dev->flags & IFF_MULTICAST)) || in teql_qdisc_init()
193 dev->mtu < m->dev->mtu) in teql_qdisc_init()
196 if (!(dev->flags&IFF_POINTOPOINT)) in teql_qdisc_init()
197 m->dev->flags &= ~IFF_POINTOPOINT; in teql_qdisc_init()
198 if (!(dev->flags&IFF_BROADCAST)) in teql_qdisc_init()
199 m->dev->flags &= ~IFF_BROADCAST; in teql_qdisc_init()
200 if (!(dev->flags&IFF_MULTICAST)) in teql_qdisc_init()
201 m->dev->flags &= ~IFF_MULTICAST; in teql_qdisc_init()
202 if (dev->mtu < m->dev->mtu) in teql_qdisc_init()
203 m->dev->mtu = dev->mtu; in teql_qdisc_init()
210 m->dev->mtu = dev->mtu; in teql_qdisc_init()
211 m->dev->flags = (m->dev->flags&~FMASK)|(dev->flags&FMASK); in teql_qdisc_init()
219 struct net_device *dev, struct netdev_queue *txq, in __teql_resolve() argument
229 if (dst->dev != dev) { in __teql_resolve()
232 mn = __neigh_lookup_errno(n->tbl, n->primary_key, dev); in __teql_resolve()
243 neigh_ha_snapshot(haddr, n, dev); in __teql_resolve()
244 err = dev_hard_header(skb, dev, ntohs(skb_protocol(skb, false)), in __teql_resolve()
258 struct net_device *dev, in teql_resolve() argument
267 if (!dev->header_ops || !dst) in teql_resolve()
271 res = __teql_resolve(skb, skb_res, dev, txq, dst); in teql_resolve()
277 static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev) in teql_master_xmit() argument
279 struct teql_master *master = netdev_priv(dev); in teql_master_xmit()
318 netif_wake_queue(dev); in teql_master_xmit()
325 if (netif_xmit_stopped(netdev_get_tx_queue(dev, 0))) in teql_master_xmit()
344 netif_stop_queue(dev); in teql_master_xmit()
355 static int teql_master_open(struct net_device *dev) in teql_master_open() argument
358 struct teql_master *m = netdev_priv(dev); in teql_master_open()
391 m->dev->mtu = mtu; in teql_master_open()
392 m->dev->flags = (m->dev->flags&~FMASK) | flags; in teql_master_open()
393 netif_start_queue(m->dev); in teql_master_open()
397 static int teql_master_close(struct net_device *dev) in teql_master_close() argument
399 netif_stop_queue(dev); in teql_master_close()
403 static void teql_master_stats64(struct net_device *dev, in teql_master_stats64() argument
406 struct teql_master *m = netdev_priv(dev); in teql_master_stats64()
414 static int teql_master_mtu(struct net_device *dev, int new_mtu) in teql_master_mtu() argument
416 struct teql_master *m = netdev_priv(dev); in teql_master_mtu()
427 dev->mtu = new_mtu; in teql_master_mtu()
439 static __init void teql_master_setup(struct net_device *dev) in teql_master_setup() argument
441 struct teql_master *master = netdev_priv(dev); in teql_master_setup()
444 master->dev = dev; in teql_master_setup()
455 dev->netdev_ops = &teql_netdev_ops; in teql_master_setup()
456 dev->type = ARPHRD_VOID; in teql_master_setup()
457 dev->mtu = 1500; in teql_master_setup()
458 dev->min_mtu = 68; in teql_master_setup()
459 dev->max_mtu = 65535; in teql_master_setup()
460 dev->tx_queue_len = 100; in teql_master_setup()
461 dev->flags = IFF_NOARP; in teql_master_setup()
462 dev->hard_header_len = LL_MAX_HEADER; in teql_master_setup()
463 netif_keep_dst(dev); in teql_master_setup()
477 struct net_device *dev; in teql_init() local
480 dev = alloc_netdev(sizeof(struct teql_master), "teql%d", in teql_init()
482 if (!dev) { in teql_init()
487 if ((err = register_netdev(dev))) { in teql_init()
488 free_netdev(dev); in teql_init()
492 master = netdev_priv(dev); in teql_init()
494 strscpy(master->qops.id, dev->name, IFNAMSIZ); in teql_init()
498 unregister_netdev(dev); in teql_init()
499 free_netdev(dev); in teql_init()
517 unregister_netdev(master->dev); in teql_exit()
518 free_netdev(master->dev); in teql_exit()