/* Data has emerged from the LAPB protocol machine. We don't handle busy cases too well. Its tricky to see how to do this nicely - perhaps lapb should allow us to bounce this ?  */
static void x25_asy_data_transmit(struct net_device *dev, struct sk_buff *skb)
/* Data has emerged from the LAPB protocol machine. We don't handle busy cases too well. Its tricky to see how to do this nicely - perhaps lapb should allow us to bounce this ?  */
static void x25_asy_data_transmit(struct net_device *dev, struct sk_buff *skb)
{
	struct x25_asy *sl = netdev_priv(dev);
	spin_lock(&sl->lock);
	if (netif_queue_stopped(sl->dev) || sl->tty == NULL) {
		spin_unlock(&sl->lock);
		printk(KERN_ERR "x25_asy: tbusy drop\n");
		kfree_skb(skb);
		return;
	}
	if (skb != NULL) {
		x25_asy_lock(sl);
		dev->stats.tx_bytes += skb->len;
		x25_asy_encaps(sl, skb->data, skb->len);
		dev_kfree_skb(skb);
	}
	spin_unlock(&sl->lock);
}