From: Marcel Holtmann Date: Mon, 17 Feb 2014 17:21:18 +0000 (-0800) Subject: Bluetooth: Add missing index added event on user channel failure X-Git-Tag: accepted/tizen/common/20141203.182822~316^2~18^2^2~46^2~147 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6521401d668538784e27d5746e7035fcf1107a8;p=platform%2Fkernel%2Flinux-arm64.git 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 Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 7552f9e..68e51a8 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; }