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

Commit 3102985a authored by Satya Calloji's avatar Satya Calloji
Browse files

LE: Add RRA offloading and vendor specific PCF commands

Change-Id: Iadca8e73ceaadcd0429421ea70f1b76644e88c42
parent 472f2a2d
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1820,7 +1820,23 @@ void BTA_DmBleEnableRemotePrivacy(BD_ADDR bd_addr, BOOLEAN privacy_enable)
*******************************************************************************/
void BTA_DmBleConfigLocalPrivacy(BOOLEAN privacy_enable)
{
#if BLE_INCLUDED == TRUE
#if BLE_VND_INCLUDED == TRUE && BLE_PRIVACY_SPT == TRUE
    tBTA_DM_API_LOCAL_PRIVACY *p_msg;

    if ((p_msg = (tBTA_DM_API_LOCAL_PRIVACY *) GKI_getbuf(sizeof(tBTA_DM_API_ENABLE_PRIVACY))) != NULL)
    {
        memset (p_msg, 0, sizeof(tBTA_DM_API_LOCAL_PRIVACY));

        p_msg->hdr.event = BTA_DM_API_LOCAL_PRIVACY_EVT;
        p_msg->privacy_enable   = privacy_enable;

        bta_sys_sendmsg(p_msg);
    }
#endif
#else
    UNUSED(privacy_enable);
#endif
}
#endif

+3 −0
Original line number Diff line number Diff line
@@ -1101,6 +1101,9 @@ extern void bta_dm_ble_set_scan_params (tBTA_DM_MSG *p_data);
extern void bta_dm_close_gatt_conn(tBTA_DM_MSG *p_data);
extern void bta_dm_ble_observe (tBTA_DM_MSG *p_data);
extern void bta_dm_ble_update_conn_params (tBTA_DM_MSG *p_data);
#if BLE_PRIVACY_SPT == TRUE
extern void bta_dm_ble_config_local_privacy (tBTA_DM_MSG *p_data);
#endif
extern void bta_dm_ble_set_adv_params (tBTA_DM_MSG *p_data);
extern void bta_dm_ble_set_adv_config (tBTA_DM_MSG *p_data);
extern void bta_dm_ble_set_scan_rsp (tBTA_DM_MSG *p_data);
+3 −0
Original line number Diff line number Diff line
@@ -1357,6 +1357,9 @@ static void btif_dm_upstreams_evt(UINT16 event, char* p_param)
             btif_storage_load_autopair_device_list();

             btif_enable_bluetooth_evt(p_data->enable.status, p_data->enable.bd_addr);

             /* Enable local privacy */
             BTA_DmBleConfigLocalPrivacy(TRUE);
        }
        break;

+3 −0
Original line number Diff line number Diff line
@@ -1307,6 +1307,9 @@ and USER_HW_DISABLE_API macros */
#define BLE_MULTI_ADV_INCLUDED  TRUE
#endif

#ifndef BLE_VND_INCLUDED
#define BLE_VND_INCLUDED        TRUE
#endif

/******************************************************************************
**
+11 −0
Original line number Diff line number Diff line
@@ -38,6 +38,10 @@
#include "gap_api.h"
#include "bt_utils.h"

#if (defined BLE_VND_INCLUDED && BLE_VND_INCLUDED == TRUE)
#include "vendor_ble.h"
#endif

#if SMP_INCLUDED == TRUE
extern BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length, UINT16 tlen, UINT8 *p_signature);
extern void smp_link_encrypted(BD_ADDR bda, UINT8 encr_enable);
@@ -1613,6 +1617,10 @@ void btm_ble_connected (UINT8 *bda, UINT16 handle, UINT8 enc_mode, UINT8 role,

    if (p_dev_rec->ble.ble_addr_type == BLE_ADDR_RANDOM && !addr_matched)
        memcpy(p_dev_rec->ble.cur_rand_addr, bda, BD_ADDR_LEN);

#if (defined BLE_VND_INCLUDED && BLE_VND_INCLUDED == TRUE)
    btm_ble_vendor_disable_irk_list();
#endif
#endif

    if (role == HCI_ROLE_SLAVE)
@@ -1649,6 +1657,9 @@ void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len)
    if (status == 0)
    {
#if (BLE_PRIVACY_SPT == TRUE )
#if (BLE_VND_INCLUDED == TRUE)
        match = btm_public_addr_to_random_pseudo (bda, &bda_type);
#endif
        /* possiblly receive connection complete with resolvable random on
           slave role while the device has been paired */
        if (!match && role == HCI_ROLE_SLAVE && BTM_BLE_IS_RESOLVE_BDA(bda))
Loading