]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Bluetooth: mgmt: Add device disconnect reason
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Thu, 9 Aug 2012 07:52:30 +0000 (09:52 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 15 Aug 2012 04:31:50 +0000 (01:31 -0300)
commitb691f1ab753d7677d875205d54deb511cbcb2172
treee512711aff84a20afe7f86d1ea993ff06db8d756
parent3f81586415c6ae8968cd6592711eff31b055a685
Bluetooth: mgmt: Add device disconnect reason

MGMT_EV_DEVICE_DISCONNECTED will now expose the disconnection reason to
userland, distinguishing four possible values:

0x00 Reason not known or unspecified
0x01 Connection timeout
0x02 Connection terminated by local host
0x03 Connection terminated by remote host

Note that the local/remote distinction just determines which side
terminated the low-level connection, regardless of the disconnection of
the higher-level profiles.

This can sometimes be misleading and thus must be used with care. For
example, some hardware combinations would report a locally initiated
disconnection even if the user turned Bluetooth off in the remote side.

Signed-off-by: Mikel Astiz <mikel.astiz@bmw-carit.de>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
include/net/bluetooth/hci_core.h
include/net/bluetooth/mgmt.h
net/bluetooth/hci_event.c
net/bluetooth/mgmt.c