zephyr/subsys/bluetooth/controller/ll_sw/ull_df_internal.h
Piotr Pryga 7cdbeb541a Bluetooth: controller: Use common mem_link_rx for node_rx_iq_report
Change use of dedicated memory pool for linked list nodes for
node_rx_iq_report to common mem_link_rx. Former solution had
a drawback. Released link nodes may be enqueued to wrong memory
pool. E.g. link related with nopde_rx_iq_report went to common
link memory pool, whereas link nodes from common pool were enqueued
to dedicated list.
The solution was working because links have the same memory layout,
just different memory pools they originated from.
The problem may occur if one of those link memory pools is reset.
Then the same link may be used by node_rx and node_rx_iq_report
at the same time, causing controller failure.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-05-06 16:27:16 +02:00

23 lines
902 B
C

/*
* Copyright (c) 2018-2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
int ull_df_init(void);
int ull_df_reset(void);
/* Release link to node_rx_iq_report memory. */
void ull_df_iq_report_link_release(memq_link_t *link);
/* Release memory of node_rx_iq_report. */
void ull_df_iq_report_mem_release(struct node_rx_hdr *rx);
/* Change quota of free node_iq_report links. Delta may be negative,
* then it will decrease number of free link elements.
*/
void ull_iq_report_link_inc_quota(int8_t delta);
/* Allocate node_rx_iq_report in free report PDUs list */
void ull_df_rx_iq_report_alloc(uint8_t max);
/* Initialized DF sync configuration. */
void ull_df_sync_cfg_init(struct lll_df_sync *cfg);
/* Returns information if CTE sampling for periodic sync is requested to disable. */
uint8_t ull_df_sync_cfg_is_disabled_or_requested_to_disable(struct lll_df_sync *df_cfg);