Commit b8a919be authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Carles Cufi
Browse files

Bluetooth: controller: Fix BIG Sync Lost event generation



Fix the BIG Sync Lost event generation to not use the Sync
Established structure to access the reason value.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 919a1841
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -6434,7 +6434,6 @@ static void le_big_sync_lost(struct pdu_data *pdu,
			     struct net_buf *buf)
{
	struct bt_hci_evt_le_big_sync_lost *sep;
	struct node_rx_sync_iso *se;

	if (!(event_mask & BT_EVT_MASK_LE_META_EVENT) ||
	    !(le_event_mask & BT_EVT_MASK_LE_BIG_SYNC_LOST)) {
@@ -6443,9 +6442,7 @@ static void le_big_sync_lost(struct pdu_data *pdu,

	sep = meta_evt(buf, BT_HCI_EVT_LE_BIG_SYNC_LOST, sizeof(*sep));
	sep->big_handle = sys_cpu_to_le16(node_rx->hdr.handle);

	se = (void *)pdu;
	sep->reason = se->status;
	sep->reason = *((uint8_t *)pdu);
}
#endif /* CONFIG_BT_CTLR_SYNC_ISO */
#endif /* CONFIG_BT_CTLR_SYNC_PERIODIC */
+1 −4
Original line number Diff line number Diff line
@@ -604,7 +604,6 @@ static void ticker_stop_op_cb(uint32_t status, void *param)
static void sync_lost(void *param)
{
	struct ll_sync_iso_set *sync_iso = param;
	struct node_rx_sync_iso *se;
	struct node_rx_pdu *rx;

	/* Generate BIG sync lost */
@@ -612,9 +611,7 @@ static void sync_lost(void *param)
	rx->hdr.handle = ull_sync_iso_handle_get(sync_iso);
	rx->hdr.type = NODE_RX_TYPE_SYNC_ISO_LOST;
	rx->hdr.rx_ftr.param = sync_iso;

	se = (void *)rx->pdu;
	se->status = BT_HCI_ERR_CONN_TIMEOUT;
	*((uint8_t *)rx->pdu) = BT_HCI_ERR_CONN_TIMEOUT;

	/* Enqueue the BIG sync lost towards ULL context */
	ll_rx_put(rx->hdr.link, rx);