Bluetooth: Controller: df: Fix wrong value of event counter in iq report
HCI_LE_Connectionless_IQ_Report and HCI_LE_Connection_IQ_Report events has fields that store event counter values: Periodic_Event_- Counter and Event_Counter, respectively. Values assigned to this HCI events are taken directly from lower link layer objects. In case of too slow processing of HCI events values provided by LLL contexts could be changed before HCI sends events to Host. That can happen e.g. in case of short periodic advertising interval and slow UART baudrate. In such situation event counter values will be corrupted. To prevent that situation, event counter values connected with IQ sample reports, has to be stored in node_rx_iq_report when a report instance is filled in LLL. This commit introduces required changes. Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This commit is contained in:
parent
4651a38e5d
commit
7dd3d8ff87
4 changed files with 5 additions and 2 deletions
|
@ -2869,7 +2869,7 @@ static void le_df_connectionless_iq_report(struct pdu_data *pdu_rx,
|
|||
* node rx footer field.
|
||||
*/
|
||||
sync_handle = ull_sync_handle_get(sync);
|
||||
per_evt_counter = lll->event_counter;
|
||||
per_evt_counter = iq_report->event_counter;
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_DF_SCAN_CTE_RX */
|
||||
|
||||
|
@ -3015,7 +3015,7 @@ static void le_df_connection_iq_report(struct node_rx_pdu *node_rx, struct net_b
|
|||
sep->cte_type = iq_report->cte_info.type;
|
||||
|
||||
sep->data_chan_idx = iq_report->chan_idx;
|
||||
sep->conn_evt_counter = sys_cpu_to_le16(lll->event_counter);
|
||||
sep->conn_evt_counter = sys_cpu_to_le16(iq_report->event_counter);
|
||||
|
||||
if (sep->cte_type == BT_HCI_LE_AOA_CTE) {
|
||||
sep->slot_durations = iq_report->local_slot_durations;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue