Bluetooth: Controller: Add Kconfig to enable CTE RX in conn mode

The CTE reception and sampling in connected mode was enabled
with CONFIG_BT_CTLR_DF_CONN_CTE_REQ. This is a separate fearure
tha can be enabled when CTE reqest procedure is disabled.
What more the CONFIG_BT_CTLR_DF_CONN_CTE_REQ is dependent
on CONFIG_BT_CTLR_DF_CONN_CTE_RX, not other way around.

The commit adds separate Kconfig to provide such possibility.
Also changes compilation guards for code related with the
CTE reception and sampling.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This commit is contained in:
Piotr Pryga 2022-01-04 07:56:02 +01:00 committed by Christopher Friedt
commit c5812bab5e
11 changed files with 62 additions and 62 deletions

View file

@ -2878,7 +2878,7 @@ static void le_df_set_conn_cte_tx_params(struct net_buf *buf,
}
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_TX */
#if defined(CONFIG_BT_CTRL_DF_CONN_CTE_RX)
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RX)
static void le_df_set_conn_cte_rx_params(struct net_buf *buf, struct net_buf **evt)
{
struct bt_hci_cp_le_set_conn_cte_rx_params *cmd = (void *)buf->data;
@ -2970,7 +2970,7 @@ static void le_df_connection_iq_report(struct node_rx_pdu *node_rx, struct net_b
sep->sample_count = samples_cnt;
}
}
#endif /* CONFIG_BT_CTRL_DF_CONN_CTE_RX */
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RX */
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_REQ)
static void le_df_set_conn_cte_req_enable(struct net_buf *buf, struct net_buf **evt)
@ -4355,11 +4355,11 @@ static int controller_cmd_handle(uint16_t ocf, struct net_buf *cmd,
le_df_set_conn_cte_tx_params(cmd, evt);
break;
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_TX */
#if defined(CONFIG_BT_CTRL_DF_CONN_CTE_RX)
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RX)
case BT_OCF(BT_HCI_OP_LE_SET_CONN_CTE_RX_PARAMS):
le_df_set_conn_cte_rx_params(cmd, evt);
break;
#endif /* CONFIG_BT_CTRL_DF_CONN_CTE_RX */
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RX */
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_REQ)
case BT_OCF(BT_HCI_OP_LE_CONN_CTE_REQ_ENABLE):
le_df_set_conn_cte_req_enable(cmd, evt);
@ -7217,11 +7217,11 @@ static void encode_control(struct node_rx_pdu *node_rx,
return;
#endif /* CONFIG_BT_CTLR_CONN_ISO */
#if defined(CONFIG_BT_CTRL_DF_CONN_CTE_RX)
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RX)
case NODE_RX_TYPE_CONN_IQ_SAMPLE_REPORT:
le_df_connection_iq_report(node_rx, buf);
return;
#endif /* CONFIG_BT_CTRL_DF_CONN_CTE_RX */
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RX */
#endif /* CONFIG_BT_CONN */
#if defined(CONFIG_BT_CTLR_ADV_INDICATION)
@ -7644,9 +7644,9 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx)
#if defined(CONFIG_BT_CTLR_CONN_ISO)
case NODE_RX_TYPE_CIS_ESTABLISHED:
#endif /* CONFIG_BT_CTLR_CONN_ISO */
#if defined(CONFIG_BT_CTRL_DF_CONN_CTE_RX)
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RX)
case NODE_RX_TYPE_CONN_IQ_SAMPLE_REPORT:
#endif /* CONFIG_BT_CTRL_DF_CONN_CTE_RX */
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RX */
return HCI_CLASS_EVT_REQUIRED;
case NODE_RX_TYPE_TERMINATE: