/* Clear an own-rx-busy condition and tell the peer about this, provided that there is a significant amount of free receive buffer space available.  */
void x25_check_rbuf(struct sock *sk)
/* Clear an own-rx-busy condition and tell the peer about this, provided that there is a significant amount of free receive buffer space available.  */
void x25_check_rbuf(struct sock *sk)
{
	struct x25_sock *x25 = x25_sk(sk);
	if (atomic_read(&sk->sk_rmem_alloc) < (sk->sk_rcvbuf >> 1) &&
	    (x25->condition & X25_COND_OWN_RX_BUSY)) {
		x25->condition &= ~X25_COND_OWN_RX_BUSY;
		x25->condition &= ~X25_COND_ACK_PENDING;
		x25->vl         = x25->vr;
		x25_write_internal(sk, X25_RR);
		x25_stop_timer(sk);
	}
}