Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5935981ybv; Tue, 18 Feb 2020 06:47:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwZsh+ihHGyTvWglWsal7m0m0bu7GXB6KtOveCrTU1t/kRrvIFQHaTpzH6cRFrolp7UOmoZ X-Received: by 2002:a9d:12af:: with SMTP id g44mr3724813otg.332.1582037257580; Tue, 18 Feb 2020 06:47:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582037257; cv=none; d=google.com; s=arc-20160816; b=aYwFZR69ho20ue3KtUBT4etcWWeoiMSKADIzmCMLPXdLHRQqOgC47Z5dZjp/X/J7ut 1TUDiXvIuudibZPD4va9EE1t91YFZ7IFSee57PrlIG43CssIlEAvdtx145ZCZ+Ky8XKt 24U6/0D3R7/iJHHk8AP6Vzk52Vvh9K7KparKnQ622dl0vkY5DS2CWSSwEcDD2NhvN2qe hFJtCc0594NLyV2S3505npopJKxdZ34kA0HVbf5EguU6Q9cRB7E8yie9MlHhMeFBdvWl e0j6WiVILC4f2I3El0U5Q5ek5YXUPhalzNsln2BH14k6D6qT61gON43/DNsOScLhjxtH s3LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ycdOljiUMLVr5RkIaK/aL83s9QdfM/BD9qm78d3uXZc=; b=ziwY1DsL8Inp4XnyGJNMpuLR7MP0mlaZtLK8Daf2UeGj/9jGxhCgOFfXbQtyYaGMHK 2Fv3691WfU/WbnRyiwZJVCtTeGrNPlc5ofDtxk4L6/7/OpFy54lyONp/iTYW+Biw29u8 OA/6AeKKWlH+Sqol/16bdGm6xg8DO4V+8WaNjnyJO9SbF4dFMOkzYgM2OkZippuIYymx 5ahWNrx/Fi8CG4BVDu7S+B/wqyKtw0sADuMD1/QHPSYrWh9Y30d71NGgWjtBLL78JOcX oeLS17wyffHJv5l95NhM4HwZA46pQEeq0luBJYmgq7V1D0jwTTcY3Ts48lwxcGTzYu8O tzIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="PGI0/GCU"; 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 g5si1879632otn.232.2020.02.18.06.47.13; Tue, 18 Feb 2020 06:47:37 -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="PGI0/GCU"; 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 S1726696AbgBROpx (ORCPT + 99 others); Tue, 18 Feb 2020 09:45:53 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:34843 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726605AbgBROpx (ORCPT ); Tue, 18 Feb 2020 09:45:53 -0500 Received: by mail-io1-f66.google.com with SMTP id h8so10118539iob.2 for ; Tue, 18 Feb 2020 06:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ycdOljiUMLVr5RkIaK/aL83s9QdfM/BD9qm78d3uXZc=; b=PGI0/GCUjHJLEwwotOsUjqXyeJ3YiSKagBXdlpXpf5psnCaLldqrOh5xdrkkzTiacE +8LtaCalBmBswRFMQVOV179iA816baPqbCeAhk+HDODomkW30/0w3suYEw02sXXxnj1A kTC9PrQ8Z3w5pJvgQpM9oFEBZTgJ+VdHmhoCsm3K4U+rieSj4s5AQMSDxJqEp8sLfgzF cRQGScuRT2fUxgaIhD1cMcbLdQ8nDXe2TCgVDi/Nchdchs9WiPEFYkp5yg/gdaWwShtd rC/hvOLIFzLIqoQXAD9EvzJEXLBgQG1CpPwW+ldZKtDa3rJdIVtt38QZfKkDvrXDRL+8 t2pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ycdOljiUMLVr5RkIaK/aL83s9QdfM/BD9qm78d3uXZc=; b=mqRYC1/cKapOziE2/Mjhf3Q/i6xXqECMYMNUqFEVefhp5pXIGIQYBB+zYTSRbR7Uyx eoSg8n2hI1N40r7J8cEHEajdlJYuNXveSCxMjz7Y3ospfI2pNPUJY8xvIr9gPOvmwbxE UQzgcGgkE7mM8fYZL+4lMFfB+eHgsQa5/d8emG25HMcxpck5Jo5XliKr4ONmuk12Q+n6 9q5Dbp9LMHaixWQdyvyHbTJjFHE0OAWhO5ddm6/sXW3Ni8xlDiQ7ugnrvz3Pw5akwARv 00/oh4Fnorl62ZLUIWEBnk8QozTzcFJpYbAmgrzwf2dqVqaEz5w8kfZxBbLw+68SbhDN 5O0A== X-Gm-Message-State: APjAAAWvObiEohuv76jXUwfRjlpJt6HZuI755XjVWDIxJmLP+JDw5Olq XZ93gbakNFXeKW2P/QgBWtblLqgM3a5ZmLvPhJmbi1mGdz2LJg== X-Received: by 2002:a5e:aa18:: with SMTP id s24mr15348811ioe.221.1582037152365; Tue, 18 Feb 2020 06:45:52 -0800 (PST) MIME-Version: 1.0 References: <20200218123747.3006-1-sathish.narasimman@intel.com> <072E9094-BA5F-47CB-9740-B04A6DC5384D@holtmann.org> In-Reply-To: <072E9094-BA5F-47CB-9740-B04A6DC5384D@holtmann.org> From: Sathish Narasimman Date: Tue, 18 Feb 2020 20:17:29 +0530 Message-ID: Subject: Re: [PATCH] Bluetooth: Fix - During le_conn_timeout disable EXT_ADV To: Marcel Holtmann Cc: Bluez mailing list , Sathish Narsimman Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel On Tue, Feb 18, 2020 at 7:40 PM Marcel Holtmann wrote: > > Hi Sathish, > > > Disabling LE_LEGACY_ADV when LE_EXT_ADV is enabled causes 'command > > disallowed . This patch fixes that issue and disables EXT_ADV if > > enabled. > > > > Signed-off-by: Sathish Narsimman > > --- > > net/bluetooth/hci_conn.c | 16 +++++++++++++--- > > 1 file changed, 13 insertions(+), 3 deletions(-) > > > > diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c > > index a582c676e584..a8d8a876363c 100644 > > --- a/net/bluetooth/hci_conn.c > > +++ b/net/bluetooth/hci_conn.c > > @@ -481,9 +481,19 @@ static void le_conn_timeout(struct work_struct *work) > > * (which doesn't have a timeout of its own). > > */ > > if (conn->role == HCI_ROLE_SLAVE) { > > - u8 enable = 0x00; > > - hci_send_cmd(hdev, HCI_OP_LE_SET_ADV_ENABLE, sizeof(enable), > > - &enable); > > + if (ext_adv_capable(hdev)) { > > + struct hci_cp_le_set_ext_adv_enable cp; > > + > > + cp.enable = 0x00; > > + cp.num_of_sets = 0x00; > > + > > + hci_send_cmd(hdev, HCI_OP_LE_SET_EXT_ADV_ENABLE, > > + sizeof(cp), &cp); > > + } else { > > + u8 enable = 0x00; > > + hci_send_cmd(hdev, HCI_OP_LE_SET_ADV_ENABLE, > > + sizeof(enable), &enable); > > + } > > hmmm, I wonder if it is better to create a helper function for this. > > Regards > > Marcel > let me verify and submit patch with __hci_req_disable_advertising Regards Sathish N