There is an issue that the L2CAP connect response function `l2cap_br_conn_req_reply()` is called first. And then the ACL disconnect function `bt_conn_disconnect()` is called following. But the packet of `bt_conn_disconnect()` appears on the HCI bus first. Add a flag `L2CAP_FLAG_DISCONNECT_ACL` to flag whether it is needed to disconnect ACL connection. Set the flag `L2CAP_FLAG_DISCONNECT_ACL` when result of the L2CAP channel conn rsp is `BT_L2CAP_BR_ERR_SEC_BLOCK`. Add a l2cap packet sent out callback `l2cap_br_conn_rsp_sent_cb()`. When the callback triggered, disconnect the ACL connect with `BT_HCI_ERR_AUTH_FAIL` if the flag `L2CAP_FLAG_DISCONNECT_ACL` has been set. Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com> |
||
|---|---|---|
| .. | ||
| audio | ||
| common | ||
| controller | ||
| crypto | ||
| host | ||
| lib | ||
| mesh | ||
| services | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Kconfig.adv | ||
| Kconfig.logging | ||