X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fax25%2Fax25_std_timer.c;h=cdc7e751ef36129fc9e25f107d8beb1e58034faf;hb=30902dc3cb0ea1cfc7ac2b17bcf478ff98420d74;hp=e3528b1a7802b61b3f0caa5da791c84235f87fc2;hpb=48c871c1f6a7c7044dd76774fb469e65c7e2e4e8;p=linux-2.6-omap-h63xx.git diff --git a/net/ax25/ax25_std_timer.c b/net/ax25/ax25_std_timer.c index e3528b1a780..cdc7e751ef3 100644 --- a/net/ax25/ax25_std_timer.c +++ b/net/ax25/ax25_std_timer.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -33,18 +32,16 @@ void ax25_std_heartbeat_expiry(ax25_cb *ax25) { - struct sock *sk=ax25->sk; + struct sock *sk = ax25->sk; if (sk) bh_lock_sock(sk); switch (ax25->state) { case AX25_STATE_0: - /* Magic here: If we listen() and a new link dies before it - is accepted() it isn't 'dead' so doesn't get removed. */ - if (!sk || sock_flag(sk, SOCK_DESTROY) || - (sk->sk_state == TCP_LISTEN && - sock_flag(sk, SOCK_DEAD))) { + if (!sk || + sock_flag(sk, SOCK_DESTROY) || + sock_flag(sk, SOCK_DEAD)) { if (sk) { sock_hold(sk); ax25_destroy_socket(ax25); @@ -63,7 +60,7 @@ void ax25_std_heartbeat_expiry(ax25_cb *ax25) */ if (sk != NULL) { if (atomic_read(&sk->sk_rmem_alloc) < - (sk->sk_rcvbuf / 2) && + (sk->sk_rcvbuf >> 1) && (ax25->condition & AX25_COND_OWN_RX_BUSY)) { ax25->condition &= ~AX25_COND_OWN_RX_BUSY; ax25->condition &= ~AX25_COND_ACK_PENDING;