mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
Bluetooth: Add support for connect failed management event
This patch add a new connect failed management event to track failures in connecting to remote devices. It is particularly useful for security mode 3 scenarios when we don't have a connected state while pairing but still need to detect when the connect attempt failed. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
parent
8962ee74be
commit
17d5c04cb5
4 changed files with 23 additions and 1 deletions
|
@ -1227,3 +1227,14 @@ int mgmt_disconnect_failed(u16 index)
|
|||
|
||||
return err;
|
||||
}
|
||||
|
||||
int mgmt_connect_failed(u16 index, bdaddr_t *bdaddr, u8 status)
|
||||
{
|
||||
struct mgmt_ev_connect_failed ev;
|
||||
|
||||
put_unaligned_le16(index, &ev.index);
|
||||
bacpy(&ev.bdaddr, bdaddr);
|
||||
ev.status = status;
|
||||
|
||||
return mgmt_event(MGMT_EV_CONNECT_FAILED, &ev, sizeof(ev), NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue