/* Try to send data out on a channel.  */
static void ppp_channel_push(struct channel *pch)
/* Try to send data out on a channel.  */
static void ppp_channel_push(struct channel *pch)
{
	struct sk_buff *skb;
	struct ppp *ppp;
	spin_lock_bh(&pch->downl);
	if (pch->chan) {
		while (!skb_queue_empty(&pch->file.xq)) {
			skb = skb_dequeue(&pch->file.xq);
			if (!pch->chan->ops->start_xmit(pch->chan, skb)) {
				skb_queue_head(&pch->file.xq, skb);
				break;
			}
		}
	} else {
		skb_queue_purge(&pch->file.xq);
	}
	spin_unlock_bh(&pch->downl);
	if (skb_queue_empty(&pch->file.xq)) {
		read_lock_bh(&pch->upl);
		ppp = pch->ppp;
		if (ppp)
			ppp_xmit_process(ppp);
		read_unlock_bh(&pch->upl);
	}
}