diff --git a/subsys/bluetooth/controller/hci/hci.c b/subsys/bluetooth/controller/hci/hci.c index 8ab84015fa5..14b58ddd928 100644 --- a/subsys/bluetooth/controller/hci/hci.c +++ b/subsys/bluetooth/controller/hci/hci.c @@ -41,6 +41,7 @@ #include "ll_sw/lll_sync.h" #include "ll_sw/lll_conn.h" #include "ll_sw/lll_conn_iso.h" +#include "lll/lll_df_types.h" #include "ll_sw/ull_adv_types.h" #include "ll_sw/ull_scan_types.h" @@ -5735,6 +5736,11 @@ static void encode_control(struct node_rx_pdu *node_rx, case NODE_RX_TYPE_SYNC_LOST: le_per_adv_sync_lost(pdu_data, node_rx, buf); break; +#if defined(CONFIG_BT_CTLR_DF_SCAN_CTE_RX) + case NODE_RX_TYPE_IQ_SAMPLE_REPORT: + /* ToDo change to actual handling of the report */ + break; +#endif /* CONFIG_BT_CTLR_DF_SCAN_CTE_RX */ #endif /* CONFIG_BT_CTLR_SYNC_PERIODIC */ #endif /* CONFIG_BT_CTLR_ADV_EXT */ #endif /* CONFIG_BT_OBSERVER */ @@ -6185,7 +6191,6 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx) #if defined(CONFIG_BT_CTLR_PROFILE_ISR) case NODE_RX_TYPE_PROFILE: #endif /* CONFIG_BT_CTLR_PROFILE_ISR */ - return HCI_CLASS_EVT_DISCARDABLE; #endif @@ -6208,6 +6213,9 @@ uint8_t hci_get_class(struct node_rx_pdu *node_rx) case NODE_RX_TYPE_SYNC: case NODE_RX_TYPE_SYNC_REPORT: case NODE_RX_TYPE_SYNC_LOST: +#if defined(CONFIG_BT_CTLR_DF_SCAN_CTE_RX) + case NODE_RX_TYPE_IQ_SAMPLE_REPORT: +#endif /* CONFIG_BT_CTLR_DF_SCAN_CTE_RX */ #endif /* CONFIG_BT_CTLR_SYNC_PERIODIC */ #endif /* CONFIG_BT_OBSERVER */ diff --git a/subsys/bluetooth/controller/ll_sw/ull.c b/subsys/bluetooth/controller/ll_sw/ull.c index 400ae0e35f2..c9e6a7176a6 100644 --- a/subsys/bluetooth/controller/ll_sw/ull.c +++ b/subsys/bluetooth/controller/ll_sw/ull.c @@ -831,7 +831,12 @@ void ll_rx_dequeue(void) (void **)&rx); LL_ASSERT(link); - mem_release(link, &mem_link_rx.free); +#if defined(CONFIG_BT_CTLR_DF_SCAN_CTE_RX) + if (rx->type != NODE_RX_TYPE_IQ_SAMPLE_REPORT) +#endif /* CONFIG_BT_CTLR_DF_SCAN_CTE_RX */ + { + mem_release(link, &mem_link_rx.free); + } /* handle object specific clean up */ switch (rx->type) { @@ -920,6 +925,13 @@ void ll_rx_dequeue(void) } break; #endif /* CONFIG_BT_BROADCASTER */ +#if defined(CONFIG_BT_CTLR_DF_SCAN_CTE_RX) + case NODE_RX_TYPE_IQ_SAMPLE_REPORT: + { + ull_df_iq_report_link_release(link); + } + break; +#endif /* CONFIG_BT_CTLR_DF_SCAN_CTE_RX */ #endif /* CONFIG_BT_CTLR_ADV_EXT */ #if defined(CONFIG_BT_CONN) @@ -1304,6 +1316,15 @@ void ll_rx_mem_release(void **node_rx) ull_sync_release(sync); } break; +#if defined(CONFIG_BT_CTLR_DF_SCAN_CTE_RX) + case NODE_RX_TYPE_IQ_SAMPLE_REPORT: + { + ull_iq_report_link_inc_quota(1); + ull_df_iq_report_mem_release(rx_free); + ull_df_rx_iq_report_alloc(1); + } + break; +#endif /* CONFIG_BT_CTLR_DF_SCAN_CTE_RX */ #endif /* CONFIG_BT_CTLR_SYNC_PERIODIC */ #if defined(CONFIG_BT_CONN) @@ -2242,6 +2263,9 @@ static inline int rx_demux_rx(memq_link_t *link, struct node_rx_hdr *rx) case NODE_RX_TYPE_EXT_AUX_REPORT: #if defined(CONFIG_BT_CTLR_SYNC_PERIODIC) case NODE_RX_TYPE_SYNC_REPORT: +#if defined(CONFIG_BT_CTLR_DF_SCAN_CTE_RX) + case NODE_RX_TYPE_IQ_SAMPLE_REPORT: +#endif /* CONFIG_BT_CTLR_DF_SCAN_CTE_RX */ #endif /* CONFIG_BT_CTLR_SYNC_PERIODIC */ { struct pdu_adv *adv;