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

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

Merge changes Ic1411faf,I0ef22f28,I645b787d,Ief031db6,I5c494deb, ...

* changes:
  Remove unused def SMP_DEBUG
  Remove name from BTM_SecAddBleDevice
  Re-log stack/l2cap/l2c_ble::
  enum-ify link stack/acl/btm_acl::policy settings
  Streamline main/shim/acl::_reason
  Streamline stack/btm/btm_ble_addr::btm_ble_addr_resolvable
  Streamline stack/btm/btm_ble_gap::btm_ble_update_adv_flag
  Streamline stack/btm/btm_ble_addr::btm_ble_resolve_random_addr
  enum-ify stack/btm/btm_ble_gap::BTM_BLE_
  Add main/shim/acl_legacy_interface::auth_complete
parents 221aa429 969bdb90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3410,7 +3410,7 @@ void bta_dm_add_blekey(const RawAddress& bd_addr, tBTA_LE_KEY_VALUE blekey,
 ******************************************************************************/
void bta_dm_add_ble_device(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
                           tBT_DEVICE_TYPE dev_type) {
  if (!BTM_SecAddBleDevice(bd_addr, NULL, dev_type, addr_type)) {
  if (!BTM_SecAddBleDevice(bd_addr, dev_type, addr_type)) {
    LOG(ERROR) << "BTA_DM: Error adding BLE Device for device " << bd_addr;
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -1863,7 +1863,7 @@ void btif_dm_create_bond_out_of_band(const RawAddress bd_addr, int transport,
    if (address_type == BLE_ADDR_PUBLIC || address_type == BLE_ADDR_RANDOM) {
      // bd_addr->address is already reversed, so use it instead of
      // oob_data->le_bt_dev_addr
      BTM_SecAddBleDevice(bd_addr, NULL, BT_DEVICE_TYPE_BLE, address_type);
      BTM_SecAddBleDevice(bd_addr, BT_DEVICE_TYPE_BLE, address_type);
    }
  }

+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ bt_status_t btif_gattc_test_command_impl(int command,
               params->bda1->ToString().c_str(), params->u1, params->u2);

      if (params->u1 == BT_DEVICE_TYPE_BLE)
        BTM_SecAddBleDevice(*params->bda1, NULL, BT_DEVICE_TYPE_BLE,
        BTM_SecAddBleDevice(*params->bda1, BT_DEVICE_TYPE_BLE,
                            static_cast<tBLE_ADDR_TYPE>(params->u2));

      if (!GATT_Connect(test_cb.gatt_if, *params->bda1, true, BT_TRANSPORT_LE,
+5 −6
Original line number Diff line number Diff line
@@ -482,23 +482,22 @@ void bluetooth::shim::legacy::Acl::CancelLeConnection(

void bluetooth::shim::legacy::Acl::OnClassicLinkDisconnected(
    HciHandle handle, hci::ErrorCode reason) {
  tHCI_STATUS legacy_reason = ToLegacyHciErrorCode(reason);
  LOG_DEBUG("Classic link disconnected handle:%hu reason:%s", handle,
            hci_error_code_text(legacy_reason).c_str());
            ErrorCodeText(reason).c_str());
  TRY_POSTING_ON_MAIN(acl_interface_.connection.classic.on_disconnected,
                      ToLegacyHciErrorCode(hci::ErrorCode::SUCCESS), handle,
                      legacy_reason);
                      ToLegacyHciErrorCode(reason));
  pimpl_->handle_to_classic_connection_map_.erase(handle);
}

void bluetooth::shim::legacy::Acl::OnLeLinkDisconnected(HciHandle handle,
                                                        hci::ErrorCode reason) {
  tHCI_STATUS legacy_reason = ToLegacyHciErrorCode(reason);
  LOG_DEBUG("Le link disconnected handle:%hu reason:%s", handle,
            hci_error_code_text(legacy_reason).c_str());
            ErrorCodeText(reason).c_str());
  pimpl_->handle_to_le_connection_map_.erase(handle);
  TRY_POSTING_ON_MAIN(acl_interface_.connection.le.on_disconnected,
                      ToLegacyHciErrorCode(hci::ErrorCode::SUCCESS), handle,
                      legacy_reason);
                      ToLegacyHciErrorCode(reason));
  pimpl_->handle_to_le_connection_map_.erase(handle);
}

+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ const acl_interface_t GetAclInterface() {
      .connection.le.on_failed = acl_ble_connection_fail,
      .connection.le.on_disconnected = btm_acl_disconnected,

      .link.classic.on_authentication_complete = nullptr,
      .link.classic.on_authentication_complete = btm_sec_auth_complete,
      .link.classic.on_change_connection_link_key_complete = nullptr,
      .link.classic.on_encryption_change = nullptr,
      .link.classic.on_flow_specification_complete = nullptr,
Loading