Skip to content

Commit 773222e

Browse files
committed
Bluetooth: Controller: Fix stuck forced continuation under throughput
Fix stuck forced continuation of connection event under high throughput scenario. At near supervision timeout the force flag is set, but in the next connection event if full connection interval is used for data transmission and a subsequent request to abort happens it was not honoured causing the tx-rx chain to keep continuing until supervision timeout. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
1 parent e3ed029 commit 773222e

File tree

1 file changed

+18
-16
lines changed
  • subsys/bluetooth/controller/ll_sw/nordic/lll

1 file changed

+18
-16
lines changed

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

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,16 @@ int lll_conn_central_is_abort_cb(void *next, void *curr,
165165
{
166166
struct lll_conn *lll = curr;
167167

168-
/* Do not abort if near supervision timeout */
169-
if (lll->forced) {
170-
return 0;
171-
}
168+
if (next != curr) {
169+
/* Do not be aborted by a different event if near supervision timeout */
170+
if ((lll->forced == 1U) && (trx_cnt < 1U)) {
171+
return 0;
172+
}
172173

173-
/* Do not be aborted by same event if a single central trx has not been
174-
* exchanged.
175-
*/
176-
if ((next == curr) && (trx_cnt < 1U)) {
174+
} else if (trx_cnt < 1U) {
175+
/* Do not be aborted by same event if a single central's Rx has not completed.
176+
* Cases where single trx duration can be greater than connection interval.
177+
*/
177178
return -EBUSY;
178179
}
179180

@@ -187,15 +188,16 @@ int lll_conn_peripheral_is_abort_cb(void *next, void *curr,
187188
{
188189
struct lll_conn *lll = curr;
189190

190-
/* Do not abort if near supervision timeout */
191-
if (lll->forced) {
192-
return 0;
193-
}
191+
if (next != curr) {
192+
/* Do not be aborted by a different event if near supervision timeout */
193+
if ((lll->forced == 1U) && (tx_cnt < 1U)) {
194+
return 0;
195+
}
194196

195-
/* Do not be aborted by same event if a single peripheral trx has not
196-
* been exchanged.
197-
*/
198-
if ((next == curr) && (tx_cnt < 1U)) {
197+
} else if (tx_cnt < 1U) {
198+
/* Do not be aborted by same event if a single peripheral's Tx has not completed.
199+
* Cases where single trx duration can be greater than connection interval.
200+
*/
199201
return -EBUSY;
200202
}
201203

0 commit comments

Comments
 (0)