aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-05-05 20:05:57 -0300
committerMarcel Holtmann <marcel@holtmann.org>2010-05-10 09:28:52 +0200
commit9b16dc6551cbde65d0ac525af3c46efab53a2c46 (patch)
tree6634c109c4d6de8f3b06cfd0c026d605c70c2402 /net/bluetooth/l2cap.c
parentBluetooth: Remove unneeded control vars (diff)
downloadlinux-dev-9b16dc6551cbde65d0ac525af3c46efab53a2c46.tar.xz
linux-dev-9b16dc6551cbde65d0ac525af3c46efab53a2c46.zip
Bluetooth: Check if we really are in WAIT_F when F bit comes
F-bit set should be processed only if we are in the WAIT_F state. 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>
Diffstat (limited to '')
-rw-r--r--net/bluetooth/l2cap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 5a5203f03642..eb5cb29115a7 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3503,7 +3503,8 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str
BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len);
- if (L2CAP_CTRL_FINAL & rx_control) {
+ if (L2CAP_CTRL_FINAL & rx_control &&
+ l2cap_pi(sk)->conn_state & L2CAP_CONN_WAIT_F) {
del_timer(&pi->monitor_timer);
if (pi->unacked_frames > 0)
__mod_retrans_timer();
@@ -3727,7 +3728,8 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str
{
BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len);
- if (L2CAP_CTRL_FINAL & rx_control) {
+ if (L2CAP_CTRL_FINAL & rx_control &&
+ l2cap_pi(sk)->conn_state & L2CAP_CONN_WAIT_F) {
del_timer(&l2cap_pi(sk)->monitor_timer);
if (l2cap_pi(sk)->unacked_frames > 0)
__mod_retrans_timer();