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

Commit 593ea0b8 authored by Chris Manton's avatar Chris Manton
Browse files

Use API stack/btm/btm_ble::get_hci_handle_for_hcif

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: Ibd7a8322121a2474b9b9b1e72b287e9878a245a1
parent a748fc1e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -763,9 +763,7 @@ void BTM_BleReadPhy(
  }
  BTM_TRACE_DEBUG("%s", __func__);

  tACL_CONN* p_acl = btm_bda_to_acl(bd_addr, BT_TRANSPORT_LE);

  if (p_acl == NULL) {
  if (!BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE)) {
    BTM_TRACE_ERROR("%s: Wrong mode: no LE link exist or LE not supported",
                    __func__);
    cb.Run(0, 0, HCI_ERR_NO_CONNECTION);
@@ -781,7 +779,7 @@ void BTM_BleReadPhy(
    return;
  }

  uint16_t handle = p_acl->hci_handle;
  uint16_t handle = get_hci_handle_for_hcif(bd_addr, BT_TRANSPORT_LE);

  const uint8_t len = HCIC_PARAM_SIZE_BLE_READ_PHY;
  uint8_t data[len];