Skip to content

Commit 0122e35

Browse files
eriksandgrenhermabe
authored andcommitted
bluetooth: cs_de: Fix issue with unpacking of pcts
This commit fixes an issue where the pcts in `bt_hci_le_cs_step_data_tone_info` were not mapped to the correct antenna path in the `cs_de_report_t`. This would cause pcts from random antenna paths in `cs_de_report.iq_tones[n]`, which is expected to only contain pcts from antenna path `n`. Signed-off-by: Erik Sandgren <[email protected]>
1 parent 30f67fc commit 0122e35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

subsys/bluetooth/cs_de/cs_de.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,17 +283,17 @@ static void extract_pcts(cs_de_report_t *p_report, uint8_t channel_index,
283283
return;
284284
}
285285

286-
if (local_tone_info[antenna_path].quality_indicator !=
286+
if (local_tone_info[tone_index].quality_indicator !=
287287
BT_HCI_LE_CS_TONE_QUALITY_HIGH ||
288-
remote_tone_info[antenna_path].quality_indicator !=
288+
remote_tone_info[tone_index].quality_indicator !=
289289
BT_HCI_LE_CS_TONE_QUALITY_HIGH) {
290290
return;
291291
}
292292

293293
struct bt_le_cs_iq_sample local_iq =
294-
bt_le_cs_parse_pct(local_tone_info[antenna_path].phase_correction_term);
294+
bt_le_cs_parse_pct(local_tone_info[tone_index].phase_correction_term);
295295
struct bt_le_cs_iq_sample remote_iq =
296-
bt_le_cs_parse_pct(remote_tone_info[antenna_path].phase_correction_term);
296+
bt_le_cs_parse_pct(remote_tone_info[tone_index].phase_correction_term);
297297

298298
m_n_iqs[antenna_path][channel_index]++;
299299
m_tone_quality_indicators[antenna_path][channel_index] = CS_DE_TONE_QUALITY_OK;

0 commit comments

Comments
 (0)