Bluetooth: Add connected/disconnected management events
This patch adds connected and disconnected managment events to track the connection status to remote devices. The events map directly to successful connection complete and disconnection complete HCI events for ACL links. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:

committed by
Gustavo F. Padovan

parent
55ed8ca10f
commit
f7520543ab
@@ -714,6 +714,8 @@ int mgmt_powered(u16 index, u8 powered);
|
||||
int mgmt_discoverable(u16 index, u8 discoverable);
|
||||
int mgmt_connectable(u16 index, u8 connectable);
|
||||
int mgmt_new_key(u16 index, struct link_key *key, u8 old_key_type);
|
||||
int mgmt_connected(u16 index, bdaddr_t *bdaddr);
|
||||
int mgmt_disconnected(u16 index, bdaddr_t *bdaddr);
|
||||
|
||||
/* HCI info for socket */
|
||||
#define hci_pi(sk) ((struct hci_pinfo *) sk)
|
||||
|
@@ -162,3 +162,15 @@ struct mgmt_ev_new_key {
|
||||
struct mgmt_key_info key;
|
||||
__u8 old_key_type;
|
||||
} __packed;
|
||||
|
||||
#define MGMT_EV_CONNECTED 0x000B
|
||||
struct mgmt_ev_connected {
|
||||
__le16 index;
|
||||
bdaddr_t bdaddr;
|
||||
} __packed;
|
||||
|
||||
#define MGMT_EV_DISCONNECTED 0x000C
|
||||
struct mgmt_ev_disconnected {
|
||||
__le16 index;
|
||||
bdaddr_t bdaddr;
|
||||
} __packed;
|
||||
|
Reference in New Issue
Block a user