Commit 903672c3 authored by Marek Pieta's avatar Marek Pieta Committed by Carles Cufi
Browse files

bluetooth: att: Fix L2CAP channel section order

The L2CAP channel section is sorted lexicographically. Make sure
that ATT fixed channel will be placed as the last one to ensure
that SMP channel is properly initialized before bt_att_connected
tries to send security request.

Fixes #45820

Signed-off-by: default avatarMarek Pieta <Marek.Pieta@nordicsemi.no>
parent 01f4a647
Loading
Loading
Loading
Loading
+5 −1
Changes for subsys/bluetooth/host/att.c: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3173,7 +3173,11 @@ static int bt_att_accept(struct bt_conn *conn, struct bt_l2cap_chan **ch)
	return 0;
}

BT_L2CAP_CHANNEL_DEFINE(att_fixed_chan, BT_L2CAP_CID_ATT, bt_att_accept, NULL);
/* The L2CAP channel section is sorted lexicographically. Make sure that ATT fixed channel will be
 * placed as the last one to ensure that SMP channel is properly initialized before bt_att_connected
 * tries to send security request.
 */
BT_L2CAP_CHANNEL_DEFINE(z_att_fixed_chan, BT_L2CAP_CID_ATT, bt_att_accept, NULL);

#if defined(CONFIG_BT_EATT)
static k_timeout_t credit_based_connection_delay(struct bt_conn *conn)