Loading system/btif/src/btif_dm.cc +11 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ #include "btif_util.h" #include "btif_util.h" #include "btu.h" #include "device/include/controller.h" #include "device/include/interop.h" #include "include/stack_config.h" #include "osi/include/allocator.h" Loading Loading @@ -1887,6 +1888,16 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) { local_le_features.debug_logging_supported = cmn_vsc_cb.debug_logging_supported > 0; const controller_t* controller = controller_get_interface(); local_le_features.le_2m_phy_supported = controller->supports_ble_2m_phy(); local_le_features.le_coded_phy_supported = controller->supports_ble_coded_phy(); local_le_features.le_extended_advertising_supported = controller->supports_ble_extended_advertising(); local_le_features.le_periodic_advertising_supported = controller->supports_ble_periodic_advertising(); memcpy(prop.val, &local_le_features, prop.len); HAL_CBACK(bt_hal_cbacks, adapter_properties_cb, BT_STATUS_SUCCESS, 1, &prop); Loading system/device/include/controller.h +2 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ 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_2m_phy)(void); bool (*supports_ble_coded_phy)(void); bool (*supports_ble_extended_advertising)(void); bool (*supports_ble_periodic_advertising)(void); Loading system/device/src/controller.cc +14 −0 Original line number Diff line number Diff line Loading @@ -377,6 +377,18 @@ static bool supports_ble_connection_parameters_request(void) { return HCI_LE_CONN_PARAM_REQ_SUPPORTED(features_ble.as_array); } static bool supports_ble_2m_phy(void) { CHECK(readable); CHECK(ble_supported); return HCI_LE_2M_PHY_SUPPORTED(features_ble.as_array); } static bool supports_ble_coded_phy(void) { CHECK(readable); CHECK(ble_supported); return HCI_LE_CODED_PHY_SUPPORTED(features_ble.as_array); } static bool supports_ble_extended_advertising(void) { CHECK(readable); CHECK(ble_supported); Loading Loading @@ -486,6 +498,8 @@ static const controller_t interface = { supports_ble_packet_extension, supports_ble_connection_parameters_request, supports_ble_privacy, supports_ble_2m_phy, supports_ble_coded_phy, supports_ble_extended_advertising, supports_ble_periodic_advertising, Loading system/stack/include/hcidefs.h +3 −0 Original line number Diff line number Diff line Loading @@ -3186,6 +3186,9 @@ typedef struct { ((x)[HCI_SUPP_COMMANDS_LE_RC_CONN_PARAM_UPD_NEG_RPY_OFF] & \ HCI_SUPP_COMMANDS_RLE_RC_CONN_PARAM_UPD_NEG_RPY_MASK) #define HCI_LE_2M_PHY_SUPPORTED(x) (((x)[1] & 0x01)) // BIT 8 SET #define HCI_LE_CODED_PHY_SUPPORTED(x) (((x)[1] & 0x08)) // BIT 11 SET /* LE Advertising Extension related Procedurs */ #define HCI_LE_EXTENDED_ADVERTISING_SUPPORTED(x) \ (((x)[1] & 0x10)) // BIT 12 SET Loading Loading
system/btif/src/btif_dm.cc +11 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ #include "btif_util.h" #include "btif_util.h" #include "btu.h" #include "device/include/controller.h" #include "device/include/interop.h" #include "include/stack_config.h" #include "osi/include/allocator.h" Loading Loading @@ -1887,6 +1888,16 @@ static void btif_dm_upstreams_evt(uint16_t event, char* p_param) { local_le_features.debug_logging_supported = cmn_vsc_cb.debug_logging_supported > 0; const controller_t* controller = controller_get_interface(); local_le_features.le_2m_phy_supported = controller->supports_ble_2m_phy(); local_le_features.le_coded_phy_supported = controller->supports_ble_coded_phy(); local_le_features.le_extended_advertising_supported = controller->supports_ble_extended_advertising(); local_le_features.le_periodic_advertising_supported = controller->supports_ble_periodic_advertising(); memcpy(prop.val, &local_le_features, prop.len); HAL_CBACK(bt_hal_cbacks, adapter_properties_cb, BT_STATUS_SUCCESS, 1, &prop); Loading
system/device/include/controller.h +2 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ 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_2m_phy)(void); bool (*supports_ble_coded_phy)(void); bool (*supports_ble_extended_advertising)(void); bool (*supports_ble_periodic_advertising)(void); Loading
system/device/src/controller.cc +14 −0 Original line number Diff line number Diff line Loading @@ -377,6 +377,18 @@ static bool supports_ble_connection_parameters_request(void) { return HCI_LE_CONN_PARAM_REQ_SUPPORTED(features_ble.as_array); } static bool supports_ble_2m_phy(void) { CHECK(readable); CHECK(ble_supported); return HCI_LE_2M_PHY_SUPPORTED(features_ble.as_array); } static bool supports_ble_coded_phy(void) { CHECK(readable); CHECK(ble_supported); return HCI_LE_CODED_PHY_SUPPORTED(features_ble.as_array); } static bool supports_ble_extended_advertising(void) { CHECK(readable); CHECK(ble_supported); Loading Loading @@ -486,6 +498,8 @@ static const controller_t interface = { supports_ble_packet_extension, supports_ble_connection_parameters_request, supports_ble_privacy, supports_ble_2m_phy, supports_ble_coded_phy, supports_ble_extended_advertising, supports_ble_periodic_advertising, Loading
system/stack/include/hcidefs.h +3 −0 Original line number Diff line number Diff line Loading @@ -3186,6 +3186,9 @@ typedef struct { ((x)[HCI_SUPP_COMMANDS_LE_RC_CONN_PARAM_UPD_NEG_RPY_OFF] & \ HCI_SUPP_COMMANDS_RLE_RC_CONN_PARAM_UPD_NEG_RPY_MASK) #define HCI_LE_2M_PHY_SUPPORTED(x) (((x)[1] & 0x01)) // BIT 8 SET #define HCI_LE_CODED_PHY_SUPPORTED(x) (((x)[1] & 0x08)) // BIT 11 SET /* LE Advertising Extension related Procedurs */ #define HCI_LE_EXTENDED_ADVERTISING_SUPPORTED(x) \ (((x)[1] & 0x10)) // BIT 12 SET Loading