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

Commit 1e4533af authored by Chris Manton's avatar Chris Manton
Browse files

Properly retrieve acl_conn stack/acl/btm_acl::btm_read_tx_power_complete

Towards encapsulation

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ib916439e3d5c0580ce299ee2b5b3b2c07161a78b
parent fab1a423
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -1811,7 +1811,6 @@ void btm_read_tx_power_timeout(UNUSED_ATTR void* data) {
void btm_read_tx_power_complete(uint8_t* p, bool is_ble) {
  tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_tx_power_cmpl_cb;
  tBTM_TX_POWER_RESULT result;
  tACL_CONN* p_acl_cb = &btm_cb.acl_cb_.acl_db[0];

  alarm_cancel(btm_cb.devcb.read_tx_power_timer);
  btm_cb.devcb.p_tx_power_cmpl_cb = NULL;
@@ -1828,12 +1827,9 @@ void btm_read_tx_power_complete(uint8_t* p, bool is_ble) {
        STREAM_TO_UINT16(handle, p);
        STREAM_TO_UINT8(result.tx_power, p);

        /* Search through the list of active channels for the correct BD Addr */
        for (uint16_t index = 0; index < MAX_L2CAP_LINKS; index++, p_acl_cb++) {
          if ((p_acl_cb->in_use) && (handle == p_acl_cb->hci_handle)) {
        tACL_CONN* p_acl_cb = internal_.acl_get_connection_from_handle(handle);
        if (p_acl_cb != nullptr) {
          result.rem_bda = p_acl_cb->remote_addr;
            break;
          }
        }
      } else {
        STREAM_TO_UINT8(result.tx_power, p);