Bluetooth: controller: fixup to peripheral CIS CREATE procedure
Missing decode of conn_event_count on CIS_IND Peripheral Suggest update to conn_event_count in case of a delayed CIS_IND, allowing CIS peripheral more time to setup Signed-off-by: Erik Brockhoff <erbr@oticon.com>
This commit is contained in:
parent
42e490917e
commit
9b553c3eb2
3 changed files with 14 additions and 0 deletions
|
@ -154,6 +154,9 @@ static void llcp_rp_cc_tx_rsp(struct ll_conn *conn, struct proc_ctx *ctx)
|
||||||
|
|
||||||
pdu = (struct pdu_data *)tx->pdu;
|
pdu = (struct pdu_data *)tx->pdu;
|
||||||
|
|
||||||
|
ctx->data.cis_create.conn_event_count = MAX(ctx->data.cis_create.conn_event_count,
|
||||||
|
cc_event_counter(conn) + 2);
|
||||||
|
|
||||||
llcp_pdu_encode_cis_rsp(ctx, pdu);
|
llcp_pdu_encode_cis_rsp(ctx, pdu);
|
||||||
ctx->tx_opcode = pdu->llctrl.opcode;
|
ctx->tx_opcode = pdu->llctrl.opcode;
|
||||||
|
|
||||||
|
@ -368,6 +371,7 @@ static void rp_cc_state_wait_rx_cis_ind(struct ll_conn *conn, struct proc_ctx *c
|
||||||
|
|
||||||
switch (evt) {
|
switch (evt) {
|
||||||
case RP_CC_EVT_CIS_IND:
|
case RP_CC_EVT_CIS_IND:
|
||||||
|
llcp_pdu_decode_cis_ind(ctx, pdu);
|
||||||
if (!ull_peripheral_iso_setup(&pdu->llctrl.cis_ind, ctx->data.cis_create.cig_id,
|
if (!ull_peripheral_iso_setup(&pdu->llctrl.cis_ind, ctx->data.cis_create.cig_id,
|
||||||
ctx->data.cis_create.cis_handle)) {
|
ctx->data.cis_create.cis_handle)) {
|
||||||
|
|
||||||
|
|
|
@ -716,6 +716,7 @@ void llcp_rp_cc_reject(struct ll_conn *conn, struct proc_ctx *ctx);
|
||||||
|
|
||||||
void llcp_pdu_decode_cis_req(struct proc_ctx *ctx, struct pdu_data *pdu);
|
void llcp_pdu_decode_cis_req(struct proc_ctx *ctx, struct pdu_data *pdu);
|
||||||
void llcp_pdu_encode_cis_rsp(struct proc_ctx *ctx, struct pdu_data *pdu);
|
void llcp_pdu_encode_cis_rsp(struct proc_ctx *ctx, struct pdu_data *pdu);
|
||||||
|
void llcp_pdu_decode_cis_ind(struct proc_ctx *ctx, struct pdu_data *pdu);
|
||||||
void llcp_pdu_encode_cis_terminate_ind(struct proc_ctx *ctx, struct pdu_data *pdu);
|
void llcp_pdu_encode_cis_terminate_ind(struct proc_ctx *ctx, struct pdu_data *pdu);
|
||||||
void llcp_pdu_decode_cis_terminate_ind(struct proc_ctx *ctx, struct pdu_data *pdu);
|
void llcp_pdu_decode_cis_terminate_ind(struct proc_ctx *ctx, struct pdu_data *pdu);
|
||||||
void llcp_pdu_encode_cis_req(struct proc_ctx *ctx, struct pdu_data *pdu);
|
void llcp_pdu_encode_cis_req(struct proc_ctx *ctx, struct pdu_data *pdu);
|
||||||
|
|
|
@ -828,6 +828,15 @@ void llcp_pdu_decode_cis_req(struct proc_ctx *ctx, struct pdu_data *pdu)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void llcp_pdu_decode_cis_ind(struct proc_ctx *ctx, struct pdu_data *pdu)
|
||||||
|
{
|
||||||
|
ctx->data.cis_create.conn_event_count =
|
||||||
|
sys_le16_to_cpu(pdu->llctrl.cis_ind.conn_event_count);
|
||||||
|
/* The remainder of the cis ind is decoded by ull_peripheral_iso_setup, so
|
||||||
|
* no need to do it here too
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
void llcp_pdu_encode_cis_rsp(struct proc_ctx *ctx, struct pdu_data *pdu)
|
void llcp_pdu_encode_cis_rsp(struct proc_ctx *ctx, struct pdu_data *pdu)
|
||||||
{
|
{
|
||||||
struct pdu_data_llctrl_cis_rsp *p;
|
struct pdu_data_llctrl_cis_rsp *p;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue