Bluetooth: Fix kernel hci_dev_open timeout reset
Handle -EALREADY error in hci_sock of hci_dev_open as indication that
the HCI device is already open. This was causing reset inducing timeout,
and removed unused/useless check of failure in power-up code.
Signed-off-by: Brian Gix <bgix@codeaurora.org>
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 0046945..5a5c378 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -328,7 +328,12 @@
case HCIDEVUP:
if (!capable(CAP_NET_ADMIN))
return -EACCES;
- return hci_dev_open(arg);
+
+ err = hci_dev_open(arg);
+ if (!err || err == -EALREADY)
+ return 0;
+ else
+ return err;
case HCIDEVDOWN:
if (!capable(CAP_NET_ADMIN))