* @pub_count: total # of publications port has made during its lifetime
* @probing_state:
* @probing_intv:
- * @timer:
* @port: port - interacts with 'sk' and with the rest of the TIPC stack
* @peer_name: the peer of the connection, if any
* @conn_timeout: the time we can wait for an unresponded setup request
u32 pub_count;
u32 probing_state;
unsigned long probing_intv;
- struct timer_list timer;
uint conn_timeout;
atomic_t dupl_rcvcnt;
bool link_cong;
return -EINVAL;
}
msg_set_origport(msg, tsk->portid);
- setup_timer(&tsk->timer, tipc_sk_timeout, (unsigned long)tsk);
+ setup_timer(&sk->sk_timer, tipc_sk_timeout, (unsigned long)tsk);
sk->sk_backlog_rcv = tipc_backlog_rcv;
sk->sk_rcvbuf = sysctl_tipc_rmem[1];
sk->sk_data_ready = tipc_data_ready;
tipc_sk_withdraw(tsk, 0, NULL);
probing_state = tsk->probing_state;
- if (del_timer_sync(&tsk->timer) && probing_state != TIPC_CONN_PROBING)
+ if (del_timer_sync(&sk->sk_timer) &&
+ probing_state != TIPC_CONN_PROBING)
sock_put(sk);
tipc_sk_remove(tsk);
if (tsk->connected) {
static void tipc_sk_finish_conn(struct tipc_sock *tsk, u32 peer_port,
u32 peer_node)
{
- struct net *net = sock_net(&tsk->sk);
+ struct sock *sk = &tsk->sk;
+ struct net *net = sock_net(sk);
struct tipc_msg *msg = &tsk->phdr;
msg_set_destnode(msg, peer_node);
tsk->probing_intv = CONN_PROBING_INTERVAL;
tsk->probing_state = TIPC_CONN_OK;
tsk->connected = 1;
- if (!mod_timer(&tsk->timer, jiffies + tsk->probing_intv))
- sock_hold(&tsk->sk);
+ sk_reset_timer(sk, &sk->sk_timer, jiffies + tsk->probing_intv);
tipc_node_add_conn(net, peer_node, tsk->portid, peer_port);
tsk->max_pkt = tipc_node_get_mtu(net, peer_node, tsk->portid);
}
0, peer_node, tn->own_addr,
peer_port, tsk->portid, TIPC_OK);
tsk->probing_state = TIPC_CONN_PROBING;
- if (!mod_timer(&tsk->timer, jiffies + tsk->probing_intv))
- sock_hold(sk);
+ sk_reset_timer(sk, &sk->sk_timer, jiffies + tsk->probing_intv);
}
bh_unlock_sock(sk);
if (skb)