[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190423072236.24999-3-jprvita@endlessm.com>
Date: Tue, 23 Apr 2019 15:22:36 +0800
From: "João Paulo Rechi Vita" <jprvita@...il.com>
To: Marcel Holtmann <marcel@...tmann.org>,
Johan Hedberg <johan.hedberg@...il.com>
Cc: bgodavar@...eaurora.org, ytkim@....qualcomm.com,
"David S . Miller" <davem@...emloft.net>,
linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux@...lessm.com,
João Paulo Rechi Vita <jprvita@...lessm.com>
Subject: [PATCH 2/2] Bluetooth: Set HCI_QUIRK_WAIT_FOR_MATCHING_CC for QCA9377
The QCA9377 devices send an extra command complete for the
LE_SET_RANDOM_ADDR when trying to start an active scanning procedure. It
has to be ignored to avoid confusing the kernel into thinking a passive
scanning procedure is being performed instead, which makes impossible to
discover BTLE devices since no device found events are generated for
passive scanning.
Signed-off-by: João Paulo Rechi Vita <jprvita@...lessm.com>
---
drivers/bluetooth/btusb.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ded198328f21..650ba4b7908a 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -70,6 +70,7 @@ static struct usb_driver btusb_driver;
#define BTUSB_BCM2045 0x40000
#define BTUSB_IFNUM_2 0x80000
#define BTUSB_CW6622 0x100000
+#define BTUSB_QCA9377 0x200000
static const struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */
@@ -394,6 +395,10 @@ static const struct usb_device_id blacklist_table[] = {
/* Silicon Wave based devices */
{ USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
+ /* QCA9377 devices */
+ { USB_DEVICE(0x13d3, 0x3491), .driver_info = BTUSB_QCA9377 },
+ { USB_DEVICE(0x13d3, 0x3501), .driver_info = BTUSB_QCA9377 },
+
{ } /* Terminating entry */
};
@@ -3196,6 +3201,10 @@ static int btusb_probe(struct usb_interface *intf,
btusb_check_needs_reset_resume(intf);
}
+ if (id->driver_info & BTUSB_QCA9377) {
+ set_bit(HCI_QUIRK_WAIT_FOR_MATCHING_CC, &hdev->quirks);
+ }
+
#ifdef CONFIG_BT_HCIBTUSB_RTL
if (id->driver_info & BTUSB_REALTEK) {
hdev->setup = btrtl_setup_realtek;
--
2.20.1
Powered by blists - more mailing lists