]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Add missing index added event on user channel failure
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 17 Feb 2014 17:21:18 +0000 (09:21 -0800)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 17 Feb 2014 17:48:24 +0000 (19:48 +0200)
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>
net/bluetooth/hci_sock.c

index 7552f9e3089ce790040268f1ce0a067d6ef728cb..68e51a84e72ddb4f2eeba3fc76458d6a8f8a1c06 100644 (file)
@@ -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;
                }