summaryrefslogtreecommitdiff
path: root/include/net/bluetooth/l2cap.h
diff options
context:
space:
mode:
authorDean Jenkins <Dean_Jenkins@mentor.com>2015-06-23 19:59:39 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-07-23 18:10:51 +0300
commite432c72c464d2deb6c66d1e2a5f548dc1f0ef4dc (patch)
tree1206dfbdbb74bf9b5ffa8bf9999b824761cea681 /include/net/bluetooth/l2cap.h
parentcb02a25583b59ce48267472cd092485d754964f9 (diff)
downloadlinux-e432c72c464d2deb6c66d1e2a5f548dc1f0ef4dc.tar.xz
Bluetooth: __l2cap_wait_ack() add defensive timeout
Add a timeout to prevent the do while loop running in an infinite loop. This ensures that the channel will be instructed to close within 10 seconds so prevents l2cap_sock_shutdown() getting stuck forever. Returns -ENOLINK when the timeout is reached. The channel will be subequently closed and not all data will be ACK'ed. Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth/l2cap.h')
-rw-r--r--include/net/bluetooth/l2cap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 3dcad4159b0b..c98afc08cc26 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -56,6 +56,7 @@
#define L2CAP_MOVE_TIMEOUT msecs_to_jiffies(4000)
#define L2CAP_MOVE_ERTX_TIMEOUT msecs_to_jiffies(60000)
#define L2CAP_WAIT_ACK_POLL_PERIOD msecs_to_jiffies(200)
+#define L2CAP_WAIT_ACK_TIMEOUT msecs_to_jiffies(10000)
#define L2CAP_A2MP_DEFAULT_MTU 670