aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/bluetooth/hci_conn.c
diff options
context:
space:
mode:
authorSathish Narsimman <nsathish41@gmail.com>2020-02-17 14:37:44 +0530
committerMarcel Holtmann <marcel@holtmann.org>2020-02-18 09:25:19 +0100
commit05bd80a10411c70b5cc5cf31e0a6d2fc054a7ff0 (patch)
treecd8e2bcbc680c6f1b6e0419a88264b8a44067304 /net/bluetooth/hci_conn.c
parentBluetooth: hci_h5: btrtl: Add support for RTL8822C (diff)
downloadwireguard-linux-05bd80a10411c70b5cc5cf31e0a6d2fc054a7ff0.tar.xz
wireguard-linux-05bd80a10411c70b5cc5cf31e0a6d2fc054a7ff0.zip
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: Sathish Narsimman <sathish.narasimman@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r--net/bluetooth/hci_conn.c7
1 files 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) {