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

Commit d98a0635 authored by Chris Manton's avatar Chris Manton
Browse files

Remove constant var tBTM_CB::tBTM_BLE_CB::tBTM_BLE_INQ_CB::scan_duplicate_filter

Always set to same value

Towards readable code

Bug: 163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones

Change-Id: I808a6fd2466d7f72f0ab41d2862e3bf64910f718
parent 1e67b92c
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -420,7 +420,6 @@ tBTM_STATUS BTM_BleObserve(bool start, uint8_t duration,
          p_inq->scan_type, (uint16_t)scan_interval, (uint16_t)scan_window,
          btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, BTM_BLE_DEFAULT_SFP);

      p_inq->scan_duplicate_filter = BTM_BLE_DUPLICATE_DISABLE;
      status = btm_ble_start_scan();
    }

@@ -1166,7 +1165,6 @@ tBTM_STATUS btm_ble_start_inquiry(uint8_t duration) {
    /* enable IRK list */
    btm_ble_enable_resolving_list_for_platform(BTM_BLE_RL_SCAN);
    p_ble_cb->inq_var.scan_type = BTM_BLE_SCAN_MODE_ACTI;
    p_ble_cb->inq_var.scan_duplicate_filter = BTM_BLE_DUPLICATE_DISABLE;
    status = btm_ble_start_scan();
  } else if ((p_ble_cb->inq_var.scan_interval !=
              BTM_BLE_LOW_LATENCY_SCAN_INT) ||
@@ -1920,7 +1918,7 @@ void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* data) {
tBTM_STATUS btm_ble_start_scan(void) {
  tBTM_BLE_INQ_CB* p_inq = &btm_cb.ble_ctr_cb.inq_var;
  /* start scan, disable duplicate filtering */
  btm_send_hci_scan_enable(BTM_BLE_SCAN_ENABLE, p_inq->scan_duplicate_filter);
  btm_send_hci_scan_enable(BTM_BLE_SCAN_ENABLE, BTM_BLE_DUPLICATE_DISABLE);

  if (p_inq->scan_type == BTM_BLE_SCAN_MODE_ACTI)
    btm_ble_set_topology_mask(BTM_BLE_STATE_ACTIVE_SCAN_BIT);
+0 −1
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@ typedef struct {
  uint32_t scan_window;
  uint32_t scan_interval;
  uint8_t scan_type;             /* current scan type: active or passive */
  uint8_t scan_duplicate_filter; /* duplicate filter enabled for scan */

  tBTM_BLE_AFP afp; /* advertising filter policy */
  tBTM_BLE_SFP sfp; /* scanning filter policy */