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

Commit 2650d8da authored by Chris Manton's avatar Chris Manton
Browse files

Replace BTM_INQ_RESULT_[BLE|BR] with common definition

stack/include/bt_device_type.h:
enum {
  BT_DEVICE_TYPE_UNKNOWN = 0,
  BT_DEVICE_TYPE_BREDR = (1 << 0),
  BT_DEVICE_TYPE_BLE = (1 << 1),
  BT_DEVICE_TYPE_DUMO = BT_DEVICE_TYPE_BREDR | BT_DEVICE_TYPE_BLE,
};

Bug: 322366476
Test: m .
Flag: EXEMPT, preprocessor equivalent

Change-Id: I5193e09ce00f688b656b8cc665e1bb4864f87709
parent e9840099
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1438,7 +1438,7 @@ static void btif_dm_search_devices_evt(tBTA_DM_SEARCH_EVT event,
      uint8_t num_uuids = 0, max_num_uuid = 32;
      uint8_t uuid_list[32 * Uuid::kNumBytes16];

      if (p_search_data->inq_res.inq_result_type != BTM_INQ_RESULT_BLE) {
      if (p_search_data->inq_res.inq_result_type != BT_DEVICE_TYPE_BLE) {
        p_search_data->inq_res.remt_name_not_required =
            check_eir_remote_name(p_search_data, NULL, NULL);
      }
+1 −1
Original line number Diff line number Diff line
@@ -2311,7 +2311,7 @@ void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type,
  uint8_t len;

  /* Save the info */
  p_cur->inq_result_type |= BTM_INQ_RESULT_BLE;
  p_cur->inq_result_type |= BT_DEVICE_TYPE_BLE;
  p_cur->ble_addr_type = static_cast<tBLE_ADDR_TYPE>(addr_type);
  p_cur->rssi = rssi;
  p_cur->ble_primary_phy = primary_phy;
+3 −2
Original line number Diff line number Diff line
@@ -1406,7 +1406,7 @@ void btm_process_inq_results(const uint8_t* p, uint8_t hci_evt_len,
        }
      }

      p_cur->inq_result_type |= BTM_INQ_RESULT_BR;
      p_cur->inq_result_type |= BT_DEVICE_TYPE_BREDR;
      if (p_i->inq_count != btm_cb.btm_inq_vars.inq_counter) {
        p_cur->device_type = BT_DEVICE_TYPE_BREDR;
        p_i->scan_rsp = false;
@@ -1632,7 +1632,8 @@ tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint8_t origin,

      /* If the database entry exists for the device, use its clock offset */
      tINQ_DB_ENT* p_i = btm_inq_db_find(remote_bda);
      if (p_i && (p_i->inq_info.results.inq_result_type & BTM_INQ_RESULT_BR)) {
      if (p_i &&
          (p_i->inq_info.results.inq_result_type & BT_DEVICE_TYPE_BREDR)) {
        tBTM_INQ_INFO* p_cur = &p_i->inq_info;
        uint16_t clock_offset = p_cur->results.clock_offset | BTM_CLOCK_OFFSET_VALID;
        int clock_offset_in_cfg = 0;
+0 −3
Original line number Diff line number Diff line
@@ -304,8 +304,5 @@ struct tBTM_INQUIRY_VAR_ST {
  }
};

#define BTM_INQ_RESULT_BR 0x01
#define BTM_INQ_RESULT_BLE 0x02

bool btm_inq_find_bdaddr(const RawAddress& p_bda);
tINQ_DB_ENT* btm_inq_db_find(const RawAddress& p_bda);