* [PATCH 1/2] Bluetooth: Add missing index added event on user channel failure
@ 2014-02-17 17:21 Marcel Holtmann
2014-02-17 17:49 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2014-02-17 17:21 UTC (permalink / raw)
To: linux-bluetooth
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>
---
net/bluetooth/hci_sock.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
1.8.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] Bluetooth: Add missing index added event on user channel failure
2014-02-17 17:21 [PATCH 1/2] Bluetooth: Add missing index added event on user channel failure Marcel Holtmann
@ 2014-02-17 17:49 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2014-02-17 17:49 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi Marcel,
On Mon, Feb 17, 2014, Marcel Holtmann wrote:
> 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>
> ---
> net/bluetooth/hci_sock.c | 1 +
> 1 file changed, 1 insertion(+)
Both patches have been applied to bluetooth-next. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-17 17:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 17:21 [PATCH 1/2] Bluetooth: Add missing index added event on user channel failure Marcel Holtmann
2014-02-17 17:49 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox