Commit a2e12a2a authored by Gustavo F. Padovan's avatar Gustavo F. Padovan Committed by Marcel Holtmann

Bluetooth: Remove unneeded control vars

Trivial clean up.
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
Reviewed-by: default avatarJoão Paulo Rechi Vita <jprvita@profusion.mobi>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 0301ef04
...@@ -1239,7 +1239,6 @@ static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr, int *l ...@@ -1239,7 +1239,6 @@ static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr, int *l
static void l2cap_monitor_timeout(unsigned long arg) static void l2cap_monitor_timeout(unsigned long arg)
{ {
struct sock *sk = (void *) arg; struct sock *sk = (void *) arg;
u16 control;
bh_lock_sock(sk); bh_lock_sock(sk);
if (l2cap_pi(sk)->retry_count >= l2cap_pi(sk)->remote_max_tx) { if (l2cap_pi(sk)->retry_count >= l2cap_pi(sk)->remote_max_tx) {
...@@ -1251,15 +1250,13 @@ static void l2cap_monitor_timeout(unsigned long arg) ...@@ -1251,15 +1250,13 @@ static void l2cap_monitor_timeout(unsigned long arg)
l2cap_pi(sk)->retry_count++; l2cap_pi(sk)->retry_count++;
__mod_monitor_timer(); __mod_monitor_timer();
control = L2CAP_CTRL_POLL; l2cap_send_rr_or_rnr(l2cap_pi(sk), L2CAP_CTRL_POLL);
l2cap_send_rr_or_rnr(l2cap_pi(sk), control);
bh_unlock_sock(sk); bh_unlock_sock(sk);
} }
static void l2cap_retrans_timeout(unsigned long arg) static void l2cap_retrans_timeout(unsigned long arg)
{ {
struct sock *sk = (void *) arg; struct sock *sk = (void *) arg;
u16 control;
bh_lock_sock(sk); bh_lock_sock(sk);
l2cap_pi(sk)->retry_count = 1; l2cap_pi(sk)->retry_count = 1;
...@@ -1267,8 +1264,7 @@ static void l2cap_retrans_timeout(unsigned long arg) ...@@ -1267,8 +1264,7 @@ static void l2cap_retrans_timeout(unsigned long arg)
l2cap_pi(sk)->conn_state |= L2CAP_CONN_WAIT_F; l2cap_pi(sk)->conn_state |= L2CAP_CONN_WAIT_F;
control = L2CAP_CTRL_POLL; l2cap_send_rr_or_rnr(l2cap_pi(sk), L2CAP_CTRL_POLL);
l2cap_send_rr_or_rnr(l2cap_pi(sk), control);
bh_unlock_sock(sk); bh_unlock_sock(sk);
} }
...@@ -3716,10 +3712,8 @@ static inline void l2cap_data_channel_rnrframe(struct sock *sk, u16 rx_control) ...@@ -3716,10 +3712,8 @@ static inline void l2cap_data_channel_rnrframe(struct sock *sk, u16 rx_control)
if (!(pi->conn_state & L2CAP_CONN_SREJ_SENT)) { if (!(pi->conn_state & L2CAP_CONN_SREJ_SENT)) {
del_timer(&pi->retrans_timer); del_timer(&pi->retrans_timer);
if (rx_control & L2CAP_CTRL_POLL) { if (rx_control & L2CAP_CTRL_POLL)
u16 control = L2CAP_CTRL_FINAL; l2cap_send_rr_or_rnr(pi, L2CAP_CTRL_FINAL);
l2cap_send_rr_or_rnr(pi, control);
}
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment