mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 03:07:21 +02:00
- fix congest return value
- fix system no rsp when doing disconnect - fix no congest event when ssc do writing performance
This commit is contained in:
@ -68,6 +68,8 @@ static void bta_gattc_cong_cback (UINT16 conn_id, BOOLEAN congested);
|
|||||||
static void bta_gattc_req_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYPE type, tGATTS_DATA *p_data);
|
static void bta_gattc_req_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYPE type, tGATTS_DATA *p_data);
|
||||||
static tBTA_GATTC_FIND_SERVICE_CB bta_gattc_register_service_change_notify(UINT16 conn_id, BD_ADDR remote_bda);
|
static tBTA_GATTC_FIND_SERVICE_CB bta_gattc_register_service_change_notify(UINT16 conn_id, BD_ADDR remote_bda);
|
||||||
|
|
||||||
|
extern void btc_gattc_congest_callback(tBTA_GATTC *param);
|
||||||
|
|
||||||
static const tGATT_CBACK bta_gattc_cl_cback = {
|
static const tGATT_CBACK bta_gattc_cl_cback = {
|
||||||
bta_gattc_conn_cback,
|
bta_gattc_conn_cback,
|
||||||
bta_gattc_cmpl_cback,
|
bta_gattc_cmpl_cback,
|
||||||
@ -2168,17 +2170,10 @@ static void bta_gattc_cmpl_sendmsg(UINT16 conn_id, tGATTC_OPTYPE op,
|
|||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
static void bta_gattc_cong_cback (UINT16 conn_id, BOOLEAN congested)
|
static void bta_gattc_cong_cback (UINT16 conn_id, BOOLEAN congested)
|
||||||
{
|
{
|
||||||
tBTA_GATTC_CLCB *p_clcb;
|
|
||||||
tBTA_GATTC cb_data;
|
tBTA_GATTC cb_data;
|
||||||
|
cb_data.congest.conn_id = conn_id;
|
||||||
if ((p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id)) != NULL) {
|
cb_data.congest.congested = congested;
|
||||||
if (p_clcb->p_rcb->p_cback) {
|
btc_gattc_congest_callback(&cb_data);
|
||||||
cb_data.congest.conn_id = conn_id;
|
|
||||||
cb_data.congest.congested = congested;
|
|
||||||
|
|
||||||
(*p_clcb->p_rcb->p_cback)(BTA_GATTC_CONGEST_EVT, &cb_data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
@ -1011,4 +1011,16 @@ void btc_gattc_cb_handler(btc_msg_t *msg)
|
|||||||
btc_gattc_free_req_data(msg);
|
btc_gattc_free_req_data(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void btc_gattc_congest_callback(tBTA_GATTC *param)
|
||||||
|
{
|
||||||
|
esp_ble_gattc_cb_param_t esp_param = {0};
|
||||||
|
memset(&esp_param, 0, sizeof(esp_ble_gattc_cb_param_t));
|
||||||
|
|
||||||
|
uint8_t gattc_if = BTC_GATT_GET_GATT_IF(param->congest.conn_id);
|
||||||
|
esp_param.congest.conn_id = BTC_GATT_GET_CONN_ID(param->congest.conn_id);
|
||||||
|
esp_param.congest.congested = (param->congest.congested == TRUE) ? true : false;
|
||||||
|
btc_gattc_cb_to_app(ESP_GATTC_CONGEST_EVT, gattc_if, &esp_param);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif ///GATTC_INCLUDED == TRUE
|
#endif ///GATTC_INCLUDED == TRUE
|
||||||
|
@ -4577,7 +4577,9 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason)
|
|||||||
/* If page was delayed for disc complete, can do it now */
|
/* If page was delayed for disc complete, can do it now */
|
||||||
btm_cb.discing = FALSE;
|
btm_cb.discing = FALSE;
|
||||||
|
|
||||||
|
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||||
btm_acl_resubmit_page();
|
btm_acl_resubmit_page();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!p_dev_rec) {
|
if (!p_dev_rec) {
|
||||||
return;
|
return;
|
||||||
|
@ -1841,7 +1841,7 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
|
|||||||
fixed_queue_length(p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->xmit_hold_q),
|
fixed_queue_length(p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->xmit_hold_q),
|
||||||
p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->buff_quota);
|
p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->buff_quota);
|
||||||
osi_free(p_buf);
|
osi_free(p_buf);
|
||||||
return (L2CAP_DW_FAILED);
|
return (L2CAP_DW_CONGESTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
l2c_enqueue_peer_data (p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL], p_buf);
|
l2c_enqueue_peer_data (p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL], p_buf);
|
||||||
|
Reference in New Issue
Block a user