From 3dab0fd340218e06076a1ae84b6a0e724df068aa Mon Sep 17 00:00:00 2001 From: baohongde Date: Wed, 25 Oct 2017 12:02:41 +0800 Subject: [PATCH] component/bt: Fix bug of set MAX_L2CAP_CHANNELS error --- components/bt/bluedroid/include/bt_target.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/bt/bluedroid/include/bt_target.h b/components/bt/bluedroid/include/bt_target.h index b5883416d1..fe39f8b9bd 100644 --- a/components/bt/bluedroid/include/bt_target.h +++ b/components/bt/bluedroid/include/bt_target.h @@ -681,11 +681,15 @@ /* The maximum number of simultaneous channels that L2CAP can support. Up to 16*/ #ifndef MAX_L2CAP_CHANNELS #if (CLASSIC_BT_INCLUDED == TRUE) -#define MAX_L2CAP_CHANNELS 8 +#define MAX_L2CAP_CHANNELS 16 #else +#if (SMP_INCLUDED == FALSE) #define MAX_L2CAP_CHANNELS MAX_ACL_CONNECTIONS //This is used in the BLE client when start connected with the peer device +#else +#define MAX_L2CAP_CHANNELS (MAX_ACL_CONNECTIONS * 2) //This is used in the BLE client when start connected with the peer device and in SMP +#endif ///SMP_INCLUDED == FALSE #endif ///CLASSIC_BT_INCLUDED == TRUE -#endif +#endif ///MAX_L2CAP_CHANNELS /* The maximum number of simultaneous applications that can register with L2CAP. */ #ifndef MAX_L2CAP_CLIENTS