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

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

Use correct typed values BTM_BLE

BTM_BLE_CONNECT_EVT == BTM_BLE_ADV_IND_EVT == 0

btm_cb.ble_ctr_cb.inq_var.directed_conn

Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I88ee710608613a840e0347e9b7dcd9e3ede667f5
parent 74b7b1ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1751,7 +1751,7 @@ void btm_ble_connected(const RawAddress& bda, uint16_t handle, uint8_t enc_mode,
  if (!addr_matched && p_dev_rec->ble.ble_addr_type == BLE_ADDR_RANDOM) {
    p_dev_rec->ble.cur_rand_addr = bda;
  }
  btm_cb.ble_ctr_cb.inq_var.directed_conn = BTM_BLE_CONNECT_EVT;
  btm_cb.ble_ctr_cb.inq_var.directed_conn = BTM_BLE_ADV_IND_EVT;
}

void btm_ble_connected_from_address_with_type(
+2 −2
Original line number Diff line number Diff line
@@ -2304,7 +2304,7 @@ static void btm_ble_update_link_topology_mask(uint8_t link_role,
  if (link_role == HCI_ROLE_SLAVE && increase) {
    btm_cb.ble_ctr_cb.inq_var.adv_mode = BTM_BLE_ADV_DISABLE;
    /* make device fall back into undirected adv mode by default */
    btm_cb.ble_ctr_cb.inq_var.directed_conn = BTM_BLE_CONNECT_EVT;
    btm_cb.ble_ctr_cb.inq_var.directed_conn = BTM_BLE_ADV_IND_EVT;
    /* clear all adv states */
    btm_ble_clear_topology_mask(BTM_BLE_STATE_ALL_ADV_MASK);
  }
@@ -2333,7 +2333,7 @@ void btm_ble_update_mode_operation(uint8_t link_role, const RawAddress* bd_addr,
  if (status == HCI_ERR_ADVERTISING_TIMEOUT) {
    btm_cb.ble_ctr_cb.inq_var.adv_mode = BTM_BLE_ADV_DISABLE;
    /* make device fall back into undirected adv mode by default */
    btm_cb.ble_ctr_cb.inq_var.directed_conn = BTM_BLE_CONNECT_EVT;
    btm_cb.ble_ctr_cb.inq_var.directed_conn = BTM_BLE_ADV_IND_EVT;
    /* clear all adv states */
    btm_ble_clear_topology_mask(BTM_BLE_STATE_ALL_ADV_MASK);
  }