diff mbox series

Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl

Message ID 20210119114700.3662156-1-tientzu@chromium.org
State Accepted
Commit 7f9f2c3f7d99b8ae773459c74ac5e99a0dd46db9
Headers show
Series Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl | expand

Commit Message

Claire Chang Jan. 19, 2021, 11:47 a.m. UTC
Realtek Bluetooth controllers can do both LE scan and BR/EDR inquiry
at once, need to set HCI_QUIRK_SIMULTANEOUS_DISCOVERY quirk.

Signed-off-by: Claire Chang <tientzu@chromium.org>
---
 drivers/bluetooth/hci_h5.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Hilda Wu Jan. 25, 2021, 8 a.m. UTC | #1
Thanks Claire. Patch looks good to me.

Reviewed-by: Hilda Wu <hildawu@realtek.com>


-----Original Message-----
From: Claire Chang <tientzu@chromium.org> 

Sent: Tuesday, January 19, 2021 7:47 PM
To: marcel@holtmann.org; johan.hedberg@gmail.com; luiz.dentz@gmail.com
Cc: linux-bluetooth@vger.kernel.org; linux-kernel@vger.kernel.org; Max Chou <max.chou@realtek.com>; Hilda Wu <hildawu@realtek.com>; Claire Chang <tientzu@chromium.org>
Subject: [PATCH] Bluetooth: hci_h5: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY for btrtl

Realtek Bluetooth controllers can do both LE scan and BR/EDR inquiry at once, need to set HCI_QUIRK_SIMULTANEOUS_DISCOVERY quirk.

Signed-off-by: Claire Chang <tientzu@chromium.org>

---
 drivers/bluetooth/hci_h5.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index fb9817f97d45..27e96681d583 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -906,6 +906,11 @@ static int h5_btrtl_setup(struct h5 *h5)
 	/* Give the device some time before the hci-core sends it a reset */
 	usleep_range(10000, 20000);
 
+	/* Enable controller to do both LE scan and BR/EDR inquiry
+	 * simultaneously.
+	 */
+	set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &h5->hu->hdev->quirks);
+
 out_free:
 	btrtl_free(btrtl_dev);
 
--
2.30.0.284.gd98b1dd5eaa7-goog
Marcel Holtmann Jan. 25, 2021, 3:03 p.m. UTC | #2
Hi Claire,

> Realtek Bluetooth controllers can do both LE scan and BR/EDR inquiry

> at once, need to set HCI_QUIRK_SIMULTANEOUS_DISCOVERY quirk.

> 

> Signed-off-by: Claire Chang <tientzu@chromium.org>

> ---

> drivers/bluetooth/hci_h5.c | 5 +++++

> 1 file changed, 5 insertions(+)


patch has been applied to bluetooth-next tree.

Regards

Marcel
diff mbox series

Patch

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index fb9817f97d45..27e96681d583 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -906,6 +906,11 @@  static int h5_btrtl_setup(struct h5 *h5)
 	/* Give the device some time before the hci-core sends it a reset */
 	usleep_range(10000, 20000);
 
+	/* Enable controller to do both LE scan and BR/EDR inquiry
+	 * simultaneously.
+	 */
+	set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &h5->hu->hdev->quirks);
+
 out_free:
 	btrtl_free(btrtl_dev);