fix(ble/bluedroid): Disable bluedroid desire_role
(cherry picked from commit 9ae4d9a14a20d152042d626f56daaf568ee21c89) Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
@@ -129,7 +129,6 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
tGAP_INFO blk[GAP_MAX_BLOCKS];
|
||||
tBTM_CMPL_CB *btm_cback[GAP_MAX_BLOCKS];
|
||||
UINT8 trace_level;
|
||||
//tGAP_FINDADDR_CB findaddr_cb; /* Contains the control block for finding a device addr */
|
||||
//tBTM_INQ_INFO *cur_inqptr;
|
||||
|
||||
@@ -490,9 +490,10 @@ typedef struct {
|
||||
list_t *p_ccb_pool; /* Channel Control Block pool */
|
||||
tL2C_RCB rcb_pool[MAX_L2CAP_CLIENTS]; /* Registration info pool */
|
||||
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
UINT8 desire_role; /* desire to be master/slave when accepting a connection */
|
||||
BOOLEAN disallow_switch; /* FALSE, to allow switch at create conn */
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
UINT16 num_lm_acl_bufs; /* # of ACL buffers on controller */
|
||||
UINT16 idle_timeout; /* Idle timeout */
|
||||
|
||||
|
||||
@@ -863,7 +863,7 @@ UINT8 L2CA_SetTraceLevel (UINT8 new_level)
|
||||
return (l2cb.l2cap_trace_level);
|
||||
}
|
||||
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function L2CA_SetDesireRole
|
||||
@@ -901,6 +901,7 @@ UINT8 L2CA_SetDesireRole (UINT8 new_role)
|
||||
|
||||
return (l2cb.desire_role);
|
||||
}
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
|
||||
@@ -936,6 +936,7 @@ UINT8 l2c_link_pkts_rcvd (UINT16 *num_pkts, UINT16 *handles)
|
||||
return (num_found);
|
||||
}
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function l2c_link_role_changed
|
||||
@@ -973,6 +974,7 @@ void l2c_link_role_changed (BD_ADDR bd_addr, UINT8 new_role, UINT8 hci_status)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
@@ -877,13 +877,13 @@ void l2c_init (void)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
#ifdef L2CAP_DESIRED_LINK_ROLE
|
||||
l2cb.desire_role = L2CAP_DESIRED_LINK_ROLE;
|
||||
#else
|
||||
l2cb.desire_role = HCI_ROLE_SLAVE;
|
||||
#endif
|
||||
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/* Set the default idle timeout */
|
||||
l2cb.idle_timeout = L2CAP_LINK_INACTIVITY_TOUT;
|
||||
|
||||
|
||||
@@ -369,6 +369,7 @@ uint8_t l2cu_ble_plcb_active_count(void)
|
||||
|
||||
}
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function l2cu_get_conn_role
|
||||
@@ -385,6 +386,7 @@ UINT8 l2cu_get_conn_role (tL2C_LCB *p_this_lcb)
|
||||
{
|
||||
return l2cb.desire_role;
|
||||
}
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -2373,7 +2375,7 @@ UINT8 l2cu_get_num_hi_priority (void)
|
||||
return no_hi;
|
||||
}
|
||||
|
||||
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function l2cu_create_conn_after_switch
|
||||
@@ -2448,7 +2450,7 @@ BOOLEAN l2cu_create_conn_after_switch (tL2C_LCB *p_lcb)
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
Reference in New Issue
Block a user