Skip to content

Commit ce0ad0e

Browse files
ppryga-nordicnashif
authored andcommitted
Bluetooth: Controller: df: Do not send IQ rep for PDU without CTE
Check if the CTE was discovered by Radio peripheral should be done with use of CTEPRESENT event. Samples count should not be used for that purpose. If samples count is a value different than zero for PDUs that don't have CTE, unwanted IQ samples report will be generated. CTEPRESENT event is set only in case the CTEInfo filed was correctly parsed by Radio peripheral during PDU reception. Signed-off-by: Piotr Pryga <[email protected]>
1 parent fd87024 commit ce0ad0e

File tree

1 file changed

+3
-6
lines changed
  • subsys/bluetooth/controller/ll_sw/nordic/lll

1 file changed

+3
-6
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,27 +1000,24 @@ static inline int create_iq_report(struct lll_sync *lll, uint8_t rssi_ready,
10001000
struct node_rx_iq_report *iq_report;
10011001
struct lll_df_sync_cfg *cfg;
10021002
struct node_rx_ftr *ftr;
1003-
uint8_t sample_cnt;
10041003
uint8_t cte_info;
10051004
uint8_t ant;
10061005

10071006
cfg = lll_df_sync_cfg_curr_get(&lll->df_cfg);
10081007

10091008
if (cfg->is_enabled) {
10101009
if (is_max_cte_reached(cfg->max_cte_count, cfg->cte_count)) {
1011-
sample_cnt = radio_df_iq_samples_amount_get();
1012-
1013-
/* If there are no samples available, the CTEInfo was
1010+
/* If the CTEPRESENT event didn't fire, the CTEInfo was
10141011
* not detected and sampling was not started.
10151012
*/
1016-
if (sample_cnt > 0) {
1013+
if (radio_df_cte_ready()) {
10171014
cte_info = radio_df_cte_status_get();
10181015
ant = radio_df_pdu_antenna_switch_pattern_get();
10191016
iq_report = ull_df_iq_report_alloc();
10201017
LL_ASSERT(iq_report);
10211018

10221019
iq_report->hdr.type = NODE_RX_TYPE_SYNC_IQ_SAMPLE_REPORT;
1023-
iq_report->sample_count = sample_cnt;
1020+
iq_report->sample_count = radio_df_iq_samples_amount_get();
10241021
iq_report->packet_status = packet_status;
10251022
iq_report->rssi_ant_id = ant;
10261023
iq_report->cte_info = *(struct pdu_cte_info *)&cte_info;

0 commit comments

Comments
 (0)