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

Commit 42ca9ed2 authored by Myles Watson's avatar Myles Watson
Browse files

bt_target.h: Remove BTM_NO_SSP_ON_INQUIRY

Bug: 327390105
Test: mma -j32
Flag: EXEMPT, build-only change
Change-Id: I759cf570961eb166bbf8c6256479e29efbfb0dac
parent 7b891ce8
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -192,11 +192,6 @@
 *
 *****************************************************************************/

/* Cancel Inquiry on incoming SSP */
#ifndef BTM_NO_SSP_ON_INQUIRY
#define BTM_NO_SSP_ON_INQUIRY FALSE
#endif

#ifndef DISABLE_WBS
#define DISABLE_WBS FALSE
#endif
+2 −24
Original line number Diff line number Diff line
@@ -1066,7 +1066,6 @@ void btm_inq_db_init(void) {
  alarm_free(btm_cb.btm_inq_vars.remote_name_timer);
  btm_cb.btm_inq_vars.remote_name_timer =
      alarm_new("btm_inq.remote_name_timer");
  btm_cb.btm_inq_vars.no_inc_ssp = BTM_NO_SSP_ON_INQUIRY;
  btm_inq_db_set_inq_by_rssi();
}

@@ -1088,31 +1087,10 @@ void btm_inq_db_set_inq_by_rssi(void) {
 *
 ******************************************************************************/
void btm_inq_stop_on_ssp(void) {
  uint8_t normal_active = (BTM_GENERAL_INQUIRY_ACTIVE);

#if (BTM_INQ_DEBUG == TRUE)
  log::verbose("btm_inq_stop_on_ssp: no_inc_ssp={} inq_active:0x{:x} state:{} ",
               btm_cb.btm_inq_vars.no_inc_ssp, btm_cb.btm_inq_vars.inq_active,
               btm_cb.btm_inq_vars.state);
  log::verbose("btm_inq_stop_on_ssp: inq_active:0x{:x} state:{} ",
               btm_cb.btm_inq_vars.inq_active, btm_cb.btm_inq_vars.state);
#endif
  if (btm_cb.btm_inq_vars.no_inc_ssp) {
    if (btm_cb.btm_inq_vars.state == BTM_INQ_ACTIVE_STATE) {
      if (btm_cb.btm_inq_vars.inq_active & normal_active) {
        /* can not call BTM_CancelInquiry() here. We need to report inquiry
         * complete evt */
        bluetooth::shim::GetHciLayer()->EnqueueCommand(
            bluetooth::hci::InquiryCancelBuilder::Create(),
            get_main_thread()->BindOnce(
                [](bluetooth::hci::CommandCompleteView complete_view) {
                  bluetooth::hci::check_complete<
                      bluetooth::hci::InquiryCancelCompleteView>(complete_view);
                  btm_process_cancel_complete(HCI_SUCCESS, BTM_BR_INQUIRY_MASK);
                }));
      }
    }
    /* do not allow inquiry to start */
    btm_cb.btm_inq_vars.inq_active |= BTM_SSP_INQUIRY_ACTIVE;
  }
}

/*******************************************************************************
+0 −2
Original line number Diff line number Diff line
@@ -264,7 +264,6 @@ struct tBTM_INQUIRY_VAR_ST {

  uint8_t state;      /* Current state that the inquiry process is in */
  uint8_t inq_active; /* Bit Mask indicating type of inquiry is active */
  bool no_inc_ssp;    /* true, to stop inquiry on incoming SSP */

  bool registered_for_hci_events;

@@ -300,7 +299,6 @@ struct tBTM_INQUIRY_VAR_ST {
    per_max_delay = 0;
    state = BTM_INQ_INACTIVE_STATE;
    inq_active = 0;
    no_inc_ssp = BTM_NO_SSP_ON_INQUIRY;
    registered_for_hci_events = false;
  }
  void Free() {