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

Commit 13173b8e authored by Satya Calloji's avatar Satya Calloji Committed by Prerepa Viswanadham
Browse files

All 00 mac address with advt

Read the controller features before local name read

Bug 17505545 
Change-Id: I7995a8c714ebec6e1751af5371edfd29c74b12ea
parent b2c07391
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -384,6 +384,11 @@ static void bta_dm_sys_hw_cback( tBTA_SYS_HW_EVT status )
#else
        BTM_AclRegisterForChanges(bta_dm_acl_change_cback);
#endif

#if BLE_VND_INCLUDED == TRUE
        BTM_BleReadControllerFeatures (bta_dm_ctrl_features_rd_cmpl_cback);
#endif

        /* Earlier, we used to invoke BTM_ReadLocalAddr which was just copying the bd_addr
           from the control block and invoking the callback which was sending the DM_ENABLE_EVT.
           But then we have a few HCI commands being invoked above which were still in progress
@@ -3184,9 +3189,6 @@ static void bta_dm_local_name_cback(UINT8 *p_name)
    if(bta_dm_cb.p_sec_cback)
        bta_dm_cb.p_sec_cback(BTA_DM_ENABLE_EVT, &sec_event);

#if BLE_VND_INCLUDED == TRUE
    BTM_BleReadControllerFeatures (bta_dm_ctrl_features_rd_cmpl_cback);
#endif
}

/*******************************************************************************
+5 −0
Original line number Diff line number Diff line
@@ -453,6 +453,7 @@ static void btm_ble_vendor_capability_vsc_cmpl_cback (tBTM_VSC_CMPL *p_vcs_cplt_
        STREAM_TO_UINT8  (btm_cb.cmn_ble_vsc_cb.filter_support, p);
        STREAM_TO_UINT8  (btm_cb.cmn_ble_vsc_cb.max_filter, p);
        STREAM_TO_UINT8  (btm_cb.cmn_ble_vsc_cb.energy_support, p);
        btm_cb.cmn_ble_vsc_cb.values_read = TRUE;
    }

    BTM_TRACE_DEBUG("btm_ble_vnd_cap_vsc_cmpl_cback: stat=%d, irk=%d, ADV ins:%d, rpa=%d, ener=%d",
@@ -513,6 +514,9 @@ BTM_API extern void BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB *p_cmn_vsc_cb)
*******************************************************************************/
BTM_API extern void BTM_BleReadControllerFeatures(tBTM_BLE_CTRL_FEATURES_CBACK  *p_vsc_cback)
{
    if (TRUE == btm_cb.cmn_ble_vsc_cb.values_read)
        return;

#if BLE_VND_INCLUDED == TRUE
    BTM_TRACE_DEBUG("BTM_BleReadControllerFeatures");

@@ -3078,6 +3082,7 @@ void btm_ble_init (void)

    memset(p_cb, 0, sizeof(tBTM_BLE_CB));
    memset(&(btm_cb.cmn_ble_vsc_cb), 0 , sizeof(tBTM_BLE_VSC_CB));
    btm_cb.cmn_ble_vsc_cb.values_read = FALSE;
    p_cb->cur_states       = 0;

    p_cb->inq_var.adv_mode = BTM_BLE_ADV_DISABLE;
+1 −0
Original line number Diff line number Diff line
@@ -334,6 +334,7 @@ typedef struct
    UINT8 filter_support;
    UINT8 max_filter;
    UINT8 energy_support;
    BOOLEAN values_read;
}tBTM_BLE_VSC_CB;

/* slave preferred connection interval range */