Skip to content

Commit 3712094

Browse files
mtpr-otcarlescufi
authored andcommitted
Bluetooth: controller: Fix CIS establishment procedures
Fixing typo in llcp_lp_cc_established revealed the need for completing the CIS establishment procedure by additional call to local/remote check_done function. Fixed by exposing lr_check_done and rr_check_done with naming update and calling after injecting the CIS_ESTABLISHED event. Signed-off-by: Morten Priess <[email protected]>
1 parent 98161bd commit 3712094

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

subsys/bluetooth/controller/ll_sw/ull_llcp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,7 @@ void ull_cp_cc_established(struct ll_conn *conn, uint8_t error_code)
13121312
if (ctx && ctx->proc == PROC_CIS_CREATE) {
13131313
ctx->data.cis_create.error = error_code;
13141314
llcp_rp_cc_established(conn, ctx);
1315+
llcp_rr_check_done(conn, ctx);
13151316
}
13161317
#endif /* CONFIG_BT_CTLR_PERIPHERAL_ISO */
13171318

@@ -1320,6 +1321,7 @@ void ull_cp_cc_established(struct ll_conn *conn, uint8_t error_code)
13201321
if (ctx && ctx->proc == PROC_CIS_CREATE) {
13211322
ctx->data.cis_create.error = error_code;
13221323
llcp_lp_cc_established(conn, ctx);
1324+
llcp_lr_check_done(conn, ctx);
13231325
}
13241326
#endif /* CONFIG_BT_CTLR_CENTRAL_ISO */
13251327
}

subsys/bluetooth/controller/ll_sw/ull_llcp_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ void llcp_lr_complete(struct ll_conn *conn);
524524
void llcp_lr_connect(struct ll_conn *conn);
525525
void llcp_lr_disconnect(struct ll_conn *conn);
526526
void llcp_lr_abort(struct ll_conn *conn);
527+
void llcp_lr_check_done(struct ll_conn *conn, struct proc_ctx *ctx);
527528

528529
/*
529530
* LLCP Remote Request
@@ -546,6 +547,7 @@ void llcp_rr_complete(struct ll_conn *conn);
546547
void llcp_rr_connect(struct ll_conn *conn);
547548
void llcp_rr_disconnect(struct ll_conn *conn);
548549
void llcp_rr_new(struct ll_conn *conn, struct node_rx_pdu *rx, bool valid_pdu);
550+
void llcp_rr_check_done(struct ll_conn *conn, struct proc_ctx *ctx);
549551

550552
#if defined(CONFIG_BT_CTLR_LE_PING)
551553
/*

subsys/bluetooth/controller/ll_sw/ull_llcp_local.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include <soc.h>
4747
#include "hal/debug.h"
4848

49-
static void lr_check_done(struct ll_conn *conn, struct proc_ctx *ctx);
5049
static struct proc_ctx *lr_dequeue(struct ll_conn *conn);
5150

5251
/* LLCP Local Request FSM State */
@@ -72,7 +71,7 @@ enum {
7271
LR_EVT_DISCONNECT,
7372
};
7473

75-
static void lr_check_done(struct ll_conn *conn, struct proc_ctx *ctx)
74+
void llcp_lr_check_done(struct ll_conn *conn, struct proc_ctx *ctx)
7675
{
7776
if (ctx->done) {
7877
struct proc_ctx *ctx_header;
@@ -273,7 +272,7 @@ void llcp_lr_rx(struct ll_conn *conn, struct proc_ctx *ctx, struct node_rx_pdu *
273272
break;
274273
}
275274

276-
lr_check_done(conn, ctx);
275+
llcp_lr_check_done(conn, ctx);
277276
}
278277

279278
void llcp_lr_tx_ack(struct ll_conn *conn, struct proc_ctx *ctx, struct node_tx *tx)
@@ -306,7 +305,7 @@ void llcp_lr_tx_ack(struct ll_conn *conn, struct proc_ctx *ctx, struct node_tx *
306305
break;
307306
/* Ignore tx_ack */
308307
}
309-
lr_check_done(conn, ctx);
308+
llcp_lr_check_done(conn, ctx);
310309
}
311310

312311
void llcp_lr_tx_ntf(struct ll_conn *conn, struct proc_ctx *ctx)
@@ -322,7 +321,7 @@ void llcp_lr_tx_ntf(struct ll_conn *conn, struct proc_ctx *ctx)
322321
break;
323322
}
324323

325-
lr_check_done(conn, ctx);
324+
llcp_lr_check_done(conn, ctx);
326325
}
327326

328327
static void lr_act_run(struct ll_conn *conn)
@@ -403,7 +402,7 @@ static void lr_act_run(struct ll_conn *conn)
403402
break;
404403
}
405404

406-
lr_check_done(conn, ctx);
405+
llcp_lr_check_done(conn, ctx);
407406
}
408407

409408
static void lr_act_complete(struct ll_conn *conn)

subsys/bluetooth/controller/ll_sw/ull_llcp_remote.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
#include <soc.h>
4848
#include "hal/debug.h"
4949

50-
static void rr_check_done(struct ll_conn *conn, struct proc_ctx *ctx);
5150
static struct proc_ctx *rr_dequeue(struct ll_conn *conn);
5251
static void rr_abort(struct ll_conn *conn);
5352

@@ -110,7 +109,7 @@ static bool proc_with_instant(struct proc_ctx *ctx)
110109
return 0U;
111110
}
112111

113-
static void rr_check_done(struct ll_conn *conn, struct proc_ctx *ctx)
112+
void llcp_rr_check_done(struct ll_conn *conn, struct proc_ctx *ctx)
114113
{
115114
if (ctx->done) {
116115
struct proc_ctx *ctx_header;
@@ -289,7 +288,7 @@ void llcp_rr_rx(struct ll_conn *conn, struct proc_ctx *ctx, struct node_rx_pdu *
289288
LL_ASSERT(0);
290289
break;
291290
}
292-
rr_check_done(conn, ctx);
291+
llcp_rr_check_done(conn, ctx);
293292
}
294293

295294
void llcp_rr_tx_ack(struct ll_conn *conn, struct proc_ctx *ctx, struct node_tx *tx)
@@ -320,7 +319,7 @@ void llcp_rr_tx_ack(struct ll_conn *conn, struct proc_ctx *ctx, struct node_tx *
320319
break;
321320
}
322321

323-
rr_check_done(conn, ctx);
322+
llcp_rr_check_done(conn, ctx);
324323
}
325324

326325
void llcp_rr_tx_ntf(struct ll_conn *conn, struct proc_ctx *ctx)
@@ -341,7 +340,7 @@ void llcp_rr_tx_ntf(struct ll_conn *conn, struct proc_ctx *ctx)
341340
break;
342341
}
343342

344-
rr_check_done(conn, ctx);
343+
llcp_rr_check_done(conn, ctx);
345344
}
346345

347346
static void rr_act_run(struct ll_conn *conn)
@@ -421,7 +420,7 @@ static void rr_act_run(struct ll_conn *conn)
421420
break;
422421
}
423422

424-
rr_check_done(conn, ctx);
423+
llcp_rr_check_done(conn, ctx);
425424
}
426425

427426
static void rr_tx(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t opcode)
@@ -894,7 +893,7 @@ void llcp_rr_new(struct ll_conn *conn, struct node_rx_pdu *rx, bool valid_pdu)
894893
/* Prepare procedure */
895894
llcp_rr_prepare(conn, rx);
896895

897-
rr_check_done(conn, ctx);
896+
llcp_rr_check_done(conn, ctx);
898897

899898
/* Handle PDU */
900899
ctx = llcp_rr_peek(conn);

0 commit comments

Comments
 (0)