Support for reading LE specific controller features
Support for reading LE specific controller features via get adapter properties
API
Change-Id: Ia0b813be45fb826ce27d1d7a31ca41650d7286dd
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 95b02de..8a06e18 100644
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -1360,6 +1360,7 @@
#if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE))
/* Enable local privacy */
+ /*TODO Should this call be exposed to JAVA...? */
BTA_DmBleConfigLocalPrivacy(TRUE);
#endif
}
@@ -1611,6 +1612,34 @@
BTIF_TRACE_DEBUG0("BTA_DM_BLE_KEY_EVT. ");
btif_dm_ble_auth_cmpl_evt(&p_data->auth_cmpl);
break;
+
+ case BTA_DM_LE_FEATURES_READ:
+ {
+ tBTM_BLE_VSC_CB cmn_vsc_cb;
+ bt_local_le_features_t local_le_features;
+ char buf[512];
+ bt_property_t prop;
+ prop.type = BT_PROPERTY_LOCAL_LE_FEATURES;
+ prop.val = (void*)buf;
+ prop.len = sizeof(buf);
+
+ /* LE features are not stored in storage. Should be retrived from stack */
+ BTM_BleGetVendorCapabilities(&cmn_vsc_cb);
+ local_le_features.local_privacy_enabled = BTM_BleLocalPrivacyEnabled();
+
+ prop.len = sizeof (bt_local_le_features_t);
+ if (cmn_vsc_cb.filter_support == 1)
+ local_le_features.max_adv_filter_supported = cmn_vsc_cb.max_filter;
+ else
+ local_le_features.max_adv_filter_supported = 0;
+ local_le_features.max_adv_instance = cmn_vsc_cb.adv_inst_max;
+ local_le_features.max_irk_list_size = cmn_vsc_cb.max_irk_list_sz;
+ local_le_features.rpa_offload_supported = cmn_vsc_cb.rpa_offloading;
+ local_le_features.scan_result_storage_size = cmn_vsc_cb.tot_scan_results_strg;
+ memcpy(prop.val, &local_le_features, prop.len);
+ HAL_CBACK(bt_hal_cbacks, adapter_properties_cb, BT_STATUS_SUCCESS, 1, &prop);
+ break;
+ }
#endif
case BTA_DM_AUTHORIZE_EVT: