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

Commit 43a7079d authored by Zach Johnson's avatar Zach Johnson
Browse files

p_inq_tx_power_cmpl_cb is always null

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5f1afa5e3deaa03d36d5632e75eaae9d0474f470
parent 25bdb01e
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
@@ -1536,41 +1536,6 @@ void btm_inq_rmt_name_failed_cancelled(void) {
  btm_sec_rmt_name_request_complete(NULL, NULL, HCI_ERR_UNSPECIFIED);
}

/*******************************************************************************
 *
 * Function         btm_read_inq_tx_power_complete
 *
 * Description      read inquiry tx power level complete callback function.
 *
 * Returns          void
 *
 ******************************************************************************/
void btm_read_inq_tx_power_complete(uint8_t* p) {
  tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_inq_tx_power_cmpl_cb;
  tBTM_INQ_TXPWR_RESULT result;

  BTM_TRACE_DEBUG("%s", __func__);
  alarm_cancel(btm_cb.devcb.read_inq_tx_power_timer);
  btm_cb.devcb.p_inq_tx_power_cmpl_cb = NULL;

  /* If there was a registered callback, call it */
  if (p_cb) {
    STREAM_TO_UINT8(result.hci_status, p);

    if (result.hci_status == HCI_SUCCESS) {
      result.status = BTM_SUCCESS;

      STREAM_TO_UINT8(result.tx_power, p);
      BTM_TRACE_EVENT(
          "BTM INQ TX POWER Complete: tx_power %d, hci status 0x%02x",
          result.tx_power, result.hci_status);
    } else {
      result.status = BTM_ERR_PROCESSING;
    }

    (*p_cb)(&result);
  }
}
/*******************************************************************************
 *
 * Function         BTM_WriteEIR
+0 −3
Original line number Diff line number Diff line
@@ -93,9 +93,6 @@ typedef struct {
                                     /* read link quality function completes */

  alarm_t* read_inq_tx_power_timer;
  tBTM_CMPL_CB*
      p_inq_tx_power_cmpl_cb; /* Callback function to be called when  */
                              /* read inq tx power function completes  */

  alarm_t* read_tx_power_timer;     /* Read tx power timer */
  tBTM_CMPL_CB* p_tx_power_cmpl_cb; /* Callback function to be called       */
+0 −1
Original line number Diff line number Diff line
@@ -1277,7 +1277,6 @@ static void btu_hcif_hdl_command_complete(uint16_t opcode, uint8_t* p,
      break;

    case HCI_READ_INQ_TX_POWER_LEVEL:
      btm_read_inq_tx_power_complete(p);
      break;

    /* BLE Commands sComplete*/