Skip to content

Commit e04d828

Browse files
Max Emdekartben
authored andcommitted
Bluetooth: BAP: Update encrypt_state when BIG synced after bad code
- When encrypt_state in a receive state of the scan delegator is BT_BAP_BIG_ENC_STATE_BAD_CODE, make sure that on synchronization encrypt_state is updated to BT_BAP_BIG_ENC_STATE_DEC, as this implies that a correct code was provided, so that the broadcast assistant is not asked for a correct code any longer. Signed-off-by: Max Emde <[email protected]>
1 parent 870b287 commit e04d828

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/bluetooth/audio/bap_broadcast_sink.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ static void update_recv_state_big_synced(const struct bt_bap_broadcast_sink *sin
128128
subgroup_param->bis_sync = sink_subgroup->bis_indexes & sink->indexes_bitfield;
129129
}
130130

131-
if (recv_state->encrypt_state == BT_BAP_BIG_ENC_STATE_BCODE_REQ) {
131+
if (recv_state->encrypt_state == BT_BAP_BIG_ENC_STATE_BCODE_REQ ||
132+
recv_state->encrypt_state == BT_BAP_BIG_ENC_STATE_BAD_CODE) {
132133
mod_src_param.encrypt_state = BT_BAP_BIG_ENC_STATE_DEC;
133134
} else {
134135
mod_src_param.encrypt_state = recv_state->encrypt_state;

0 commit comments

Comments
 (0)