Skip to content

Commit 1de8a76

Browse files
erbr-otaescolar
authored andcommitted
Bluetooth: controller: adding API for unmasking peer features
For asymetrical features there needs to be a separate mechanism to unmask features in peer. This must be used in central for unmasking in case of 'unsupported in peer' condition for CIS Create. Signed-off-by: Erik Brockhoff <[email protected]>
1 parent 730f7ca commit 1de8a76

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

subsys/bluetooth/controller/ll_sw/ull_llcp_cc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,14 +921,14 @@ static void lp_cc_st_wait_rx_cis_rsp(struct ll_conn *conn, struct proc_ctx *ctx,
921921
break;
922922
case LP_CC_EVT_UNKNOWN:
923923
/* Unsupported in peer, so disable locally for this connection */
924-
feature_unmask_features(conn, LL_FEAT_BIT_CIS_PERIPHERAL);
924+
feature_unmask_peer_features(conn, LL_FEAT_BIT_CIS_PERIPHERAL);
925925
ctx->data.cis_create.error = BT_HCI_ERR_UNSUPP_REMOTE_FEATURE;
926926
lp_cc_complete(conn, ctx, evt, param);
927927
break;
928928
case LP_CC_EVT_REJECT:
929929
if (pdu->llctrl.reject_ext_ind.error_code == BT_HCI_ERR_UNSUPP_REMOTE_FEATURE) {
930930
/* Unsupported in peer, so disable locally for this connection */
931-
feature_unmask_features(conn, LL_FEAT_BIT_CIS_PERIPHERAL);
931+
feature_unmask_peer_features(conn, LL_FEAT_BIT_CIS_PERIPHERAL);
932932
}
933933
ctx->data.cis_create.error = pdu->llctrl.reject_ext_ind.error_code;
934934
lp_cc_complete(conn, ctx, evt, param);

subsys/bluetooth/controller/ll_sw/ull_llcp_features.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ static inline void feature_unmask_features(struct ll_conn *conn, uint64_t ll_fea
99
conn->llcp.fex.features_used &= ~ll_feat_mask;
1010
}
1111

12+
static inline void feature_unmask_peer_features(struct ll_conn *conn, uint64_t ll_feat_mask)
13+
{
14+
conn->llcp.fex.features_peer &= ~ll_feat_mask;
15+
}
16+
1217
static inline bool feature_le_encryption(struct ll_conn *conn)
1318
{
1419
#if defined(CONFIG_BT_CTLR_LE_ENC)

0 commit comments

Comments
 (0)