kernels/linux-2.4.0/drivers/net/ppp_generic.c
/*
 * Try to send data out on a channel.
 */
Try to send data out on a channel.
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 != 0) {
		while (skb_queue_len(&pch->file.xq) > 0) {
			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_len(&pch->file.xq) == 0) {
		read_lock_bh(&pch->upl);
		ppp = pch->ppp;
		if (ppp != 0)
			ppp_xmit_process(ppp);
		read_unlock_bh(&pch->upl);
	}
}
static void ppp_channel_push ( struct channel * pch ) { struct sk_buff * skb ; struct ppp * ppp ; spin_lock_bh ( & pch -> downl ) ; if ( pch -> chan != 0 ) { while ( skb_queue_len ( & pch -> file . xq ) > 0 ) { 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_len ( & pch -> file . xq ) == 0 ) { read_lock_bh ( & pch -> upl ) ; ppp = pch -> ppp ; if ( ppp != 0 ) ppp_xmit_process ( ppp ) ; read_unlock_bh ( & pch -> upl ) ; } }
Try to send data out on a channel.
Try to send data out on a channel .
/* put the packet back and try again later */ /* channel got deregistered */ /* see if there is anything from the attached unit to be sent */