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

Commit ca75f1e7 authored by Sharvil Nanavati's avatar Sharvil Nanavati
Browse files

Disable BLE address randomization since it causes excessive timer wakeups.

Change-Id: Ib4c2265d30b8bbaa7b5302537e446e18a97e2cad
parent 3df39894
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1300,7 +1300,7 @@ and USER_HW_DISABLE_API macros */
#endif

#ifndef BLE_PRIVACY_SPT
#define BLE_PRIVACY_SPT      TRUE
#define BLE_PRIVACY_SPT      FALSE
#endif

#ifndef BLE_MULTI_ADV_INCLUDED
+4 −0
Original line number Diff line number Diff line
@@ -251,12 +251,14 @@ tBTM_STATUS btm_ble_multi_adv_set_params (tBTM_BLE_MULTI_ADV_INST *p_inst,
    UINT16_TO_STREAM (pp, p_params->adv_int_max);
    UINT8_TO_STREAM  (pp, p_params->adv_type);

#if BLE_PRIVACY_SPT
    if (btm_cb.ble_ctr_cb.privacy)
    {
        UINT8_TO_STREAM  (pp, BLE_ADDR_RANDOM);
        BDADDR_TO_STREAM (pp, p_inst->rpa);
    }
    else
#endif
    {
        UINT8_TO_STREAM  (pp, BLE_ADDR_PUBLIC);
        BDADDR_TO_STREAM (pp, btm_cb.devcb.local_addr);
@@ -293,6 +295,7 @@ tBTM_STATUS btm_ble_multi_adv_set_params (tBTM_BLE_MULTI_ADV_INST *p_inst,
    {
        p_inst->adv_evt = p_params->adv_type;

#if BLE_PRIVACY_SPT
        if (btm_cb.ble_ctr_cb.privacy)
        {
            /* start timer */
@@ -300,6 +303,7 @@ tBTM_STATUS btm_ble_multi_adv_set_params (tBTM_BLE_MULTI_ADV_INST *p_inst,
            btu_start_timer (&p_inst->raddr_timer_ent, BTU_TTYPE_BLE_RANDOM_ADDR,
                             BTM_BLE_PRIVATE_ADDR_INT);
        }
#endif
        btm_ble_multi_adv_enq_op_q(BTM_BLE_MULTI_ADV_SET_PARAM, p_inst->inst_id, cb_evt);
    }
    return rt;