Commit d9eb21aa authored by Piotr Pryga's avatar Piotr Pryga Committed by Christopher Friedt
Browse files

Bluetooth: controller: Add per sync filt by CTE type for SOC w/o DFE



First implementation of periodic advertising sync filtering
requires existence of Direction Finding Extension in Radio
peripheral.
To add the filtering support for other Nodric SOCs software
based PDU traversing for CTEInfo should be implemented.

In case there is no DFE in Radio peripheral, actual filtering
is done in ULL.

The commit provides necessary changes to previous solution.

Signed-off-by: default avatarPiotr Pryga <piotr.pryga@nordicsemi.no>
parent 2b8079aa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -26,6 +26,9 @@ config BT_CTLR_DF_ANT_SWITCH_2US_SUPPORT
config BT_CTLR_DF_ANT_SWITCH_1US_SUPPORT
	bool

config BT_CTLR_CTEINLINE_SUPPORT
	bool

menuconfig BT_CTLR_DF
	bool "LE Direction Finding [Experimental]"
	depends on BT_CTLR_DF_SUPPORT
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ config BT_LLL_VENDOR_NORDIC
	select BT_CTLR_ADV_ISO_SUPPORT
	select BT_CTLR_SYNC_ISO_SUPPORT
	select BT_CTLR_DF_SUPPORT if $(DT_NORDIC_RADIO_DFE_SUPPORTED)
	select BT_CTLR_CTEINLINE_SUPPORT if $(DT_NORDIC_RADIO_DFE_SUPPORTED)
	select BT_CTLR_CHAN_SEL_2_SUPPORT
	select BT_CTLR_MIN_USED_CHAN_SUPPORT
	select BT_CTLR_DTM_HCI_SUPPORT
+2 −2
Original line number Diff line number Diff line
@@ -404,12 +404,12 @@ struct event_done_extra {
		struct {
			uint16_t trx_cnt;
			uint8_t  crc_valid:1;
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC)
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC) && defined(CONFIG_BT_CTLR_CTEINLINE_SUPPORT)
			/* Used to inform ULL that periodic advertising sync scan should be
			 * terminated.
			 */
			uint8_t  sync_term:1;
#endif /* CONFIG_BT_CTLR_SYNC_PERIODIC */
#endif /* CONFIG_BT_CTLR_SYNC_PERIODIC && CONFIG_BT_CTLR_CTEINLINE_SUPPORT */
#if defined(CONFIG_BT_CTLR_LE_ENC)
			uint8_t  mic_state;
#endif /* CONFIG_BT_CTLR_LE_ENC */
+4 −3
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@

/* Periodic advertisements synchronization status. */
enum sync_status {
	SYNC_STAT_FOUND,
	SYNC_STAT_READY,
	SYNC_STAT_ALLOWED,
	SYNC_STAT_READY_OR_CONT_SCAN,
	SYNC_STAT_TERM
};

@@ -58,5 +58,6 @@ int lll_sync_init(void);
int lll_sync_reset(void);
void lll_sync_create_prepare(void *param);
void lll_sync_prepare(void *param);

enum sync_status lll_sync_cte_is_allowed(uint8_t cte_type_mask, uint8_t filter_policy,
					 uint8_t rx_cte_time, uint8_t rx_cte_type);
extern uint16_t ull_sync_lll_handle_get(struct lll_sync *lll);
+2 −3
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include "ll_sw/pdu.h"

#include "radio_internal.h"
#include "radio_df.h"

#if defined(CONFIG_BT_CTLR_GPIO_PA_PIN)
#if ((CONFIG_BT_CTLR_GPIO_PA_PIN) > 31)
@@ -1518,7 +1517,7 @@ void radio_ar_resolve(uint8_t *addr)
 */
void radio_df_cte_inline_set_enabled(bool cte_info_in_s1)
{
#if defined(HAS_CTEINLINE_SUPPORT)
#if defined(CONFIG_BT_CTLR_CTEINLINE_SUPPORT)
	const nrf_radio_cteinline_conf_t inline_conf = {
		.enable = true,
		/* Indicates whether CTEInfo is in S1 byte or not. */
@@ -1542,5 +1541,5 @@ void radio_df_cte_inline_set_enabled(bool cte_info_in_s1)
	};

	nrf_radio_cteinline_configure(NRF_RADIO, &inline_conf);
#endif /* HAS_CTEINLINE_SUPPORT */
#endif /* CONFIG_BT_CTLR_CTEINLINE_SUPPORT */
}
Loading