diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-05-05 18:58:27 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-05-10 03:28:52 -0400 |
commit | a2e12a2a312f816d5970b0c809d43b399fbfe90c (patch) | |
tree | 6f81e31a67a07ee8b63506cfc1b85e9d3768488d | |
parent | 0301ef04b5f49a95681694fc0d75af9441faa919 (diff) |
Bluetooth: Remove unneeded control vars
Trivial clean up.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/l2cap.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index d0d03302e14d..5a5203f03642 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -1239,7 +1239,6 @@ static int l2cap_sock_getname(struct socket *sock, struct sockaddr *addr, int *l | |||
1239 | static void l2cap_monitor_timeout(unsigned long arg) | 1239 | static void l2cap_monitor_timeout(unsigned long arg) |
1240 | { | 1240 | { |
1241 | struct sock *sk = (void *) arg; | 1241 | struct sock *sk = (void *) arg; |
1242 | u16 control; | ||
1243 | 1242 | ||
1244 | bh_lock_sock(sk); | 1243 | bh_lock_sock(sk); |
1245 | if (l2cap_pi(sk)->retry_count >= l2cap_pi(sk)->remote_max_tx) { | 1244 | 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 | l2cap_pi(sk)->retry_count++; | 1250 | l2cap_pi(sk)->retry_count++; |
1252 | __mod_monitor_timer(); | 1251 | __mod_monitor_timer(); |
1253 | 1252 | ||
1254 | control = L2CAP_CTRL_POLL; | 1253 | l2cap_send_rr_or_rnr(l2cap_pi(sk), L2CAP_CTRL_POLL); |
1255 | l2cap_send_rr_or_rnr(l2cap_pi(sk), control); | ||
1256 | bh_unlock_sock(sk); | 1254 | bh_unlock_sock(sk); |
1257 | } | 1255 | } |
1258 | 1256 | ||
1259 | static void l2cap_retrans_timeout(unsigned long arg) | 1257 | static void l2cap_retrans_timeout(unsigned long arg) |
1260 | { | 1258 | { |
1261 | struct sock *sk = (void *) arg; | 1259 | struct sock *sk = (void *) arg; |
1262 | u16 control; | ||
1263 | 1260 | ||
1264 | bh_lock_sock(sk); | 1261 | bh_lock_sock(sk); |
1265 | l2cap_pi(sk)->retry_count = 1; | 1262 | l2cap_pi(sk)->retry_count = 1; |
@@ -1267,8 +1264,7 @@ static void l2cap_retrans_timeout(unsigned long arg) | |||
1267 | 1264 | ||
1268 | l2cap_pi(sk)->conn_state |= L2CAP_CONN_WAIT_F; | 1265 | l2cap_pi(sk)->conn_state |= L2CAP_CONN_WAIT_F; |
1269 | 1266 | ||
1270 | control = L2CAP_CTRL_POLL; | 1267 | l2cap_send_rr_or_rnr(l2cap_pi(sk), L2CAP_CTRL_POLL); |
1271 | l2cap_send_rr_or_rnr(l2cap_pi(sk), control); | ||
1272 | bh_unlock_sock(sk); | 1268 | bh_unlock_sock(sk); |
1273 | } | 1269 | } |
1274 | 1270 | ||
@@ -3716,10 +3712,8 @@ static inline void l2cap_data_channel_rnrframe(struct sock *sk, u16 rx_control) | |||
3716 | 3712 | ||
3717 | if (!(pi->conn_state & L2CAP_CONN_SREJ_SENT)) { | 3713 | if (!(pi->conn_state & L2CAP_CONN_SREJ_SENT)) { |
3718 | del_timer(&pi->retrans_timer); | 3714 | del_timer(&pi->retrans_timer); |
3719 | if (rx_control & L2CAP_CTRL_POLL) { | 3715 | if (rx_control & L2CAP_CTRL_POLL) |
3720 | u16 control = L2CAP_CTRL_FINAL; | 3716 | l2cap_send_rr_or_rnr(pi, L2CAP_CTRL_FINAL); |
3721 | l2cap_send_rr_or_rnr(pi, control); | ||
3722 | } | ||
3723 | return; | 3717 | return; |
3724 | } | 3718 | } |
3725 | 3719 | ||