Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b0e46bd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I9f667570,I056a3fdc,I685a3220,I81cdee3a,I7e053cff

* changes:
  Properly use tHCI_STATUS and hci error code equivalence
  Use proper stack/btm/btm_sec::btm_status_text
  gd: Include hci handle in unsuccessful mode change event
  Use proper bta/gatt/bta_gattc_act::gatt_disconnection_reason_text
  Add gatt_disconnection_reason_text
parents 8b325fec ae001790
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2183,7 +2183,7 @@ static void bta_dm_local_name_cback(UNUSED_ATTR void* p_name) {
}

static void handle_role_change(const RawAddress& bd_addr, uint8_t new_role,
                               uint8_t hci_status) {
                               tHCI_STATUS hci_status) {
  tBTA_DM_PEER_DEVICE* p_dev = bta_dm_find_peer_device(bd_addr);
  if (!p_dev) {
    LOG_WARN(
@@ -2230,7 +2230,7 @@ static void handle_role_change(const RawAddress& bd_addr, uint8_t new_role,
}

void BTA_dm_report_role_change(const RawAddress bd_addr, uint8_t new_role,
                               uint8_t hci_status) {
                               tHCI_STATUS hci_status) {
  do_in_main_thread(
      FROM_HERE, base::Bind(handle_role_change, bd_addr, new_role, hci_status));
}
+2 −2
Original line number Diff line number Diff line
@@ -1068,12 +1068,12 @@ static void bta_gattc_conn_cback(tGATT_IF gattc_if, const RawAddress& bdaddr,
  if (connected) {
    LOG_INFO("Connected att_id:%hhu transport:%s reason:%s", gattc_if,
             BtTransportText(transport).c_str(),
             hci_error_code_text(reason).c_str());
             gatt_disconnection_reason_text(reason).c_str());
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_CONNECTED, GATT_CONN_UNKNOWN);
  } else {
    LOG_INFO("Disconnected att_id:%hhu transport:%s reason:%s", gattc_if,
             BtTransportText(transport).c_str(),
             hci_error_code_text(reason).c_str());
             gatt_disconnection_reason_text(reason).c_str());
    btif_debug_conn_state(bdaddr, BTIF_DEBUG_DISCONNECTED, GATT_CONN_UNKNOWN);
  }

+2 −1
Original line number Diff line number Diff line
@@ -19,11 +19,12 @@
#include <cstdint>

#include "stack/include/bt_types.h"
#include "stack/include/hci_error_code.h"
#include "types/bt_transport.h"
#include "types/raw_address.h"

void BTA_dm_acl_up(const RawAddress bd_addr, tBT_TRANSPORT transport);
void BTA_dm_acl_down(const RawAddress bd_addr, tBT_TRANSPORT transport);
void BTA_dm_report_role_change(const RawAddress bd_addr, uint8_t new_role,
                               uint8_t hci_status);
                               tHCI_STATUS hci_status);
void BTA_dm_notify_remote_features_complete(const RawAddress bd_addr);
+2 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include "bt_common.h"
#include "bt_target.h"
#include "osi/include/alarm.h"
#include "stack/include/hci_error_code.h"

#include <base/logging.h>
#include <base/threading/thread.h>
@@ -232,7 +233,7 @@ extern void bta_sys_chg_ssr_config(uint8_t id, uint8_t app_id,

extern void bta_sys_role_chg_register(tBTA_SYS_CONN_CBACK* p_cback);
extern void bta_sys_notify_role_chg(const RawAddress& peer_addr,
                                    uint8_t new_role, uint8_t hci_status);
                                    uint8_t new_role, tHCI_STATUS hci_status);
extern void bta_sys_collision_register(uint8_t bta_id,
                                       tBTA_SYS_CONN_CBACK* p_cback);
extern void bta_sys_notify_collision(const RawAddress& peer_addr);
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ void bta_sys_ssr_cfg_register(tBTA_SYS_SSR_CFG_CBACK* p_cback) {
 *
 ******************************************************************************/
void bta_sys_notify_role_chg(const RawAddress& peer_addr, uint8_t new_role,
                             uint8_t hci_status) {
                             tHCI_STATUS hci_status) {
  LOG_DEBUG("Role changed peer:%s new_role:%s hci_status:%s",
            PRIVATE_ADDRESS(peer_addr), RoleText(new_role).c_str(),
            hci_error_code_text(hci_status).c_str());
Loading