فهرست منبع

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>
Marcel Holtmann 11 سال پیش
والد
کامیت
c6521401d6
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      net/bluetooth/hci_sock.c

+ 1 - 0
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);
 		err = hci_dev_open(hdev->id);
 		if (err) {
 		if (err) {
 			clear_bit(HCI_USER_CHANNEL, &hdev->dev_flags);
 			clear_bit(HCI_USER_CHANNEL, &hdev->dev_flags);
+			mgmt_index_added(hdev);
 			hci_dev_put(hdev);
 			hci_dev_put(hdev);
 			goto done;
 			goto done;
 		}
 		}