Bluetooth: controller: using REJECT_IND when EXT_IND was not negotiated
Unless a feature exchange determines support for REJECT_EXT_IND use REJECT_IND for collision rejection Signed-off-by: Erik Brockhoff <erbr@oticon.com>
This commit is contained in:
parent
0d94ad69f6
commit
26f6941048
4 changed files with 18 additions and 5 deletions
|
@ -21,6 +21,7 @@
|
||||||
#include "pdu.h"
|
#include "pdu.h"
|
||||||
#include "ll.h"
|
#include "ll.h"
|
||||||
#include "ll_settings.h"
|
#include "ll_settings.h"
|
||||||
|
#include "ll_feat.h"
|
||||||
|
|
||||||
#include "lll.h"
|
#include "lll.h"
|
||||||
#include "lll/lll_df_types.h"
|
#include "lll/lll_df_types.h"
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
#include "ull_conn_types.h"
|
#include "ull_conn_types.h"
|
||||||
#include "ull_conn_internal.h"
|
#include "ull_conn_internal.h"
|
||||||
#include "ull_llcp.h"
|
#include "ull_llcp.h"
|
||||||
|
#include "ull_llcp_features.h"
|
||||||
#include "ull_llcp_internal.h"
|
#include "ull_llcp_internal.h"
|
||||||
|
|
||||||
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER)
|
#define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER)
|
||||||
|
@ -371,9 +373,12 @@ static void rr_tx(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t opcode)
|
||||||
/* Encode LL Control PDU */
|
/* Encode LL Control PDU */
|
||||||
switch (opcode) {
|
switch (opcode) {
|
||||||
case PDU_DATA_LLCTRL_TYPE_REJECT_IND:
|
case PDU_DATA_LLCTRL_TYPE_REJECT_IND:
|
||||||
/* TODO(thoh): Select between LL_REJECT_IND and LL_REJECT_EXT_IND */
|
if (conn->llcp.fex.valid && feature_ext_rej_ind(conn)) {
|
||||||
llcp_pdu_encode_reject_ext_ind(pdu, conn->llcp.remote.reject_opcode,
|
llcp_pdu_encode_reject_ext_ind(pdu, conn->llcp.remote.reject_opcode,
|
||||||
BT_HCI_ERR_LL_PROC_COLLISION);
|
BT_HCI_ERR_LL_PROC_COLLISION);
|
||||||
|
} else {
|
||||||
|
llcp_pdu_encode_reject_ind(pdu, BT_HCI_ERR_LL_PROC_COLLISION);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PDU_DATA_LLCTRL_TYPE_UNKNOWN_RSP:
|
case PDU_DATA_LLCTRL_TYPE_UNKNOWN_RSP:
|
||||||
llcp_pdu_encode_unknown_rsp(ctx, pdu);
|
llcp_pdu_encode_unknown_rsp(ctx, pdu);
|
||||||
|
|
|
@ -918,6 +918,9 @@ void test_conn_update_central_loc_collision(void)
|
||||||
/* Role */
|
/* Role */
|
||||||
test_set_role(&conn, BT_HCI_ROLE_CENTRAL);
|
test_set_role(&conn, BT_HCI_ROLE_CENTRAL);
|
||||||
|
|
||||||
|
/* Emulate valid feature exchange */
|
||||||
|
conn.llcp.fex.valid = 1;
|
||||||
|
|
||||||
/* Connect */
|
/* Connect */
|
||||||
ull_cp_state_set(&conn, ULL_CP_CONNECTED);
|
ull_cp_state_set(&conn, ULL_CP_CONNECTED);
|
||||||
|
|
||||||
|
@ -941,8 +944,6 @@ void test_conn_update_central_loc_collision(void)
|
||||||
/* Release Tx */
|
/* Release Tx */
|
||||||
ull_cp_release_tx(&conn, tx);
|
ull_cp_release_tx(&conn, tx);
|
||||||
|
|
||||||
/**/
|
|
||||||
|
|
||||||
/* Prepare */
|
/* Prepare */
|
||||||
event_prepare(&conn);
|
event_prepare(&conn);
|
||||||
|
|
||||||
|
|
|
@ -699,6 +699,9 @@ void test_phy_update_central_loc_collision(void)
|
||||||
/* Role */
|
/* Role */
|
||||||
test_set_role(&conn, BT_HCI_ROLE_CENTRAL);
|
test_set_role(&conn, BT_HCI_ROLE_CENTRAL);
|
||||||
|
|
||||||
|
/* Emulate valid feature exchange */
|
||||||
|
conn.llcp.fex.valid = 1;
|
||||||
|
|
||||||
/* Connect */
|
/* Connect */
|
||||||
ull_cp_state_set(&conn, ULL_CP_CONNECTED);
|
ull_cp_state_set(&conn, ULL_CP_CONNECTED);
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,10 @@
|
||||||
#define CONFIG_BT_CTLR_CONN_PARAM_REQ y
|
#define CONFIG_BT_CTLR_CONN_PARAM_REQ y
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_BT_CTLR_EXT_REJ_IND
|
||||||
|
#define CONFIG_BT_CTLR_EXT_REJ_IND y
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_BT_CTLR_XTAL_ADVANCED
|
#ifndef CONFIG_BT_CTLR_XTAL_ADVANCED
|
||||||
#define CONFIG_BT_CTLR_XTAL_ADVANCED y
|
#define CONFIG_BT_CTLR_XTAL_ADVANCED y
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue