Skip to content

Commit 7599d81

Browse files
committed
bluetooth: controller: Remove hci_internal_le_supported_features
Use sdc_hci_cmd_le_read_local_supported_features instead to save having to have similar information in the sdc and in nrf. Signed-off-by: Sean Madigan <[email protected]>
1 parent 76a8834 commit 7599d81

File tree

3 files changed

+8
-121
lines changed

3 files changed

+8
-121
lines changed

subsys/bluetooth/controller/hci_driver.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,13 @@ static int configure_supported_features(void)
878878
}
879879
}
880880

881+
if (IS_ENABLED(CONFIG_BT_CTLR_DF_ADV_CTE_TX)) {
882+
err = sdc_support_le_connectionless_cte_transmitter();
883+
if (err) {
884+
return -ENOTSUP;
885+
}
886+
}
887+
881888
if (IS_ENABLED(CONFIG_BT_CTLR_LE_POWER_CONTROL)) {
882889
if (IS_ENABLED(CONFIG_BT_CENTRAL)) {
883890
err = sdc_support_le_power_control_central();

subsys/bluetooth/controller/hci_internal.c

Lines changed: 1 addition & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -688,118 +688,6 @@ static void supported_features(sdc_hci_ip_lmp_features_t *features)
688688
features->le_supported = 1;
689689
}
690690

691-
void hci_internal_le_supported_features(
692-
sdc_hci_cmd_le_read_local_supported_features_return_t *features)
693-
{
694-
memset(features, 0, sizeof(*features));
695-
696-
features->params.le_encryption = 1;
697-
features->params.extended_reject_indication = 1;
698-
features->params.slave_initiated_features_exchange = 1;
699-
features->params.le_ping = 1;
700-
701-
#ifdef CONFIG_BT_CTLR_DATA_LENGTH
702-
features->params.le_data_packet_length_extension = 1;
703-
#endif
704-
705-
#ifdef CONFIG_BT_CTLR_PRIVACY
706-
features->params.ll_privacy = 1;
707-
#endif
708-
709-
#ifdef CONFIG_BT_CTLR_EXT_SCAN_FP
710-
features->params.extended_scanner_filter_policies = 1;
711-
#endif
712-
713-
#ifdef CONFIG_BT_CTLR_PHY_2M
714-
features->params.le_2m_phy = 1;
715-
#endif
716-
717-
#ifdef CONFIG_BT_CTLR_PHY_CODED
718-
features->params.le_coded_phy = 1;
719-
#endif
720-
721-
#ifdef CONFIG_BT_CTLR_ADV_EXT
722-
features->params.le_extended_advertising = 1;
723-
#ifdef CONFIG_BT_CTLR_PHY_CODED
724-
features->params.advertising_coding_selection = 1;
725-
#endif
726-
#endif
727-
728-
#if defined(CONFIG_BT_CTLR_ADV_PERIODIC) || defined(CONFIG_BT_CTLR_SYNC_PERIODIC)
729-
features->params.le_periodic_advertising = 1;
730-
#ifdef CONFIG_BT_CTLR_SYNC_TRANSFER_SENDER
731-
features->params.periodic_advertising_sync_transfer_sender = 1;
732-
#endif
733-
#ifdef CONFIG_BT_CTLR_SYNC_TRANSFER_RECEIVER
734-
features->params.periodic_advertising_sync_transfer_recipient = 1;
735-
#endif
736-
#endif
737-
738-
#if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
739-
features->params.connectionless_cte_transmitter = 1;
740-
#endif
741-
742-
features->params.channel_selection_algorithm_2 = 1;
743-
744-
#if defined(CONFIG_BT_CTLR_LE_POWER_CONTROL)
745-
features->params.le_power_control_request = 1;
746-
features->params.le_power_change_indication = 1;
747-
#endif
748-
749-
#if defined(CONFIG_BT_CTLR_LE_PATH_LOSS_MONITORING)
750-
features->params.le_path_loss_monitoring = 1;
751-
#endif
752-
753-
#if defined(CONFIG_BT_CTLR_ADV_PERIODIC_ADI_SUPPORT)
754-
features->params.periodic_advertising_adi_support = 1;
755-
#endif
756-
757-
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RSP)
758-
features->params.connection_cte_response = 1;
759-
#endif
760-
761-
#if defined(CONFIG_BT_CTLR_SCA_UPDATE)
762-
features->params.sleep_clock_accuracy_updates = 1;
763-
#endif
764-
765-
#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
766-
features->params.connected_isochronous_stream_slave = 1;
767-
#endif
768-
#if defined(CONFIG_BT_CTLR_CENTRAL_ISO)
769-
features->params.connected_isochronous_stream_master = 1;
770-
#endif
771-
#if defined(CONFIG_BT_CTLR_SYNC_ISO)
772-
features->params.synchronized_receiver = 1;
773-
#endif
774-
#if defined(CONFIG_BT_CTLR_ADV_ISO)
775-
features->params.isochronous_broadcaster = 1;
776-
#endif
777-
778-
#if defined(CONFIG_BT_CTLR_SDC_PAWR_ADV)
779-
features->params.periodic_advertising_with_responses_advertiser = 1;
780-
#endif
781-
782-
#if defined(CONFIG_BT_CTLR_SDC_PAWR_SYNC)
783-
features->params.periodic_advertising_with_responses_scanner = 1;
784-
#endif
785-
786-
#if defined(CONFIG_BT_CTLR_SUBRATING)
787-
features->params.connection_subrating = 1;
788-
#endif
789-
#if defined(CONFIG_BT_CTLR_CHANNEL_SOUNDING)
790-
features->params.channel_sounding = 1;
791-
features->params.channel_sounding_tone_quality_indication = 1;
792-
#endif /* CONFIG_BT_CTLR_CHANNEL_SOUNDING */
793-
794-
#if defined(CONFIG_BT_CTLR_EXTENDED_FEAT_SET)
795-
features->params.ll_extended_feature_set = 1;
796-
#endif /* CONFIG_BT_CTLR_EXTENDED_FEAT_SET */
797-
798-
#if defined(CONFIG_BT_CTLR_SDC_LE_POWER_CLASS_1)
799-
features->params.le_Power_class_1 = 1;
800-
#endif /* CONFIG_BT_CTLR_SDC_LE_POWER_CLASS_1 */
801-
}
802-
803691
static void le_read_supported_states(uint8_t *buf)
804692
{
805693
/* Use 2*uint32_t instead of uint64_t to reduce code size. */
@@ -1011,8 +899,7 @@ static uint8_t le_controller_cmd_put(uint8_t const * const cmd,
1011899

1012900
case SDC_HCI_OPCODE_CMD_LE_READ_LOCAL_SUPPORTED_FEATURES:
1013901
*param_length_out += sizeof(sdc_hci_cmd_le_read_local_supported_features_return_t);
1014-
hci_internal_le_supported_features((void *)event_out_params);
1015-
return 0;
902+
return sdc_hci_cmd_le_read_local_supported_features((void *)event_out_params);
1016903

1017904
case SDC_HCI_OPCODE_CMD_LE_SET_RANDOM_ADDRESS:
1018905
return sdc_hci_cmd_le_set_random_address((void *)cmd_params);

subsys/bluetooth/controller/hci_internal.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,4 @@ int hci_internal_msg_get(uint8_t *msg_out, sdc_hci_msg_type_t *msg_type_out);
9595
void hci_internal_supported_commands(
9696
sdc_hci_ip_supported_commands_t *cmds);
9797

98-
/** @brief Retrieve the list of supported LE features configured for this build
99-
*
100-
* @param[out] features The list of supported features
101-
*/
102-
void hci_internal_le_supported_features(
103-
sdc_hci_cmd_le_read_local_supported_features_return_t *features);
104-
10598
#endif

0 commit comments

Comments
 (0)