/* Timer has expired, it may have been T2, T21, T22, or T23. We can tell by the state machine state.  */
static void x25_do_timer_expiry(struct sock *sk)
/* Timer has expired, it may have been T2, T21, T22, or T23. We can tell by the state machine state.  */
static void x25_do_timer_expiry(struct sock *sk)
{
	struct x25_sock *x25 = x25_sk(sk);
	switch (x25->state) {
		case X25_STATE_3:
			if (x25->condition & X25_COND_ACK_PENDING) {
				x25->condition &= ~X25_COND_ACK_PENDING;
				x25_enquiry_response(sk);
			}
			break;
		case X25_STATE_1:
		case X25_STATE_4:
			x25_write_internal(sk, X25_CLEAR_REQUEST);
			x25->state = X25_STATE_2;
			x25_start_t23timer(sk);
			break;
		case X25_STATE_2:
			x25_disconnect(sk, ETIMEDOUT, 0, 0);
			break;
	}
}