*/
#include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/socket.h>
-#include <linux/in.h>
-#include <linux/kernel.h>
#include <linux/jiffies.h>
#include <linux/timer.h>
-#include <linux/string.h>
-#include <linux/sockios.h>
-#include <linux/net.h>
-#include <linux/inet.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
#include <net/sock.h>
-#include <net/tcp.h>
-#include <asm/system.h>
-#include <linux/fcntl.h>
-#include <linux/mm.h>
-#include <linux/interrupt.h>
+#include <net/tcp_states.h>
#include <net/x25.h>
static void x25_heartbeat_expiry(unsigned long);
void x25_init_timers(struct sock *sk)
{
- struct x25_opt *x25 = x25_sk(sk);
+ struct x25_sock *x25 = x25_sk(sk);
init_timer(&x25->timer);
x25->timer.data = (unsigned long)sk;
void x25_start_t2timer(struct sock *sk)
{
- struct x25_opt *x25 = x25_sk(sk);
+ struct x25_sock *x25 = x25_sk(sk);
mod_timer(&x25->timer, jiffies + x25->t2);
}
void x25_start_t21timer(struct sock *sk)
{
- struct x25_opt *x25 = x25_sk(sk);
+ struct x25_sock *x25 = x25_sk(sk);
mod_timer(&x25->timer, jiffies + x25->t21);
}
void x25_start_t22timer(struct sock *sk)
{
- struct x25_opt *x25 = x25_sk(sk);
+ struct x25_sock *x25 = x25_sk(sk);
mod_timer(&x25->timer, jiffies + x25->t22);
}
void x25_start_t23timer(struct sock *sk)
{
- struct x25_opt *x25 = x25_sk(sk);
+ struct x25_sock *x25 = x25_sk(sk);
mod_timer(&x25->timer, jiffies + x25->t23);
}
unsigned long x25_display_timer(struct sock *sk)
{
- struct x25_opt *x25 = x25_sk(sk);
+ struct x25_sock *x25 = x25_sk(sk);
if (!timer_pending(&x25->timer))
return 0;
if (sock_flag(sk, SOCK_DESTROY) ||
(sk->sk_state == TCP_LISTEN &&
sock_flag(sk, SOCK_DEAD))) {
+ bh_unlock_sock(sk);
x25_destroy_socket(sk);
- goto unlock;
+ return;
}
break;
}
restart_heartbeat:
x25_start_heartbeat(sk);
-unlock:
bh_unlock_sock(sk);
}
*/
static inline void x25_do_timer_expiry(struct sock * sk)
{
- struct x25_opt *x25 = x25_sk(sk);
+ struct x25_sock *x25 = x25_sk(sk);
switch (x25->state) {