/* 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 x25_frames_acked(struct sock *sk, 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 x25_frames_acked(struct sock *sk, unsigned short nr)
{
	struct sk_buff *skb;
	struct x25_sock *x25 = x25_sk(sk);
	int modulus = x25->neighbour->extended ? X25_EMODULUS : X25_SMODULUS;
	if (x25->va != nr)
		while (skb_peek(&x25->ack_queue) && x25->va != nr) {
			skb = skb_dequeue(&x25->ack_queue);
			kfree_skb(skb);
			x25->va = (x25->va + 1) % modulus;
		}
}