All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: FIX - Disable EXT Adv if enabled
@ 2020-02-17  9:07 Sathish Narsimman
  2020-02-18  8:26 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Sathish Narsimman @ 2020-02-17  9:07 UTC (permalink / raw)
  To: linux-bluetooth, nsathish41; +Cc: Sathish Narsimman

Disabling LEGACY_ADV when EXT_ADV is enabled causes
'command disallowed' during DIRECTED_ADV. This Patch fixes this
issue.

Signed-off-by: Sathish Narsimman <sathish.narasimman@intel.com>
---
 net/bluetooth/hci_conn.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 65fa44cbe514..a582c676e584 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1029,11 +1029,8 @@ struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst,
 	 * anyway have to disable it in order to start directed
 	 * advertising.
 	 */
-	if (hci_dev_test_flag(hdev, HCI_LE_ADV)) {
-		u8 enable = 0x00;
-		hci_req_add(&req, HCI_OP_LE_SET_ADV_ENABLE, sizeof(enable),
-			    &enable);
-	}
+	if (hci_dev_test_flag(hdev, HCI_LE_ADV))
+		 __hci_req_disable_advertising(&req);
 
 	/* If requested to connect as slave use directed advertising */
 	if (conn->role == HCI_ROLE_SLAVE) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: FIX - Disable EXT Adv if enabled
  2020-02-17  9:07 [PATCH] Bluetooth: FIX - Disable EXT Adv if enabled Sathish Narsimman
@ 2020-02-18  8:26 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2020-02-18  8:26 UTC (permalink / raw)
  To: Sathish Narsimman; +Cc: linux-bluetooth, Sathish Narsimman

Hi Sathish,

> Disabling LEGACY_ADV when EXT_ADV is enabled causes
> 'command disallowed' during DIRECTED_ADV. This Patch fixes this
> issue.
> 
> Signed-off-by: Sathish Narsimman <sathish.narasimman@intel.com>
> ---
> net/bluetooth/hci_conn.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-18  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17  9:07 [PATCH] Bluetooth: FIX - Disable EXT Adv if enabled Sathish Narsimman
2020-02-18  8:26 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.