Lines Matching refs:lapbeth

54 	struct net_device	*axdev;		/* lapbeth device (lapb#) */
72 struct lapbethdev *lapbeth;
74 list_for_each_entry_rcu(lapbeth, &lapbeth_devices, node, lockdep_rtnl_is_held()) {
75 if (lapbeth->ethdev == dev)
76 return lapbeth;
90 struct lapbethdev *lapbeth = container_of(napi, struct lapbethdev,
96 skb = skb_dequeue(&lapbeth->rx_queue);
114 struct lapbethdev *lapbeth;
127 lapbeth = lapbeth_get_x25_dev(dev);
128 if (!lapbeth)
130 spin_lock_bh(&lapbeth->up_lock);
131 if (!lapbeth->up)
141 err = lapb_data_received(lapbeth->axdev, skb);
147 spin_unlock_bh(&lapbeth->up_lock);
162 struct lapbethdev *lapbeth = netdev_priv(dev);
177 skb_queue_tail(&lapbeth->rx_queue, skb);
178 napi_schedule(&lapbeth->napi);
187 struct lapbethdev *lapbeth = netdev_priv(dev);
190 spin_lock_bh(&lapbeth->up_lock);
191 if (!lapbeth->up)
229 spin_unlock_bh(&lapbeth->up_lock);
238 struct lapbethdev *lapbeth = netdev_priv(ndev);
251 skb->dev = dev = lapbeth->ethdev;
264 struct lapbethdev *lapbeth = netdev_priv(dev);
276 skb_queue_tail(&lapbeth->rx_queue, skb);
277 napi_schedule(&lapbeth->napi);
282 struct lapbethdev *lapbeth = netdev_priv(dev);
294 skb_queue_tail(&lapbeth->rx_queue, skb);
295 napi_schedule(&lapbeth->napi);
321 struct lapbethdev *lapbeth = netdev_priv(dev);
324 napi_enable(&lapbeth->napi);
328 napi_disable(&lapbeth->napi);
333 spin_lock_bh(&lapbeth->up_lock);
334 lapbeth->up = true;
335 spin_unlock_bh(&lapbeth->up_lock);
342 struct lapbethdev *lapbeth = netdev_priv(dev);
345 spin_lock_bh(&lapbeth->up_lock);
346 lapbeth->up = false;
347 spin_unlock_bh(&lapbeth->up_lock);
353 napi_disable(&lapbeth->napi);
382 struct lapbethdev *lapbeth;
390 ndev = alloc_netdev(sizeof(*lapbeth), "lapb%d", NET_NAME_UNKNOWN,
405 lapbeth = netdev_priv(ndev);
406 lapbeth->axdev = ndev;
409 lapbeth->ethdev = dev;
411 lapbeth->up = false;
412 spin_lock_init(&lapbeth->up_lock);
414 skb_queue_head_init(&lapbeth->rx_queue);
415 netif_napi_add_weight(ndev, &lapbeth->napi, lapbeth_napi_poll, 16);
421 list_add_rcu(&lapbeth->node, &lapbeth_devices);
433 static void lapbeth_free_device(struct lapbethdev *lapbeth)
435 dev_put(lapbeth->ethdev);
436 list_del_rcu(&lapbeth->node);
437 unregister_netdevice(lapbeth->axdev);
447 struct lapbethdev *lapbeth;
464 lapbeth = lapbeth_get_x25_dev(dev);
465 if (lapbeth)
466 dev_close(lapbeth->axdev);
470 lapbeth = lapbeth_get_x25_dev(dev);
471 if (lapbeth)
472 lapbeth_free_device(lapbeth);
507 struct lapbethdev *lapbeth;
515 lapbeth = list_entry(entry, struct lapbethdev, node);
517 dev_put(lapbeth->ethdev);
518 unregister_netdevice(lapbeth->axdev);