/* Flush output from our internal buffers. Called for the TCFLSH ioctl. Can be entered in parallel but this is covered by the xmit_lock.  */
static void ppp_async_flush_output(struct asyncppp *ap)
/* Flush output from our internal buffers. Called for the TCFLSH ioctl. Can be entered in parallel but this is covered by the xmit_lock.  */
static void ppp_async_flush_output(struct asyncppp *ap)
{
	int done = 0;
	spin_lock_bh(&ap->xmit_lock);
	ap->optr = ap->olim;
	if (ap->tpkt != NULL) {
		kfree_skb(ap->tpkt);
		ap->tpkt = NULL;
		clear_bit(XMIT_FULL, &ap->xmit_flags);
		done = 1;
	}
	spin_unlock_bh(&ap->xmit_lock);
	if (done)
		ppp_output_wakeup(&ap->chan);
}