OSDN Git Service

p_inq_tx_power_cmpl_cb is always null
authorZach Johnson <zachoverflow@google.com>
Wed, 19 Aug 2020 17:25:48 +0000 (10:25 -0700)
committerZach Johnson <zachoverflow@google.com>
Wed, 19 Aug 2020 17:35:51 +0000 (10:35 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5f1afa5e3deaa03d36d5632e75eaae9d0474f470

stack/btm/btm_inq.cc
stack/btm/security_device_record.h
stack/btu/btu_hcif.cc

index 6b5a5d0..214f883 100644 (file)
@@ -1538,41 +1538,6 @@ void btm_inq_rmt_name_failed_cancelled(void) {
 
 /*******************************************************************************
  *
- * 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
  *
  * Description      This function is called to write EIR data to controller.
index d0e7f28..38592fc 100644 (file)
@@ -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       */
index eb2188c..6eee125 100644 (file)
@@ -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*/