Skip to content

Commit 7d1404a

Browse files
cvinayakcfriedt
authored andcommitted
Bluetooth: Controller: Fix return value for unassigned aux context
Fix the return value use to indicate unassigned auxiliary context when scanning is using LLL scheduling. This can happen only under LLL scheduling where in LLL auxiliary channel PDU reception has been spawn from LLL primary channel scanning and on completion will join back to resume primary channel PDU scanning. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 0139338 commit 7d1404a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

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

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,14 @@ static int isr_rx_pdu(struct lll_scan *lll, struct lll_scan_aux *lll_aux,
724724
}
725725

726726
if (!lll_aux_to_use) {
727-
return -ENOBUFS;
727+
/* Return -ECHILD, as ULL execution has not yet assigned
728+
* an aux context. This can happen only under LLL
729+
* scheduling where in LLL auxiliary channel PDU
730+
* reception is spawn from LLL primary channel scanning
731+
* and on completion will join back to resume primary
732+
* channel PDU scanning.
733+
*/
734+
return -ECHILD;
728735
}
729736

730737
/* Always use CSA#2 on secondary channel, we need 2 nodes for conn
@@ -1014,7 +1021,14 @@ static int isr_rx_pdu(struct lll_scan *lll, struct lll_scan_aux *lll_aux,
10141021
ftr->param = lll;
10151022
ftr->scan_rsp = lll->lll_aux->state;
10161023
} else {
1017-
return -ECANCELED;
1024+
/* Return -ECHILD, as ULL execution has not yet assigned
1025+
* an aux context. This can happen only under LLL
1026+
* scheduling where in LLL auxiliary channel PDU
1027+
* reception is spawn from LLL primary channel scanning
1028+
* and on completion will join back to resume primary
1029+
* channel PDU scanning.
1030+
*/
1031+
return -ECHILD;
10181032
}
10191033

10201034
/* Allocate before `lll_scan_aux_setup` call, so that a new

0 commit comments

Comments
 (0)