Bluetooth: controller: llcp: fix CI tests for new LLCP
Setting the new LLCP as default exposed errors in CI tests, which are fixed here Note that advanced scheduling needs to be disabled. Work is in progress for implementing this for the new LLCP Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
This commit is contained in:
parent
e1c2c36f56
commit
6fe1299c33
8 changed files with 22 additions and 8 deletions
|
@ -71,7 +71,7 @@ if(CONFIG_BT_LL_SW_SPLIT)
|
||||||
if(CONFIG_BT_LL_SW_LLCP_LEGACY)
|
if(CONFIG_BT_LL_SW_LLCP_LEGACY)
|
||||||
else()
|
else()
|
||||||
zephyr_library_sources_ifdef(
|
zephyr_library_sources_ifdef(
|
||||||
CONFIG_BT_PHY_UPDATE
|
CONFIG_BT_CTLR_PHY
|
||||||
ll_sw/ull_llcp_phy.c
|
ll_sw/ull_llcp_phy.c
|
||||||
)
|
)
|
||||||
zephyr_library_sources_ifdef(
|
zephyr_library_sources_ifdef(
|
||||||
|
|
|
@ -91,7 +91,6 @@ config BT_LL_SW_LLCP
|
||||||
help
|
help
|
||||||
Use the new Bluetooth Low Energy Software Link Layer Control Procedure implementation.
|
Use the new Bluetooth Low Energy Software Link Layer Control Procedure implementation.
|
||||||
|
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
|
||||||
|
@ -557,6 +556,7 @@ config BT_CTLR_LLCP_COMMON_TX_CTRL_BUF_NUM
|
||||||
|
|
||||||
config BT_CTLR_LLCP_LOCAL_PROC_CTX_BUF_NUM
|
config BT_CTLR_LLCP_LOCAL_PROC_CTX_BUF_NUM
|
||||||
int "Number of local control procedure contexts to be available across all connections"
|
int "Number of local control procedure contexts to be available across all connections"
|
||||||
|
default 4 if (BT_AUTO_PHY_UPDATE=y || BT_AUTO_DATA_LEN_UPDATE=y) && BT_CTLR_LLCP_CONN < 4
|
||||||
default 2 if BT_CTLR_LLCP_CONN = 1
|
default 2 if BT_CTLR_LLCP_CONN = 1
|
||||||
default BT_CTLR_LLCP_CONN if BT_CTLR_LLCP_CONN > 1
|
default BT_CTLR_LLCP_CONN if BT_CTLR_LLCP_CONN > 1
|
||||||
range 2 255
|
range 2 255
|
||||||
|
|
|
@ -804,9 +804,14 @@ static uint32_t adv_iso_start(struct ll_adv_iso_set *adv_iso,
|
||||||
}
|
}
|
||||||
ticks_slot = adv_iso->ull.ticks_slot + ticks_slot_overhead;
|
ticks_slot = adv_iso->ull.ticks_slot + ticks_slot_overhead;
|
||||||
|
|
||||||
|
#if defined(BT_CTLR_SCHED_ADVANCED)
|
||||||
/* Find the slot after Periodic Advertisings events */
|
/* Find the slot after Periodic Advertisings events */
|
||||||
err = ull_sched_adv_aux_sync_free_slot_get(TICKER_USER_ID_THREAD,
|
err = ull_sched_adv_aux_sync_free_slot_get(TICKER_USER_ID_THREAD,
|
||||||
ticks_slot, &ticks_anchor);
|
ticks_slot, &ticks_anchor);
|
||||||
|
#else
|
||||||
|
/* advanced scheduling not enabled */
|
||||||
|
err = -1;
|
||||||
|
#endif
|
||||||
if (err) {
|
if (err) {
|
||||||
ticks_anchor = ticker_ticks_now_get();
|
ticks_anchor = ticker_ticks_now_get();
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
#include "hal/debug.h"
|
#include "hal/debug.h"
|
||||||
|
|
||||||
|
#if defined(CONFIG_BT_PERIPHERAL)
|
||||||
static uint16_t cc_event_counter(struct ll_conn *conn)
|
static uint16_t cc_event_counter(struct ll_conn *conn)
|
||||||
{
|
{
|
||||||
struct lll_conn *lll;
|
struct lll_conn *lll;
|
||||||
|
@ -67,7 +68,6 @@ static uint16_t cc_event_counter(struct ll_conn *conn)
|
||||||
return event_counter;
|
return event_counter;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_BT_PERIPHERAL)
|
|
||||||
/* LLCP Remote Procedure FSM states */
|
/* LLCP Remote Procedure FSM states */
|
||||||
enum {
|
enum {
|
||||||
/* Establish Procedure */
|
/* Establish Procedure */
|
||||||
|
@ -291,7 +291,7 @@ static uint8_t rp_cc_check_phy(struct ll_conn *conn, struct proc_ctx *ctx,
|
||||||
/* Unsupported phy selected */
|
/* Unsupported phy selected */
|
||||||
return BT_HCI_ERR_UNSUPP_FEATURE_PARAM_VAL;
|
return BT_HCI_ERR_UNSUPP_FEATURE_PARAM_VAL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_BT_CTLR_PHY */
|
||||||
|
|
||||||
return BT_HCI_ERR_SUCCESS;
|
return BT_HCI_ERR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,11 @@
|
||||||
|
|
||||||
#include "ull_conn_internal.h"
|
#include "ull_conn_internal.h"
|
||||||
#include "ull_conn_types.h"
|
#include "ull_conn_types.h"
|
||||||
|
|
||||||
|
#if defined(CONFIG_BT_CTLR_USER_EXT)
|
||||||
|
#include "ull_vendor.h"
|
||||||
|
#endif /* CONFIG_BT_CTLR_USER_EXT */
|
||||||
|
|
||||||
#include "ull_internal.h"
|
#include "ull_internal.h"
|
||||||
#include "ull_llcp.h"
|
#include "ull_llcp.h"
|
||||||
#include "ull_llcp_features.h"
|
#include "ull_llcp_features.h"
|
||||||
|
@ -203,6 +208,7 @@ static bool cu_should_notify_host(struct proc_ctx *ctx)
|
||||||
(ctx->data.cu.params_changed != 0U));
|
(ctx->data.cu.params_changed != 0U));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_BT_CENTRAL) || defined(CONFIG_BT_CTLR_CONN_PARAM_REQ)
|
||||||
static void lp_cu_tx(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t opcode)
|
static void lp_cu_tx(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t opcode)
|
||||||
{
|
{
|
||||||
struct node_tx *tx;
|
struct node_tx *tx;
|
||||||
|
@ -248,6 +254,7 @@ static void lp_cu_tx(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t opcode)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_BT_CENTRAL || CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
||||||
|
|
||||||
static void lp_cu_ntf(struct ll_conn *conn, struct proc_ctx *ctx)
|
static void lp_cu_ntf(struct ll_conn *conn, struct proc_ctx *ctx)
|
||||||
{
|
{
|
||||||
|
|
|
@ -113,7 +113,7 @@ uint8_t ll_cis_reject(uint16_t handle, uint8_t reason)
|
||||||
#if defined(CONFIG_BT_LL_SW_LLCP_LEGACY)
|
#if defined(CONFIG_BT_LL_SW_LLCP_LEGACY)
|
||||||
status = BT_HCI_ERR_CMD_DISALLOWED;
|
status = BT_HCI_ERR_CMD_DISALLOWED;
|
||||||
#else
|
#else
|
||||||
struct ll_conn *acl_conn = ll_cis_reply_ok(handle, &status);
|
struct ll_conn *acl_conn = ll_cis_get_acl_awaiting_reply(handle, &status);
|
||||||
|
|
||||||
if (acl_conn) {
|
if (acl_conn) {
|
||||||
/* Accept request */
|
/* Accept request */
|
||||||
|
|
|
@ -58,11 +58,11 @@ static void win_offset_calc(struct ll_conn *conn_curr, uint8_t is_select,
|
||||||
#endif
|
#endif
|
||||||
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
||||||
|
|
||||||
#if defined(CONFIG_BT_CONN)
|
#if defined(CONFIG_BT_CONN) && (defined(CONFIG_BT_CENTRAL) || defined(CONFIG_BT_LL_SW_LLCP_LEGACY))
|
||||||
static void after_cen_offset_get(uint16_t conn_interval, uint32_t ticks_slot,
|
static void after_cen_offset_get(uint16_t conn_interval, uint32_t ticks_slot,
|
||||||
uint32_t ticks_anchor,
|
uint32_t ticks_anchor,
|
||||||
uint32_t *win_offset_us);
|
uint32_t *win_offset_us);
|
||||||
#endif /* CONFIG_BT_CONN */
|
#endif /* CONFIG_BT_CONN && (CONFIG_BT_CENTRAL || CONFIG_BT_LL_SW_LLCP_LEGACY) */
|
||||||
|
|
||||||
typedef struct ull_hdr *(*ull_hdr_get_func)(uint8_t ticker_id,
|
typedef struct ull_hdr *(*ull_hdr_get_func)(uint8_t ticker_id,
|
||||||
uint32_t *ticks_slot);
|
uint32_t *ticks_slot);
|
||||||
|
@ -595,6 +595,7 @@ static void win_offset_calc(struct ll_conn *conn_curr, uint8_t is_select,
|
||||||
#endif /* CONFIG_BT_LL_SW_LLCP_LEGACY */
|
#endif /* CONFIG_BT_LL_SW_LLCP_LEGACY */
|
||||||
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
|
||||||
|
|
||||||
|
#if defined(CONFIG_BT_CENTRAL) || defined(CONFIG_BT_LL_SW_LLCP_LEGACY)
|
||||||
static void after_cen_offset_get(uint16_t conn_interval, uint32_t ticks_slot,
|
static void after_cen_offset_get(uint16_t conn_interval, uint32_t ticks_slot,
|
||||||
uint32_t ticks_anchor,
|
uint32_t ticks_anchor,
|
||||||
uint32_t *win_offset_us)
|
uint32_t *win_offset_us)
|
||||||
|
@ -633,6 +634,7 @@ static void after_cen_offset_get(uint16_t conn_interval, uint32_t ticks_slot,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_BT_CENTRAL || CONFIG_BT_LL_SW_LLCP_LEGACY */
|
||||||
#endif /* CONFIG_BT_CONN */
|
#endif /* CONFIG_BT_CONN */
|
||||||
|
|
||||||
static uint8_t after_match_slot_get(uint8_t user_id, uint32_t ticks_slot_abs,
|
static uint8_t after_match_slot_get(uint8_t user_id, uint32_t ticks_slot_abs,
|
||||||
|
|
|
@ -10,7 +10,7 @@ CONFIG_BT_AUTO_PHY_UPDATE=y
|
||||||
CONFIG_BT_USER_DATA_LEN_UPDATE=y
|
CONFIG_BT_USER_DATA_LEN_UPDATE=y
|
||||||
CONFIG_BT_AUTO_DATA_LEN_UPDATE=y
|
CONFIG_BT_AUTO_DATA_LEN_UPDATE=y
|
||||||
|
|
||||||
CONFIG_BT_MAX_CONN=250
|
CONFIG_BT_MAX_CONN=150
|
||||||
CONFIG_BT_ID_MAX=250
|
CONFIG_BT_ID_MAX=250
|
||||||
|
|
||||||
# L2CAP, ATT and SMP usage cause data transmission deadlock due to shortage
|
# L2CAP, ATT and SMP usage cause data transmission deadlock due to shortage
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue