@@ -69,6 +69,7 @@ static uint8_t crc_valid;
69
69
static uint8_t is_aborted ;
70
70
static uint16_t tx_cnt ;
71
71
static uint16_t trx_cnt ;
72
+ static uint8_t trx_busy_iteration ;
72
73
73
74
#if defined(CONFIG_BT_CTLR_LE_ENC )
74
75
static uint8_t mic_state ;
@@ -153,13 +154,21 @@ void lll_conn_prepare_reset(void)
153
154
crc_valid = 0U ;
154
155
crc_expire = 0U ;
155
156
is_aborted = 0U ;
157
+ trx_busy_iteration = 0U ;
156
158
157
159
#if defined(CONFIG_BT_CTLR_LE_ENC )
158
160
mic_state = LLL_CONN_MIC_NONE ;
159
161
#endif /* CONFIG_BT_CTLR_LE_ENC */
160
162
}
161
163
162
164
#if defined(CONFIG_BT_CENTRAL )
165
+ /* Number of times central event being aborted by same event instance be skipped */
166
+ /* FIXME: Increasing this causes event pipeline overflow assertion, add LLL implementation to
167
+ * gracefully abort the deferred next event when -EBUSY is returned in this is_abort_cb
168
+ * interface.
169
+ */
170
+ #define CENTRAL_TRX_BUSY_ITERATION_MAX 0
171
+
163
172
int lll_conn_central_is_abort_cb (void * next , void * curr ,
164
173
lll_prepare_cb_t * resume_cb )
165
174
{
@@ -171,7 +180,9 @@ int lll_conn_central_is_abort_cb(void *next, void *curr,
171
180
return 0 ;
172
181
}
173
182
174
- } else if (trx_cnt < 1U ) {
183
+ } else if ((trx_cnt < 1U ) && (trx_busy_iteration < CENTRAL_TRX_BUSY_ITERATION_MAX )) {
184
+ trx_busy_iteration ++ ;
185
+
175
186
/* Do not be aborted by same event if a single central's Rx has not completed.
176
187
* Cases where single trx duration can be greater than connection interval.
177
188
*/
@@ -183,6 +194,13 @@ int lll_conn_central_is_abort_cb(void *next, void *curr,
183
194
#endif /* CONFIG_BT_CENTRAL */
184
195
185
196
#if defined(CONFIG_BT_PERIPHERAL )
197
+ /* Number of times peripheral event being aborted by same event instance be skipped */
198
+ /* FIXME: Increasing this causes event pipeline overflow assertion, add LLL implementation to
199
+ * gracefully abort the deferred next event when -EBUSY is returned in this is_abort_cb
200
+ * interface.
201
+ */
202
+ #define PERIPHERAL_TRX_BUSY_ITERATION_MAX 0
203
+
186
204
int lll_conn_peripheral_is_abort_cb (void * next , void * curr ,
187
205
lll_prepare_cb_t * resume_cb )
188
206
{
@@ -194,7 +212,9 @@ int lll_conn_peripheral_is_abort_cb(void *next, void *curr,
194
212
return 0 ;
195
213
}
196
214
197
- } else if (tx_cnt < 1U ) {
215
+ } else if ((tx_cnt < 1U ) && (trx_busy_iteration < PERIPHERAL_TRX_BUSY_ITERATION_MAX )) {
216
+ trx_busy_iteration ++ ;
217
+
198
218
/* Do not be aborted by same event if a single peripheral's Tx has not completed.
199
219
* Cases where single trx duration can be greater than connection interval.
200
220
*/
0 commit comments