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

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

Merge "Remove some unused inquiry code and callback function"

parents b11e1436 1db28093
Loading
Loading
Loading
Loading
+2 −25
Original line number Diff line number Diff line
@@ -672,18 +672,8 @@ tBTM_STATUS BTM_StartInquiry(tBTM_INQ_PARMS* p_inqparms,
  /* Only one active inquiry is allowed in this implementation.
     Also do not allow an inquiry if the inquiry filter is being updated */
  if (p_inq->inq_active || p_inq->inqfilt_active) {
    /*check if LE observe is already running*/
    if (p_inq->scan_type == INQ_LE_OBSERVE &&
        p_inq->p_inq_ble_results_cb != nullptr) {
      BTM_TRACE_API("BTM_StartInquiry: LE observe in progress");
      p_inq->scan_type = INQ_GENERAL;
      p_inq->inq_active = BTM_INQUIRY_INACTIVE;
      btm_cb.ble_ctr_cb.inq_var.scan_type = BTM_BLE_SCAN_MODE_NONE;
      btm_send_hci_scan_enable(BTM_BLE_SCAN_DISABLE, BTM_BLE_DUPLICATE_ENABLE);
    } else {
    LOG(ERROR) << __func__ << ": BTM_BUSY";
    return (BTM_BUSY);
    }
  } else {
    p_inq->scan_type = INQ_GENERAL;
  }
@@ -1762,13 +1752,6 @@ void btm_process_inq_complete(uint8_t status, uint8_t mode) {

  p_inq->inqparms.mode &= ~(mode);

  if (p_inq->scan_type == INQ_LE_OBSERVE && !p_inq->inq_active) {
    /*end of LE observe*/
    p_inq->p_inq_ble_results_cb = NULL;
    p_inq->p_inq_ble_cmpl_cb = NULL;
    p_inq->scan_type = INQ_NONE;
  }

#if (BTM_INQ_DEBUG == TRUE)
  BTM_TRACE_DEBUG(
      "btm_process_inq_complete inq_active:0x%x state:%d inqfilt_active:%d",
@@ -1815,12 +1798,6 @@ void btm_process_inq_complete(uint8_t status, uint8_t mode) {
      p_inq->scan_type == INQ_GENERAL)  // this inquiry is complete
  {
    p_inq->scan_type = INQ_NONE;
    /* check if the LE observe is pending */
    if (p_inq->p_inq_ble_results_cb != NULL) {
      BTM_TRACE_DEBUG("BTM Inq Compl: resuming a pending LE scan");
      BTM_BleObserve(1, 0, p_inq->p_inq_ble_results_cb,
                     p_inq->p_inq_ble_cmpl_cb);
    }
  }
#if (BTM_INQ_DEBUG == TRUE)
  BTM_TRACE_DEBUG("inq_active:0x%x state:%d inqfilt_active:%d",
+1 −5
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ typedef struct {
  bool scan_rsp;
} tINQ_DB_ENT;

enum { INQ_NONE, INQ_LE_OBSERVE, INQ_GENERAL };
enum { INQ_NONE, INQ_GENERAL };
typedef uint8_t tBTM_INQ_TYPE;

typedef struct {
@@ -252,10 +252,6 @@ typedef struct {

  tBTM_CMPL_CB* p_inq_cmpl_cb;
  tBTM_INQ_RESULTS_CB* p_inq_results_cb;
  tBTM_CMPL_CB*
      p_inq_ble_cmpl_cb; /*completion callback exclusively for LE Observe*/
  tBTM_INQ_RESULTS_CB*
      p_inq_ble_results_cb; /*results callback exclusively for LE observe*/
  tBTM_CMPL_CB* p_inqfilter_cmpl_cb; /* Called (if not NULL) after inquiry
                                        filter completed */
  uint32_t inq_counter; /* Counter incremented each time an inquiry completes */
+0 −2
Original line number Diff line number Diff line
@@ -38,8 +38,6 @@ typedef uint8_t tBTM_BLE_CHNL_MAP[CHNL_MAP_LEN];
#define BTM_BLE_CONNECT_LO_DUTY_DIR_EVT 0x04
/* 0x00 - 0x05 can be received on adv event type */
#define BTM_BLE_SCAN_RSP_EVT 0x04
#define BTM_BLE_SCAN_REQ_EVT 0x05
#define BTM_BLE_UNKNOWN_EVT 0xff

#define BTM_BLE_UNKNOWN_EVT 0xff