mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_bredr_read_rssi_delta_v4.2' into 'release/v4.2'
Bugfix/Fix Read Rssi Delta Bug in Bredr [backport v4.2] See merge request espressif/esp-idf!10801
This commit is contained in:
commit
2454ffc912
@ -831,15 +831,13 @@ void bta_dm_ble_read_adv_tx_power(tBTA_DM_MSG *p_data)
|
||||
#endif ///BLE_INCLUDED == TRUE
|
||||
}
|
||||
|
||||
void bta_dm_ble_read_rssi(tBTA_DM_MSG *p_data)
|
||||
void bta_dm_read_rssi(tBTA_DM_MSG *p_data)
|
||||
{
|
||||
#if (BLE_INCLUDED == TRUE)
|
||||
if (p_data->rssi.read_rssi_cb != NULL) {
|
||||
BTM_ReadRSSI(p_data->rssi.remote_addr, p_data->rssi.transport, p_data->rssi.read_rssi_cb);
|
||||
} else {
|
||||
APPL_TRACE_ERROR("%s(), the callback function can't be NULL.", __func__);
|
||||
}
|
||||
#endif ///BLE_INCLUDED == TRUE
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -326,11 +326,11 @@ void BTA_DmBleReadAdvTxPower(tBTA_CMPL_CB *cmpl_cb)
|
||||
}
|
||||
#endif ///BLE_INCLUDED == TRUE
|
||||
|
||||
void BTA_DmBleReadRSSI(BD_ADDR remote_addr, tBTA_TRANSPORT transport, tBTA_CMPL_CB *cmpl_cb)
|
||||
void BTA_DmReadRSSI(BD_ADDR remote_addr, tBTA_TRANSPORT transport, tBTA_CMPL_CB *cmpl_cb)
|
||||
{
|
||||
tBTA_DM_API_READ_RSSI *p_msg;
|
||||
if ((p_msg = (tBTA_DM_API_READ_RSSI *)osi_malloc(sizeof(tBTA_DM_API_READ_RSSI))) != NULL) {
|
||||
p_msg->hdr.event = BTA_DM_API_BLE_READ_RSSI_EVT;
|
||||
p_msg->hdr.event = BTA_DM_API_READ_RSSI_EVT;
|
||||
memcpy(p_msg->remote_addr, remote_addr, sizeof(BD_ADDR));
|
||||
p_msg->transport = transport;
|
||||
p_msg->read_rssi_cb = cmpl_cb;
|
||||
|
@ -165,7 +165,7 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
|
||||
bta_dm_ble_set_channels, /* BTA_DM_API_BLE_SET_CHANNELS_EVT */
|
||||
bta_dm_update_white_list, /* BTA_DM_API_UPDATE_WHITE_LIST_EVT */
|
||||
bta_dm_ble_read_adv_tx_power, /* BTA_DM_API_BLE_READ_ADV_TX_POWER_EVT */
|
||||
bta_dm_ble_read_rssi, /* BTA_DM_API_BLE_READ_RSSI_EVT */
|
||||
bta_dm_read_rssi, /* BTA_DM_API_READ_RSSI_EVT */
|
||||
#if BLE_INCLUDED == TRUE
|
||||
bta_dm_ble_update_duplicate_exceptional_list,/* BTA_DM_API_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_EVT */
|
||||
#endif
|
||||
|
@ -161,7 +161,7 @@ enum {
|
||||
BTA_DM_API_BLE_SET_CHANNELS_EVT,
|
||||
BTA_DM_API_UPDATE_WHITE_LIST_EVT,
|
||||
BTA_DM_API_BLE_READ_ADV_TX_POWER_EVT,
|
||||
BTA_DM_API_BLE_READ_RSSI_EVT,
|
||||
BTA_DM_API_READ_RSSI_EVT,
|
||||
#if BLE_INCLUDED == TRUE
|
||||
BTA_DM_API_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_EVT,
|
||||
#endif
|
||||
@ -844,8 +844,8 @@ typedef union {
|
||||
tBTA_DM_API_BLE_SET_CHANNELS ble_set_channels;
|
||||
tBTA_DM_API_UPDATE_WHITE_LIST white_list;
|
||||
tBTA_DM_API_READ_ADV_TX_POWER read_tx_power;
|
||||
tBTA_DM_API_READ_RSSI rssi;
|
||||
#endif ///BLE_INCLUDED == TRUE
|
||||
tBTA_DM_API_READ_RSSI rssi;
|
||||
|
||||
tBTA_DM_API_SET_VISIBILITY set_visibility;
|
||||
|
||||
@ -1304,7 +1304,7 @@ extern void bta_dm_read_rmt_name(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_set_channels (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_update_white_list(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_read_adv_tx_power(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_read_rssi(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_read_rssi(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_set_visibility (tBTA_DM_MSG *p_data);
|
||||
|
||||
extern void bta_dm_set_scan_config(tBTA_DM_MSG *p_data);
|
||||
|
@ -1528,7 +1528,7 @@ extern void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE
|
||||
extern void BTA_DmBleReadAdvTxPower(tBTA_CMPL_CB *cmpl_cb);
|
||||
#endif ///BLE_INCLUDED == TRUE
|
||||
|
||||
extern void BTA_DmBleReadRSSI(BD_ADDR remote_addr, tBTA_TRANSPORT transport, tBTA_CMPL_CB *cmpl_cb);
|
||||
extern void BTA_DmReadRSSI(BD_ADDR remote_addr, tBTA_TRANSPORT transport, tBTA_CMPL_CB *cmpl_cb);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
@ -1154,7 +1154,7 @@ void btc_gap_ble_call_handler(btc_msg_t *msg)
|
||||
BTA_DmUpdateWhiteList(arg->update_white_list.add_remove, arg->update_white_list.remote_bda, arg->update_white_list.wl_addr_type, btc_add_whitelist_complete_callback);
|
||||
break;
|
||||
case BTC_GAP_BLE_ACT_READ_RSSI:
|
||||
BTA_DmBleReadRSSI(arg->read_rssi.remote_addr, BTA_TRANSPORT_LE, btc_read_ble_rssi_cmpl_callback);
|
||||
BTA_DmReadRSSI(arg->read_rssi.remote_addr, BTA_TRANSPORT_LE, btc_read_ble_rssi_cmpl_callback);
|
||||
break;
|
||||
case BTC_GAP_BLE_ACT_SET_CONN_PARAMS:
|
||||
BTA_DmSetBlePrefConnParams(arg->set_conn_params.bd_addr, arg->set_conn_params.min_conn_int,
|
||||
|
@ -639,7 +639,7 @@ static void btc_gap_bt_read_rssi_delta_cmpl_callback(void *p_data)
|
||||
|
||||
static void btc_gap_bt_read_rssi_delta(btc_gap_bt_args_t *arg)
|
||||
{
|
||||
BTA_DmBleReadRSSI(arg->read_rssi_delta.bda.address, BTA_TRANSPORT_BR_EDR, btc_gap_bt_read_rssi_delta_cmpl_callback);
|
||||
BTA_DmReadRSSI(arg->read_rssi_delta.bda.address, BTA_TRANSPORT_BR_EDR, btc_gap_bt_read_rssi_delta_cmpl_callback);
|
||||
}
|
||||
|
||||
static esp_err_t btc_gap_bt_remove_bond_device(btc_gap_bt_args_t *arg)
|
||||
|
Loading…
Reference in New Issue
Block a user