mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(ble/bluedroid): disable rsp timer and ind_ack timer
(cherry picked from commit 7ff9484c46)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
@@ -2641,6 +2641,7 @@ tBTM_STATUS btm_sec_mx_access_request (BD_ADDR bd_addr, UINT16 psm, BOOLEAN is_o
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
void btm_sec_conn_req (UINT8 *bda, UINT8 *dc)
|
||||
{
|
||||
@@ -2701,7 +2702,7 @@ void btm_sec_conn_req (UINT8 *bda, UINT8 *dc)
|
||||
}
|
||||
}
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btm_sec_bond_cancel_complete
|
||||
|
||||
@@ -376,11 +376,15 @@ static void btu_general_alarm_process(void *param)
|
||||
break;
|
||||
|
||||
case BTU_TTYPE_ATT_WAIT_FOR_RSP:
|
||||
#if (GATTC_INCLUDED == TRUE)
|
||||
gatt_rsp_timeout(p_tle);
|
||||
#endif // (GATTC_INCLUDED == TRUE)
|
||||
break;
|
||||
|
||||
case BTU_TTYPE_ATT_WAIT_FOR_IND_ACK:
|
||||
#if (GATTC_INCLUDED == TRUE)
|
||||
gatt_ind_ack_timeout(p_tle);
|
||||
#endif // (GATTC_INCLUDED == TRUE)
|
||||
break;
|
||||
|
||||
#if (defined(SMP_INCLUDED) && SMP_INCLUDED == TRUE)
|
||||
|
||||
@@ -128,7 +128,9 @@ typedef struct {
|
||||
} tGAP_CLCB;
|
||||
|
||||
typedef struct {
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
tGAP_INFO blk[GAP_MAX_BLOCKS];
|
||||
#endif // (CLASSIC_BT_INCLUDED == TRUE)
|
||||
UINT8 trace_level;
|
||||
//tGAP_FINDADDR_CB findaddr_cb; /* Contains the control block for finding a device addr */
|
||||
//tBTM_INQ_INFO *cur_inqptr;
|
||||
|
||||
@@ -180,12 +180,15 @@ void gatt_free(void)
|
||||
fixed_queue_free(p_tcb->pending_enc_clcb, NULL);
|
||||
p_tcb->pending_enc_clcb = NULL;
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
|
||||
#if (GATTS_INCLUDED == TRUE)
|
||||
btu_free_timer(&p_tcb->conf_timer_ent);
|
||||
memset(&p_tcb->conf_timer_ent, 0, sizeof(TIMER_LIST_ENT));
|
||||
#endif // (GATTS_INCLUDED == TRUE)
|
||||
|
||||
#if (GATTC_INCLUDED == TRUE)
|
||||
btu_free_timer(&p_tcb->ind_ack_timer_ent);
|
||||
memset(&p_tcb->ind_ack_timer_ent, 0, sizeof(TIMER_LIST_ENT));
|
||||
#endif // #if (GATTC_INCLUDED == TRUE)
|
||||
|
||||
#if (GATTS_INCLUDED == TRUE)
|
||||
fixed_queue_free(p_tcb->sr_cmd.multi_rsp_q, NULL);
|
||||
|
||||
@@ -1247,6 +1247,8 @@ void gatt_start_rsp_timer(UINT16 clcb_idx)
|
||||
btu_start_timer (&p_clcb->rsp_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
|
||||
GATT_WAIT_FOR_RSP_TOUT);
|
||||
}
|
||||
|
||||
#if (GATTS_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_start_conf_timer
|
||||
@@ -1262,6 +1264,9 @@ void gatt_start_conf_timer(tGATT_TCB *p_tcb)
|
||||
btu_start_timer (&p_tcb->conf_timer_ent, BTU_TTYPE_ATT_WAIT_FOR_RSP,
|
||||
GATT_WAIT_FOR_RSP_TOUT);
|
||||
}
|
||||
#endif // (GATTS_INCLUDED == TRUE)
|
||||
|
||||
#if (GATTC_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_start_ind_ack_timer
|
||||
@@ -1279,6 +1284,7 @@ void gatt_start_ind_ack_timer(tGATT_TCB *p_tcb)
|
||||
GATT_WAIT_FOR_IND_ACK_TOUT);
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_rsp_timeout
|
||||
@@ -1337,6 +1343,7 @@ void gatt_ind_ack_timeout(TIMER_LIST_ENT *p_tle)
|
||||
|
||||
attp_send_cl_msg(((tGATT_TCB *)p_tle->param), 0, GATT_HANDLE_VALUE_CONF, NULL);
|
||||
}
|
||||
#endif // (GATTC_INCLUDED == TRUE)
|
||||
|
||||
#if (GATTS_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
@@ -2095,6 +2102,7 @@ BOOLEAN gatt_find_specific_app_in_hold_link(tGATT_TCB *p_tcb, tGATT_IF p_gatt_if
|
||||
return found;
|
||||
}
|
||||
|
||||
#if (GATTC_INCLUDED == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function gatt_cmd_enq
|
||||
@@ -2148,6 +2156,7 @@ tGATT_CLCB *gatt_cmd_dequeue(tGATT_TCB *p_tcb, UINT8 *p_op_code)
|
||||
|
||||
return p_clcb;
|
||||
}
|
||||
#endif // (GATTC_INCLUDED == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -2316,9 +2325,12 @@ void gatt_cleanup_upon_disc(BD_ADDR bda, UINT16 reason, tBT_TRANSPORT transport)
|
||||
gatt_clcb_dealloc(p_clcb);
|
||||
}
|
||||
}
|
||||
|
||||
#if (GATTC_INCLUDED == TRUE)
|
||||
btu_free_timer (&p_tcb->ind_ack_timer_ent);
|
||||
#endif // #if (GATTC_INCLUDED == TRUE)
|
||||
#if (GATTS_INCLUDED == TRUE)
|
||||
btu_free_timer (&p_tcb->conf_timer_ent);
|
||||
#endif // (GATTS_INCLUDED == TRUE)
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
gatt_free_pending_enc_queue(p_tcb);
|
||||
#endif // (SMP_INCLUDED == TRUE)
|
||||
|
||||
@@ -397,16 +397,18 @@ typedef struct {
|
||||
/* server response data */
|
||||
#if (GATTS_INCLUDED == TRUE)
|
||||
tGATT_SR_CMD sr_cmd;
|
||||
#endif ///GATTS_INCLUDED == TRUE
|
||||
UINT16 indicate_handle;
|
||||
|
||||
TIMER_LIST_ENT conf_timer_ent; /* peer confirm to indication timer */
|
||||
#endif ///GATTS_INCLUDED == TRUE
|
||||
|
||||
UINT8 prep_cnt[GATT_MAX_APPS];
|
||||
#if (GATTC_INCLUDED == TRUE)
|
||||
UINT8 ind_count;
|
||||
|
||||
tGATT_CMD_Q cl_cmd_q[GATT_CL_MAX_LCB];
|
||||
TIMER_LIST_ENT ind_ack_timer_ent; /* local app confirm to indication timer */
|
||||
#endif // (GATTC_INCLUDED == TRUE)
|
||||
UINT8 pending_cl_req;
|
||||
UINT8 next_slot_inq; /* index of next available slot in queue */
|
||||
#if (GATTS_ROBUST_CACHING_ENABLED == TRUE)
|
||||
|
||||
Reference in New Issue
Block a user