Bluetooth: Controller: Add storage for remote CTE request data

There are data received from peer device with CTE request.
These data are not part of local CTE request procedure and
they don't belong to CTE response configuration, hence separate
storage was provided.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This commit is contained in:
Piotr Pryga 2022-01-08 11:42:06 +01:00 committed by Christopher Friedt
commit f6f1ab9071
4 changed files with 21 additions and 15 deletions

View file

@ -694,7 +694,7 @@ static void rp_comm_rx_decode(struct ll_conn *conn, struct proc_ctx *ctx, struct
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RSP)
case PDU_DATA_LLCTRL_TYPE_CTE_REQ:
llcp_pdu_decode_cte_req(conn, pdu);
llcp_pdu_decode_cte_req(ctx, pdu);
break;
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RSP */
default:
@ -753,13 +753,13 @@ static void rp_comm_tx(struct ll_conn *conn, struct proc_ctx *ctx)
err_code = BT_HCI_ERR_INVALID_LL_PARAM;
}
#endif /* CONFIG_BT_PHY_UPDATE */
if (!(conn->llcp.cte_rsp.cte_types & BIT(conn->llcp.cte_req.cte_type)) &&
conn->llcp.cte_rsp.max_cte_len < conn->llcp.cte_req.min_cte_len) {
if (!(conn->llcp.cte_rsp.cte_types & BIT(ctx->data.cte_remote_req.cte_type)) ||
conn->llcp.cte_rsp.max_cte_len < ctx->data.cte_remote_req.min_cte_len) {
err_code = BT_HCI_ERR_UNSUPP_LL_PARAM_VAL;
}
if (!err_code) {
llcp_pdu_encode_cte_rsp(conn, pdu);
llcp_pdu_encode_cte_rsp(ctx, pdu);
ctx->rx_opcode = PDU_DATA_LLCTRL_TYPE_CTE_RSP;
} else {
llcp_pdu_encode_reject_ext_ind(pdu, PDU_DATA_LLCTRL_TYPE_CTE_REQ, err_code);