Loading system/device/include/controller.h +1 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ typedef struct controller_t { bool (*supports_ble_packet_extension)(void); bool (*supports_ble_connection_parameters_request)(void); bool (*supports_ble_privacy)(void); bool (*supports_ble_set_privacy_mode)(void); bool (*supports_ble_2m_phy)(void); bool (*supports_ble_coded_phy)(void); bool (*supports_ble_extended_advertising)(void); Loading system/device/src/controller.cc +8 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,13 @@ static bool supports_ble_privacy(void) { return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array); } static bool supports_ble_set_privacy_mode() { CHECK(readable); CHECK(ble_supported); return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array) && HCI_LE_SET_PRIVACY_MODE_SUPPORTED(supported_commands); } static bool supports_ble_packet_extension(void) { CHECK(readable); CHECK(ble_supported); Loading Loading @@ -521,6 +528,7 @@ static const controller_t interface = { supports_ble_packet_extension, supports_ble_connection_parameters_request, supports_ble_privacy, supports_ble_set_privacy_mode, supports_ble_2m_phy, supports_ble_coded_phy, supports_ble_extended_advertising, Loading system/stack/btm/btm_ble_privacy.cc +1 −1 Original line number Diff line number Diff line Loading @@ -708,7 +708,7 @@ bool btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC* p_dev_rec) { p_dev_rec->ble.static_addr_type, p_dev_rec->ble.static_addr, peer_irk, local_irk); if (controller_get_interface()->supports_ble_privacy()) { if (controller_get_interface()->supports_ble_set_privacy_mode()) { BTM_TRACE_DEBUG("%s: adding device privacy mode", __func__); btsnd_hcic_ble_set_privacy_mode(p_dev_rec->ble.static_addr_type, p_dev_rec->ble.static_addr, 0x01); Loading system/stack/include/hcidefs.h +2 −0 Original line number Diff line number Diff line Loading @@ -3230,6 +3230,8 @@ typedef struct { ((x)[HCI_SUPP_COMMANDS_LE_ENH_TX_TEST_OFF] & \ HCI_SUPP_COMMANDS_LE_ENH_TX_TEST_MASK) #define HCI_LE_SET_PRIVACY_MODE_SUPPORTED(x) ((x)[39] & 0x04) /* LE Advertising Extension related Procedurs */ #define HCI_LE_EXTENDED_ADVERTISING_SUPPORTED(x) \ (((x)[1] & 0x10)) // BIT 12 SET Loading Loading
system/device/include/controller.h +1 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ typedef struct controller_t { bool (*supports_ble_packet_extension)(void); bool (*supports_ble_connection_parameters_request)(void); bool (*supports_ble_privacy)(void); bool (*supports_ble_set_privacy_mode)(void); bool (*supports_ble_2m_phy)(void); bool (*supports_ble_coded_phy)(void); bool (*supports_ble_extended_advertising)(void); Loading
system/device/src/controller.cc +8 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,13 @@ static bool supports_ble_privacy(void) { return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array); } static bool supports_ble_set_privacy_mode() { CHECK(readable); CHECK(ble_supported); return HCI_LE_ENHANCED_PRIVACY_SUPPORTED(features_ble.as_array) && HCI_LE_SET_PRIVACY_MODE_SUPPORTED(supported_commands); } static bool supports_ble_packet_extension(void) { CHECK(readable); CHECK(ble_supported); Loading Loading @@ -521,6 +528,7 @@ static const controller_t interface = { supports_ble_packet_extension, supports_ble_connection_parameters_request, supports_ble_privacy, supports_ble_set_privacy_mode, supports_ble_2m_phy, supports_ble_coded_phy, supports_ble_extended_advertising, Loading
system/stack/btm/btm_ble_privacy.cc +1 −1 Original line number Diff line number Diff line Loading @@ -708,7 +708,7 @@ bool btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC* p_dev_rec) { p_dev_rec->ble.static_addr_type, p_dev_rec->ble.static_addr, peer_irk, local_irk); if (controller_get_interface()->supports_ble_privacy()) { if (controller_get_interface()->supports_ble_set_privacy_mode()) { BTM_TRACE_DEBUG("%s: adding device privacy mode", __func__); btsnd_hcic_ble_set_privacy_mode(p_dev_rec->ble.static_addr_type, p_dev_rec->ble.static_addr, 0x01); Loading
system/stack/include/hcidefs.h +2 −0 Original line number Diff line number Diff line Loading @@ -3230,6 +3230,8 @@ typedef struct { ((x)[HCI_SUPP_COMMANDS_LE_ENH_TX_TEST_OFF] & \ HCI_SUPP_COMMANDS_LE_ENH_TX_TEST_MASK) #define HCI_LE_SET_PRIVACY_MODE_SUPPORTED(x) ((x)[39] & 0x04) /* LE Advertising Extension related Procedurs */ #define HCI_LE_EXTENDED_ADVERTISING_SUPPORTED(x) \ (((x)[1] & 0x10)) // BIT 12 SET Loading