Commit 05bd80a1 authored by Sathish Narsimman's avatar Sathish Narsimman Committed by Marcel Holtmann

Bluetooth: Disable Extended Adv if enabled

Disabling LEGACY_ADV when EXT_ADV is enabled causes
'command disallowed' during DIRECTED_ADV. This Patch fixes this
issue.
Signed-off-by: default avatarSathish Narsimman <sathish.narasimman@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 848fc616
...@@ -1029,11 +1029,8 @@ struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst, ...@@ -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 * anyway have to disable it in order to start directed
* advertising. * advertising.
*/ */
if (hci_dev_test_flag(hdev, HCI_LE_ADV)) { if (hci_dev_test_flag(hdev, HCI_LE_ADV))
u8 enable = 0x00; __hci_req_disable_advertising(&req);
hci_req_add(&req, HCI_OP_LE_SET_ADV_ENABLE, sizeof(enable),
&enable);
}
/* If requested to connect as slave use directed advertising */ /* If requested to connect as slave use directed advertising */
if (conn->role == HCI_ROLE_SLAVE) { if (conn->role == HCI_ROLE_SLAVE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment