From ce1905d6b5972bd774dedb170558775b29600f87 Mon Sep 17 00:00:00 2001 From: wangcheng Date: Fri, 21 Aug 2020 15:23:31 +0800 Subject: [PATCH 1/2] components/bt: Fixed the state not synchronized between controller and host when disconnected. --- components/bt/host/bluedroid/stack/l2cap/include/l2c_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/stack/l2cap/include/l2c_int.h b/components/bt/host/bluedroid/stack/l2cap/include/l2c_int.h index 26075679be..83d9781af8 100644 --- a/components/bt/host/bluedroid/stack/l2cap/include/l2c_int.h +++ b/components/bt/host/bluedroid/stack/l2cap/include/l2c_int.h @@ -52,7 +52,7 @@ #define L2CAP_LINK_CONNECT_TOUT_EXT 120 /* 120 seconds */ #define L2CAP_ECHO_RSP_TOUT 30 /* 30 seconds */ #define L2CAP_LINK_FLOW_CONTROL_TOUT 2 /* 2 seconds */ -#define L2CAP_LINK_DISCONNECT_TOUT 30 /* 30 seconds */ +#define L2CAP_LINK_DISCONNECT_TOUT 45 /* 45 seconds */ #ifndef L2CAP_CHNL_CONNECT_TOUT /* BTIF needs to override for internal project needs */ #define L2CAP_CHNL_CONNECT_TOUT 60 /* 60 seconds */ From 2ba90c84530aee175daa1b1e06eaad6dc249d33f Mon Sep 17 00:00:00 2001 From: wangcheng Date: Fri, 21 Aug 2020 15:26:46 +0800 Subject: [PATCH 2/2] component/bt: Fixed the watchdog timeout of btu task during multi-connection --- components/bt/host/bluedroid/stack/l2cap/l2c_link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/bt/host/bluedroid/stack/l2cap/l2c_link.c b/components/bt/host/bluedroid/stack/l2cap/l2c_link.c index 960c455d87..4b2f46c3b5 100644 --- a/components/bt/host/bluedroid/stack/l2cap/l2c_link.c +++ b/components/bt/host/bluedroid/stack/l2cap/l2c_link.c @@ -1104,10 +1104,10 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf) #if (BLE_INCLUDED == TRUE) while ( ((l2cb.controller_xmit_window != 0 && (p_lcb->transport == BT_TRANSPORT_BR_EDR)) || (l2cb.controller_le_xmit_window != 0 && (p_lcb->transport == BT_TRANSPORT_LE))) - && (p_lcb->sent_not_acked <= p_lcb->link_xmit_quota)) + && (p_lcb->sent_not_acked < p_lcb->link_xmit_quota)) #else while ( (l2cb.controller_xmit_window != 0) - && (p_lcb->sent_not_acked <= p_lcb->link_xmit_quota)) + && (p_lcb->sent_not_acked < p_lcb->link_xmit_quota)) #endif { if (list_is_empty(p_lcb->link_xmit_data_q)) { @@ -1126,7 +1126,7 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf) #if (BLE_INCLUDED == TRUE) while ( ((l2cb.controller_xmit_window != 0 && (p_lcb->transport == BT_TRANSPORT_BR_EDR)) || (l2cb.controller_le_xmit_window != 0 && (p_lcb->transport == BT_TRANSPORT_LE))) - && (p_lcb->sent_not_acked <= p_lcb->link_xmit_quota)) + && (p_lcb->sent_not_acked < p_lcb->link_xmit_quota)) #else while ((l2cb.controller_xmit_window != 0) && (p_lcb->sent_not_acked < p_lcb->link_xmit_quota)) #endif