Bluetooth: controller: Consolidate ISO role Kconfigs
Consolidate Kconfigs for ISO roles to make compilation guards more concise. Just introduces aliases, does not change functionality. Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
This commit is contained in:
parent
9f9e2ec26f
commit
88db0d4b45
8 changed files with 65 additions and 87 deletions
|
@ -497,8 +497,7 @@ static void write_auth_payload_timeout(struct net_buf *buf,
|
|||
}
|
||||
#endif /* CONFIG_BT_CTLR_LE_PING */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_CENTRAL_ISO)
|
||||
#if defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
static void configure_data_path(struct net_buf *buf,
|
||||
struct net_buf **evt)
|
||||
{
|
||||
|
@ -518,7 +517,7 @@ static void configure_data_path(struct net_buf *buf,
|
|||
rp = hci_cmd_complete(evt, sizeof(*rp));
|
||||
rp->status = status;
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO || CONFIG_BT_CTLR_CENTRAL_ISO */
|
||||
#endif /* CONFIG_BT_CTLR_CONN_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CONN)
|
||||
static void read_tx_power_level(struct net_buf *buf, struct net_buf **evt)
|
||||
|
@ -588,12 +587,11 @@ static int ctrl_bb_cmd_handle(uint16_t ocf, struct net_buf *cmd,
|
|||
break;
|
||||
#endif /* CONFIG_BT_CTLR_LE_PING */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_CENTRAL_ISO)
|
||||
#if defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
case BT_OCF(BT_HCI_OP_CONFIGURE_DATA_PATH):
|
||||
configure_data_path(cmd, evt);
|
||||
break;
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO || CONFIG_BT_CTLR_CENTRAL_ISO */
|
||||
#endif /* CONFIG_BT_CTLR_CONN_ISO */
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
@ -1836,8 +1834,7 @@ static void le_remove_cig(struct net_buf *buf, struct net_buf **evt)
|
|||
|
||||
#endif /* CONFIG_BT_CENTRAL */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_CENTRAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
|
||||
#if defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
static void le_read_iso_tx_sync(struct net_buf *buf, struct net_buf **evt)
|
||||
{
|
||||
struct bt_hci_cp_le_read_iso_tx_sync *cmd = (void *)buf->data;
|
||||
|
@ -2020,7 +2017,7 @@ static void le_iso_read_test_counters(struct net_buf *buf, struct net_buf **evt)
|
|||
rp->missed_cnt = sys_cpu_to_le32(missed_cnt);
|
||||
rp->failed_cnt = sys_cpu_to_le32(failed_cnt);
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO || CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
#endif /* CONFIG_BT_CTLR_CONN_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_SET_HOST_FEATURE)
|
||||
static void le_set_host_feature(struct net_buf *buf, struct net_buf **evt)
|
||||
|
@ -3185,8 +3182,7 @@ static void le_cis_request(struct pdu_data *pdu_data,
|
|||
}
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_CENTRAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
|
||||
#if defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
static void le_cis_established(struct pdu_data *pdu_data,
|
||||
struct node_rx_pdu *node_rx,
|
||||
struct net_buf *buf)
|
||||
|
@ -3238,7 +3234,7 @@ static void le_cis_established(struct pdu_data *pdu_data,
|
|||
}
|
||||
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO */
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO || CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
#endif /* CONFIG_BT_CTLR_CONN_ISO */
|
||||
|
||||
static int controller_cmd_handle(uint16_t ocf, struct net_buf *cmd,
|
||||
struct net_buf **evt, void **node_rx)
|
||||
|
@ -3403,8 +3399,7 @@ static int controller_cmd_handle(uint16_t ocf, struct net_buf *cmd,
|
|||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
#endif /* CONFIG_BT_PERIPHERAL */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_CENTRAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
|
||||
#if defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
case BT_OCF(BT_HCI_OP_LE_READ_ISO_TX_SYNC):
|
||||
le_read_iso_tx_sync(cmd, evt);
|
||||
break;
|
||||
|
@ -3436,7 +3431,7 @@ static int controller_cmd_handle(uint16_t ocf, struct net_buf *cmd,
|
|||
case BT_OCF(BT_HCI_OP_LE_READ_ISO_LINK_QUALITY):
|
||||
le_read_iso_link_quality(cmd, evt);
|
||||
break;
|
||||
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO || CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
#endif /* CONFIG_BT_CTLR_CONN_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_SET_HOST_FEATURE)
|
||||
case BT_OCF(BT_HCI_OP_LE_SET_HOST_FEATURE):
|
||||
|
@ -5798,12 +5793,11 @@ static void encode_control(struct node_rx_pdu *node_rx,
|
|||
return;
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_CENTRAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
|
||||
#if defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
case NODE_RX_TYPE_CIS_ESTABLISHED:
|
||||
le_cis_established(pdu_data, node_rx, buf);
|
||||
return;
|
||||
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO || CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
#endif /* CONFIG_BT_CTLR_CONN_ISO */
|
||||
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
|
@ -6210,10 +6204,9 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
|
|||
#if defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
|
||||
case NODE_RX_TYPE_CIS_REQUEST:
|
||||
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
#if defined(CONFIG_BT_CTLR_CENTRAL_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_PERIPHERAL_ISO)
|
||||
#if defined(CONFIG_BT_CTLR_CONN_ISO)
|
||||
case NODE_RX_TYPE_CIS_ESTABLISHED:
|
||||
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO || CONFIG_BT_CTLR_PERIPHERAL_ISO */
|
||||
#endif /* CONFIG_BT_CTLR_CONN_ISO */
|
||||
return HCI_CLASS_EVT_REQUIRED;
|
||||
|
||||
case NODE_RX_TYPE_TERMINATE:
|
||||
|
@ -6237,8 +6230,7 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
|
|||
#endif /* CONFIG_BT_CTLR_PHY */
|
||||
return HCI_CLASS_EVT_CONNECTION;
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
#if defined(CONFIG_BT_CTLR_ADV_ISO) || defined(CONFIG_BT_CTLR_SYNC_ISO) || \
|
||||
defined(CONFIG_BT_CTLR_PERIPHERAL_ISO) || defined(CONFIG_BT_CTLR_CENTRAL_ISO)
|
||||
#if defined(CONFIG_BT_CTLR_ISO)
|
||||
case NODE_RX_TYPE_ISO_PDU:
|
||||
return HCI_CLASS_ISO_DATA;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue