@@ -1012,6 +1012,19 @@ static void isr_done_cleanup(void *param)
1012
1012
#if defined(CONFIG_BT_CTLR_ADV_EXT )
1013
1013
struct event_done_extra * extra ;
1014
1014
1015
+ /* Generate Scan done events so that duration and max expiry is
1016
+ * detected in ULL.
1017
+ */
1018
+ extra = ull_done_extra_type_set (EVENT_DONE_EXTRA_TYPE_SCAN );
1019
+ LL_ASSERT (extra );
1020
+
1021
+ /* Prevent scan events in pipeline from being scheduled if duration has
1022
+ * expired.
1023
+ */
1024
+ if (unlikely (lll -> duration_reload && !lll -> duration_expire )) {
1025
+ lll -> is_stop = 1U ;
1026
+ }
1027
+
1015
1028
if (lll -> is_aux_sched ) {
1016
1029
struct node_rx_pdu * node_rx ;
1017
1030
@@ -1027,19 +1040,6 @@ static void isr_done_cleanup(void *param)
1027
1040
ull_rx_put (node_rx -> hdr .link , node_rx );
1028
1041
ull_rx_sched ();
1029
1042
}
1030
-
1031
- /* Generate Scan done events so that duration and max expiry is
1032
- * detected in ULL.
1033
- */
1034
- extra = ull_done_extra_type_set (EVENT_DONE_EXTRA_TYPE_SCAN );
1035
- LL_ASSERT (extra );
1036
-
1037
- /* Prevent scan events in pipeline from being scheduled if duration has
1038
- * expired.
1039
- */
1040
- if (unlikely (lll -> duration_reload && !lll -> duration_expire )) {
1041
- lll -> is_stop = 1U ;
1042
- }
1043
1043
#endif /* CONFIG_BT_CTLR_ADV_EXT */
1044
1044
1045
1045
lll_isr_cleanup (param );
@@ -1095,9 +1095,24 @@ static void isr_cleanup(void *param)
1095
1095
#if defined(CONFIG_BT_CTLR_ADV_EXT )
1096
1096
struct lll_scan * lll = param ;
1097
1097
1098
- lll -> is_aux_sched = 0U ;
1098
+ if (lll -> is_aux_sched ) {
1099
+ struct node_rx_pdu * node_rx ;
1100
+
1101
+ lll -> is_aux_sched = 0U ;
1102
+
1103
+ node_rx = ull_pdu_rx_alloc ();
1104
+ LL_ASSERT (node_rx );
1105
+
1106
+ node_rx -> hdr .type = NODE_RX_TYPE_EXT_AUX_RELEASE ;
1107
+
1108
+ node_rx -> hdr .rx_ftr .param = lll ;
1109
+
1110
+ ull_rx_put (node_rx -> hdr .link , node_rx );
1111
+ ull_rx_sched ();
1112
+ }
1099
1113
#endif /* CONFIG_BT_CTLR_ADV_EXT */
1100
1114
1115
+
1101
1116
lll_isr_cleanup (param );
1102
1117
}
1103
1118
0 commit comments