X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fllc%2Fllc_conn.c;h=441bc18f996d51d47d482a1a3c97ab8e8f2439b7;hb=4f7874c868eaedd0e64b2f6c800bc852bdc7f38b;hp=3b8cfbe029a74ba8d47fb24bd1d1aad8f952d351;hpb=958b7f37ee0fb2846c8d44310a68ae9605614ff9;p=linux-2.6-omap-h63xx.git diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c index 3b8cfbe029a..441bc18f996 100644 --- a/net/llc/llc_conn.c +++ b/net/llc/llc_conn.c @@ -700,7 +700,7 @@ static struct sock *llc_create_incoming_sock(struct sock *sk, struct llc_addr *saddr, struct llc_addr *daddr) { - struct sock *newsk = llc_sk_alloc(sk->sk_family, GFP_ATOMIC, + struct sock *newsk = llc_sk_alloc(sk->sk_net, sk->sk_family, GFP_ATOMIC, sk->sk_prot); struct llc_sock *newllc, *llc = llc_sk(sk); @@ -831,25 +831,21 @@ static void llc_sk_init(struct sock* sk) llc->inc_cntr = llc->dec_cntr = 2; llc->dec_step = llc->connect_step = 1; - init_timer(&llc->ack_timer.timer); + setup_timer(&llc->ack_timer.timer, llc_conn_ack_tmr_cb, + (unsigned long)sk); llc->ack_timer.expire = sysctl_llc2_ack_timeout; - llc->ack_timer.timer.data = (unsigned long)sk; - llc->ack_timer.timer.function = llc_conn_ack_tmr_cb; - init_timer(&llc->pf_cycle_timer.timer); + setup_timer(&llc->pf_cycle_timer.timer, llc_conn_pf_cycle_tmr_cb, + (unsigned long)sk); llc->pf_cycle_timer.expire = sysctl_llc2_p_timeout; - llc->pf_cycle_timer.timer.data = (unsigned long)sk; - llc->pf_cycle_timer.timer.function = llc_conn_pf_cycle_tmr_cb; - init_timer(&llc->rej_sent_timer.timer); + setup_timer(&llc->rej_sent_timer.timer, llc_conn_rej_tmr_cb, + (unsigned long)sk); llc->rej_sent_timer.expire = sysctl_llc2_rej_timeout; - llc->rej_sent_timer.timer.data = (unsigned long)sk; - llc->rej_sent_timer.timer.function = llc_conn_rej_tmr_cb; - init_timer(&llc->busy_state_timer.timer); + setup_timer(&llc->busy_state_timer.timer, llc_conn_busy_tmr_cb, + (unsigned long)sk); llc->busy_state_timer.expire = sysctl_llc2_busy_timeout; - llc->busy_state_timer.timer.data = (unsigned long)sk; - llc->busy_state_timer.timer.function = llc_conn_busy_tmr_cb; llc->n2 = 2; /* max retransmit */ llc->k = 2; /* tx win size, will adjust dynam */ @@ -867,9 +863,9 @@ static void llc_sk_init(struct sock* sk) * Allocates a LLC sock and initializes it. Returns the new LLC sock * or %NULL if there's no memory available for one */ -struct sock *llc_sk_alloc(int family, gfp_t priority, struct proto *prot) +struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot) { - struct sock *sk = sk_alloc(family, priority, prot, 1); + struct sock *sk = sk_alloc(net, family, priority, prot); if (!sk) goto out;