]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: hci_sync: Ignore errors from HCI_OP_REMOTE_NAME_REQ_CANCEL
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 16 Aug 2023 19:05:00 +0000 (12:05 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 10 Sep 2024 17:07:24 +0000 (13:07 -0400)
This ignores errors from HCI_OP_REMOTE_NAME_REQ_CANCEL since it
shouldn't interfere with the stopping of discovery and in certain
conditions it seems to be failing.

Link: https://github.com/bluez/bluez/issues/575
Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_sync.c

index 5533e6f561b3a30ec61d4e5a45120446d8d292c6..40ccdef168d7da0f939a6832bf472b66bf206de7 100644 (file)
@@ -5380,7 +5380,10 @@ int hci_stop_discovery_sync(struct hci_dev *hdev)
                if (!e)
                        return 0;
 
-               return hci_remote_name_cancel_sync(hdev, &e->data.bdaddr);
+               /* Ignore cancel errors since it should interfere with stopping
+                * of the discovery.
+                */
+               hci_remote_name_cancel_sync(hdev, &e->data.bdaddr);
        }
 
        return 0;