Bluetooth: Move L2CAP connection notification earlier
We need to notify and initialize internal code before going ahead and notifying external code of a new connection. Also, in principle the L2ACP APIs for a connection should only be used after L2CAP has been told the connection exists. Change-Id: I0c8386b39ca86290da03ed68ad01c007b1c41c10 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
4bfbbce870
commit
0fdf33c734
1 changed files with 2 additions and 1 deletions
|
@ -618,12 +618,13 @@ static void le_conn_complete(struct bt_buf *buf)
|
|||
|
||||
bt_conn_set_state(conn, BT_CONN_CONNECTED);
|
||||
|
||||
bt_l2cap_connected(conn);
|
||||
|
||||
if (evt->role == BT_HCI_ROLE_SLAVE) {
|
||||
bt_l2cap_update_conn_param(conn);
|
||||
}
|
||||
|
||||
bt_connected(conn);
|
||||
bt_l2cap_connected(conn);
|
||||
}
|
||||
|
||||
static void le_adv_report(struct bt_buf *buf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue