summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sock.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-02-17 18:21:18 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2014-02-17 18:48:24 +0100
commitc6521401d668538784e27d5746e7035fcf1107a8 (patch)
tree0fd93b9cac6f8427f6d8de5cd9845aa9627186cb /net/bluetooth/hci_sock.c
parentBluetooth: Fix sending wrong store hint for new long term keys (diff)
downloadlinux-c6521401d668538784e27d5746e7035fcf1107a8.tar.xz
linux-c6521401d668538784e27d5746e7035fcf1107a8.zip
Bluetooth: Add missing index added event on user channel failure
When the setup of user channel fails, the index added event is not sent and will cause issues with user interaction. This problem can be easily triggered with a LE only controller without a public address. In that case hci_dev_open() fails and that error case is not sending an event saying that the controller is available for normal use again. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_sock.c')
-rw-r--r--net/bluetooth/hci_sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 7552f9e3089c..68e51a84e72d 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -716,6 +716,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
err = hci_dev_open(hdev->id);
if (err) {
clear_bit(HCI_USER_CHANNEL, &hdev->dev_flags);
+ mgmt_index_added(hdev);
hci_dev_put(hdev);
goto done;
}