Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4546726ybv; Mon, 17 Feb 2020 01:07:21 -0800 (PST) X-Google-Smtp-Source: APXvYqyxu6ff/ShrG7/3iT0neq90+hoXmEMHM7jxo289mqF47LpVWHvEK9mOJtjP0JoH1bL39jN0 X-Received: by 2002:a9d:6f11:: with SMTP id n17mr11245462otq.126.1581930440928; Mon, 17 Feb 2020 01:07:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581930440; cv=none; d=google.com; s=arc-20160816; b=Hn8nUdea37tqUZ5qz440OkUti4B5uFy2LnN+/O/IEKKYTAm7z9HjpFIvg5YBqWUOIb btprodLte25l1c7rvZEQzgrBM9fW2iY/tqgCj1AFM0ZORvHUg6qq+YzIX+CHS1q26H0C uVh8kXFSVd5zYsAsH/0z1z0gn4mpQnU5zRHGiKTTuPuIqPb7ME3xg2d/f2AVbrJ4jGpU CVnxYJ9uk6eQg3j28Isa/HX9fXoMaG/PbC6qNG+UEMKvLfMOyE//n9iy8kWIqebPvg7V RKYPEL1YayWvqI/pyoe2H8dPJXmbQ7/KUaxlakT9Z5JyJsR89ozJrUt11F0+/IFVDGDj 3AbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=80rs4W6R0HIIbQ770wNeQg7LbJLKILfAsUBfyaO5AKc=; b=WwFcTmGu2Z9ySxenkstcaJVtveGDp7xJgcrbyfuUV40Oa+8W+W01ZYVYq8Wlgjf6ba 91Jqh2U6s+6BR7yOAMVZm1M9e2U9kf0ZZFhzQCGWLDVnm8VkU3IAzUJPSZkHalZKDIJe HGElcxOkiXeNENZ6HqoJT42J2r+9xKEbbZRSH7CEgmPh0Oaj+F1+GjhAuE/k/EPjoPsR CfSBnx7SezO8D7Xsa+1GZTkt1fRl6TQcLepQnlkdXCc8XdQmA1A2AHDxc3K3wSUaqqex ymdjBrWn/9P6x5jTF6ru6POaX3rnR/tmnmLiNsX6LpzY3MGeUsbsfitqVkKJhCcLec5x hSMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nDGNVQw4; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z73si6551929oia.40.2020.02.17.01.06.54; Mon, 17 Feb 2020 01:07:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nDGNVQw4; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728679AbgBQJGK (ORCPT + 99 others); Mon, 17 Feb 2020 04:06:10 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:37030 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728388AbgBQJGK (ORCPT ); Mon, 17 Feb 2020 04:06:10 -0500 Received: by mail-pg1-f193.google.com with SMTP id z12so8735293pgl.4 for ; Mon, 17 Feb 2020 01:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=80rs4W6R0HIIbQ770wNeQg7LbJLKILfAsUBfyaO5AKc=; b=nDGNVQw4/2gUArMIB+co59GbuvYlqkH9na/STD2Q7Jtw8Yld29CSPRMKpB8YRR8sFo 5306RmEkQT2yWCT1rTnlJYbcKj5jDQFOoEHrBBPSNKpYQSM0mGHUAHzADu4hwfIi9M2D e9HRCWitZ7jdzGlLqPUSYzVsu++O3wfTrmJF+qg/+pMPlLFgSp317y6zWJRPrnVlVyeD gw+OQ5e4los/kkVAGQkOxL9PhBQSIs91kCFR8z/9/Fxh4RugmAorM0lB1t218lSU4ov3 vXakH9TmhSSDpD75kGpAtqeK7awt9lp1iyYDjR1qNc7Db/7tJnD+XznNkbRcbU9gW5Wq 6Fbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=80rs4W6R0HIIbQ770wNeQg7LbJLKILfAsUBfyaO5AKc=; b=IzSkKc0yD2rqNzb+nY+07hj8wzf0MQcVIkxIGJlN8DkgMYsvJmlRjpeMRIGfpsrTEK OgjL5Y9AbNcnyY/v7LYlesEmCc/9PTiox/dR/VsdaDJ2DgFKo+hxYGZf9x3RHEUfC9P1 NfwOJrzXlBR4cX33Y8nm1/lvy05hnazZSPkJTi4bCbJpAv3NjYpWZiz11PTwSU6Zp8Jr RBJ84rI8oiPBuRpJ0aL19M+jhTz3lrs9N0oR81flfRU7Ql4A/YgxLpvem849RYpT9NJx fu7NbUVorqQSflPZE/R+Pkks6kPucwL55g0HlWeAosgIYwMRfj85eCxhF8/1A1SiVR4B ENvQ== X-Gm-Message-State: APjAAAVwQmRyE/L/7+U6W5b3PQxFgkSH0hXDwXIwSmj4ETimXe6aeLUY o3DlLDz3Jm3YMmnEFjvoOl3XooktkIOyow== X-Received: by 2002:a17:90a:e291:: with SMTP id d17mr19430352pjz.116.1581930369169; Mon, 17 Feb 2020 01:06:09 -0800 (PST) Received: from nsathish-Latitude-7480.iind.intel.com ([192.55.55.41]) by smtp.gmail.com with ESMTPSA id b42sm15900337pjc.27.2020.02.17.01.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 01:06:08 -0800 (PST) From: Sathish Narsimman X-Google-Original-From: Sathish Narsimman To: linux-bluetooth@vger.kernel.org, nsathish41@gmail.com Cc: Sathish Narsimman Subject: [PATCH] Bluetooth: FIX - Disable EXT Adv if enabled Date: Mon, 17 Feb 2020 14:37:44 +0530 Message-Id: <20200217090744.909-1-sathish.narasimman@intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Disabling LEGACY_ADV when EXT_ADV is enabled causes 'command disallowed' during DIRECTED_ADV. This Patch fixes this issue. Signed-off-by: Sathish Narsimman --- 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