X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fax25%2Fax25_std_timer.c;h=96e4b9273250918b4a60fdcc9ccce00b79090827;hb=9b610fda0df5d0f0b0c64242e37441ad1b384aac;hp=a29c480a4dc1f992f7f339c44f4b3d0ca9184526;hpb=288ceb8f142249109fd2e9f1bf0492bd6ff6d892;p=linux-2.6 diff --git a/net/ax25/ax25_std_timer.c b/net/ax25/ax25_std_timer.c index a29c480a4d..96e4b92732 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,8 +32,8 @@ void ax25_std_heartbeat_expiry(ax25_cb *ax25) { - struct sock *sk=ax25->sk; - + struct sock *sk = ax25->sk; + if (sk) bh_lock_sock(sk); @@ -63,7 +62,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;