Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp140339pxb; Tue, 10 Nov 2020 23:03:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyARiE6F857bRnk3Lx3/eEPGGUk7lb3SpgS+vw4Jv2kwDrV5VUyMqS8Qo0Y/BsKiFkPAPZi X-Received: by 2002:a50:eb0a:: with SMTP id y10mr26207903edp.342.1605078213589; Tue, 10 Nov 2020 23:03:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605078213; cv=none; d=google.com; s=arc-20160816; b=P4uo6DcAo0h/dxyb9aYeg5gXv8XGlkmp+ROBd1mPd5mPLxK/xHiyhVm4M9HS3qPW8Z gKdJnb8OLDU9C5GfIHaEME4YjoWVyc35NS5lb6NQJ/35bSGiXo1Wwiz4YdBXZ4z0Gp8l IIV4HZw7LwNPEojQp8theyoextAPLqeO36ai/4+pldmowyPd4b7n46WF/kUv2chxtn8L uj+lxVgXTLnJ4ary3CSxw2kHXuAWe17928uCt/ph7r+TylpOVT7kvLvP5BJ4dp0gi+EK KsORhBNKvDYA/gJGkXCzvh8RmfluvGtA/bPiIE0G6yPb53/Pr5euP1s0a1ONItAphjiK Fgog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=C95huzuAXxK/Q/ur78yeB7NRb6+ErTiDkKW1OinYBEM=; b=MZmmNakKUjssrdA0OHwVjqNvRvcKwNNKMNNdnoV+p+I03CgDK48P/QjGGr58evnzyy mivz023c477sK8OPsIi38n1dmiZzzL3Yo4X76g34yS6V/DHutL1jZPONmx2wirUBoR1f 9puyuZuPz2GLtksaRI4T+HTkc7Z0F8VXNOfyWNDaUH8DiZlZTR618adAfl8rw/biuMem 4fiz7cp0RXZ8RtzWGyFObopZkMc0gKK76QMmietVZZ0GX/Izgzih2oRYJAQB9ED8eql/ 2eSzbxVVD4XTuMgYZ7z6pUOHkTBNTpz5NWZXweLBUp2Kf/VSsJXn+eD1PMfI2Wfb8KKZ ZTFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YgqMMzV7; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p3si699234ejf.587.2020.11.10.23.03.09; Tue, 10 Nov 2020 23:03:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YgqMMzV7; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726136AbgKKHCy (ORCPT + 99 others); Wed, 11 Nov 2020 02:02:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726107AbgKKHCu (ORCPT ); Wed, 11 Nov 2020 02:02:50 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC3BEC0613D6 for ; Tue, 10 Nov 2020 23:02:49 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id u37so1433829ybi.15 for ; Tue, 10 Nov 2020 23:02:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=C95huzuAXxK/Q/ur78yeB7NRb6+ErTiDkKW1OinYBEM=; b=YgqMMzV72cotIeIOR4rQM3a+Hm8zGJWbl4+4bPGgH87ABhfuYrLJ3ZPmKeUx6+o+jV VGrXiP7WDqOqrCQbFayHT9i89gXNvsoxhTn+6gQG8BiQrZTBiwgD4rEP8+JGUvIpwgCI SpQNnic1DuDL1Er/u+KIMZaNtF7j8GSx+Bt4A8CWLwtnHtuoD3vNbqwyc7OCw147YRmG 8rLlMgthgFSKaJ+bYtdfqFJcjIS1N2YB+uTGj/tGgTYHZB65geRiGrPtMqS4phI/xSN3 P4fhRI89t0CHPkwJXjrk/NUPX83oPVhK3R+QWf4sWKEs+LOkj8vFQDBcJQeYHw+x4blG k1+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=C95huzuAXxK/Q/ur78yeB7NRb6+ErTiDkKW1OinYBEM=; b=bRlI/3pkaADCcn4nbSgwSDVZEQTVw0jYSGhP6JHRhMg14/uxYmV2spDjGDoGKlHWXj R120PEQIHCITWv4MMiaoQmegWJztZts4yL9ai51v8M0cBbUeEN2hVYbXD54ORuI6FL7p GC6T6DgujsKmGiUsDum3SwVEoBAgXkmRkvWddEtGbObCrE7oIPt2DnFy5IRe66PIQq/T IeNIsNpWx6uMWv/llal/RyglT9lNYUmw81eE/MGs1/ABb+z1SNLEh8gZ1Q2IH6K1KCif vxWaH2fbkhLcTUjQX8nOOA+ynUB7oM1m/fX+sUcAGaRq1odbR0dvL+jmTa0RozmvLT5b eOlQ== X-Gm-Message-State: AOAM533nH0+UrmyHB9x32H6bZxbksGFufIEBR8cc6f1lEDfi3hl9lnPY Aqg8NIKEKa0DqF/aDz8un9Xeox4lFRUksRbFNt47gUrMPnQRJ/GTHYtt30AELFVal1VTH4WWRs/ tKxP9nl/iv5oOAhSCH40Fw7G4ID23Ff849mpBdKou3wYvdZPLVwawh+12Om2aQ8shI8526DDvEL zzPrSBj5fJNU8= Sender: "howardchung via sendgmr" X-Received: from howardchung-p920.tpe.corp.google.com ([2401:fa00:1:10:f693:9fff:fef4:4e45]) (user=howardchung job=sendgmr) by 2002:a25:d30a:: with SMTP id e10mr74900ybf.196.1605078169043; Tue, 10 Nov 2020 23:02:49 -0800 (PST) Date: Wed, 11 Nov 2020 15:02:22 +0800 In-Reply-To: <20201111150115.v9.1.I55fa38874edc240d726c1de6e82b2ce57b64f5eb@changeid> Message-Id: <20201111150115.v9.4.I21e5741249e78c560ca377499ba06b56c7214985@changeid> Mime-Version: 1.0 References: <20201111150115.v9.1.I55fa38874edc240d726c1de6e82b2ce57b64f5eb@changeid> X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8-goog Subject: [PATCH v9 4/6] Bluetooth: Handle active scan case From: Howard Chung To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com Cc: alainm@chromium.org, mmandlik@chromium.org, mcchou@chromium.org, Howard Chung , "David S. Miller" , Jakub Kicinski , Johan Hedberg , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This patch adds code to handle the active scan during interleave scan. The interleave scan will be canceled when users start active scan, and it will be restarted after active scan stopped. Signed-off-by: Howard Chung Reviewed-by: Alain Michaud Reviewed-by: Manish Mandlik --- (no changes since v1) net/bluetooth/hci_request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index d943ad2885aa0..172ccbf4f0cd2 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -3099,8 +3099,10 @@ static int active_scan(struct hci_request *req, unsigned long opt) * running. Thus, we should temporarily stop it in order to set the * discovery scanning parameters. */ - if (hci_dev_test_flag(hdev, HCI_LE_SCAN)) + if (hci_dev_test_flag(hdev, HCI_LE_SCAN)) { hci_req_add_le_scan_disable(req, false); + cancel_interleave_scan(hdev); + } /* All active scans will be done with either a resolvable private * address (when privacy feature has been enabled) or non-resolvable -- 2.29.2.222.g5d2a92d10f8-goog