diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2013-10-30 18:01:41 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-12-04 08:09:03 -0500 |
commit | 57eb776feac497c8e5b561c0a24156245f0c08db (patch) | |
tree | da0626d08c514db221a3e560b642634dd061ff0b /net/bluetooth/mgmt.c | |
parent | 3655bba8fe693e31c44c43cd30a9aaeee8bd45df (diff) |
Bluetooth: Add an extra check in mgmt_device_disconnected()
This patch adds an extra check in mgmt_device_disconnected() so we only
send the "Device Disconnected" event if it is ACL_LINK or LE_LINK link
type.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 6a74aa776541..a03ca3ca91bf 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -4595,6 +4595,9 @@ void mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, | |||
4595 | struct mgmt_ev_device_disconnected ev; | 4595 | struct mgmt_ev_device_disconnected ev; |
4596 | struct sock *sk = NULL; | 4596 | struct sock *sk = NULL; |
4597 | 4597 | ||
4598 | if (link_type != ACL_LINK && link_type != LE_LINK) | ||
4599 | return; | ||
4600 | |||
4598 | mgmt_pending_foreach(MGMT_OP_DISCONNECT, hdev, disconnect_rsp, &sk); | 4601 | mgmt_pending_foreach(MGMT_OP_DISCONNECT, hdev, disconnect_rsp, &sk); |
4599 | 4602 | ||
4600 | bacpy(&ev.addr.bdaddr, bdaddr); | 4603 | bacpy(&ev.addr.bdaddr, bdaddr); |