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

Bluetooth: controller: Fix BIG complete event generation



Fix the LE BIG complete event generation to not use the
Sync Established structure to access the status value.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent b8a919be
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -6479,7 +6479,6 @@ static void le_big_complete(struct pdu_data *pdu_data,
	struct bt_hci_evt_le_big_complete *sep;
	struct ll_adv_iso_set *adv_iso;
	struct lll_adv_iso *lll;
	struct node_rx_sync *se;
	size_t evt_size;

	adv_iso = node_rx->hdr.rx_ftr.param;
@@ -6489,8 +6488,7 @@ static void le_big_complete(struct pdu_data *pdu_data,

	sep = meta_evt(buf, BT_HCI_EVT_LE_BIG_COMPLETE, evt_size);

	se = (void *)pdu_data;
	sep->status = se->status;
	sep->status = BT_HCI_ERR_SUCCESS;
	sep->big_handle = sys_cpu_to_le16(node_rx->hdr.handle);

	if (sep->status) {
+8 −4
Original line number Diff line number Diff line
@@ -278,8 +278,8 @@ uint8_t ll_big_create(uint8_t big_handle, uint8_t adv_handle, uint8_t num_bis,
	lll_adv_sync->iso = lll_adv_iso;
	lll_adv_iso->adv = &adv->lll;

	/* Store the link buffer for ISO create complete event */
	adv_iso->node_rx_complete.link = link;
	/* Store the link buffer for ISO create and terminate complete event */
	adv_iso->node_rx_complete.hdr.link = link;

	/* Initialise LLL header members */
	lll_hdr_init(lll_adv_iso, adv_iso);
@@ -474,6 +474,7 @@ void ull_adv_iso_done(struct node_rx_event_done *done)
	struct ll_adv_iso_set *adv_iso;
	struct lll_adv_iso *lll;
	struct node_rx_hdr *rx;
	memq_link_t *link;

	/* switch to normal prepare */
	mfy_lll_prepare.fp = lll_adv_iso_prepare;
@@ -483,12 +484,15 @@ void ull_adv_iso_done(struct node_rx_event_done *done)
	lll = &adv_iso->lll;

	/* Prepare BIG complete event */
	rx = &adv_iso->node_rx_complete;
	rx = (void *)&adv_iso->node_rx_complete;
	link = rx->link;
	LL_ASSERT(link);
	rx->link = NULL;
	rx->type = NODE_RX_TYPE_BIG_COMPLETE;
	rx->handle = lll->handle;
	rx->rx_ftr.param = adv_iso;

	ll_rx_put(rx->link, rx);
	ll_rx_put(link, rx);
	ll_rx_sched();
}

+3 −1
Original line number Diff line number Diff line
@@ -96,7 +96,9 @@ struct ll_adv_iso_set {
	struct ull_hdr        ull;
	struct lll_adv_iso    lll;

	struct node_rx_hdr node_rx_complete;
	struct {
		struct node_rx_hdr hdr;
	} node_rx_complete;
	struct {
		struct node_rx_hdr node_rx_hdr_terminate;
		union {