/* This routine purges the input queue of those frames that have been acknowledged. This replaces the boxes labelled "V(a) <- N(r)" on the SDL diagram.  */
void lapb_frames_acked(struct lapb_cb *lapb, unsigned short nr)
/* This routine purges the input queue of those frames that have been acknowledged. This replaces the boxes labelled "V(a) <- N(r)" on the SDL diagram.  */
void lapb_frames_acked(struct lapb_cb *lapb, unsigned short nr)
{
	struct sk_buff *skb;
	int modulus;
	modulus = (lapb->mode & LAPB_EXTENDED) ? LAPB_EMODULUS : LAPB_SMODULUS;
	if (lapb->va != nr)
		while (skb_peek(&lapb->ack_queue) && lapb->va != nr) {
			skb = skb_dequeue(&lapb->ack_queue);
			kfree_skb(skb);
			lapb->va = (lapb->va + 1) % modulus;
		}
}