Skip to content

Commit 430df92

Browse files
cvinayakaescolar
authored andcommitted
Bluetooth: controller: split: Fix aborting of connection req PDU
Fix the initiator so that connection request PDU is not abort mid-air by preemption by the overalapping first connection event. If the connection establishment is in progress, then the first connection event trying to abort the initiator will wait the connection request to be transmited completely. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent d5314b8 commit 430df92

File tree

1 file changed

+10
-3
lines changed
  • subsys/bluetooth/controller/ll_sw/nordic/lll

1 file changed

+10
-3
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#include <toolchain.h>
99
#include <bluetooth/hci.h>
1010
#include <sys/byteorder.h>
11+
#include <soc.h>
1112

13+
#include "hal/cpu.h"
1214
#include "hal/ccm.h"
1315
#include "hal/radio.h"
1416
#include "hal/ticker.h"
@@ -35,7 +37,6 @@
3537
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER)
3638
#define LOG_MODULE_NAME bt_ctlr_lll_scan
3739
#include "common/log.h"
38-
#include <soc.h>
3940
#include "hal/debug.h"
4041

4142
static int init_reset(void);
@@ -313,8 +314,14 @@ static void abort_cb(struct lll_prepare_param *prepare_param, void *param)
313314
* After event has been cleanly aborted, clean up resources
314315
* and dispatch event done.
315316
*/
316-
radio_isr_set(isr_abort, param);
317-
radio_disable();
317+
if (IS_ENABLED(CONFIG_BT_CTLR_LOW_LAT) && lll_is_stop(param)) {
318+
while (!radio_has_disabled()) {
319+
cpu_sleep();
320+
}
321+
} else {
322+
radio_isr_set(isr_abort, param);
323+
radio_disable();
324+
}
318325
return;
319326
}
320327

0 commit comments

Comments
 (0)