From 9a111df676851838cf635ed79d38d23fed4b46a9 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 12 Dec 2019 08:36:21 -0800 Subject: [PATCH] Bluetooth: L2CAP: Add define for signalling timeout This adds a define for the so called RTX timeout. Signed-off-by: Luiz Augusto von Dentz --- subsys/bluetooth/host/l2cap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/l2cap.c b/subsys/bluetooth/host/l2cap.c index df59208d9e5..ee24dd9f744 100644 --- a/subsys/bluetooth/host/l2cap.c +++ b/subsys/bluetooth/host/l2cap.c @@ -49,6 +49,7 @@ #define L2CAP_CONN_TIMEOUT K_SECONDS(40) #define L2CAP_DISC_TIMEOUT K_SECONDS(2) +#define L2CAP_RTX_TIMEOUT K_SECONDS(2) /* Dedicated pool for disconnect buffers so they are guaranteed to be send * even in case of data congestion due to flooding. @@ -391,7 +392,7 @@ static struct net_buf *l2cap_create_le_sig_pdu(struct net_buf *buf, } /* Don't wait more than the minimum RTX timeout of 2 seconds */ - buf = bt_l2cap_create_pdu_timeout(pool, 0, K_SECONDS(2)); + buf = bt_l2cap_create_pdu_timeout(pool, 0, L2CAP_RTX_TIMEOUT); if (!buf) { /* If it was not possible to allocate a buffer within the * timeout return NULL.