Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp103732pxb; Wed, 11 Nov 2020 21:41:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOooZvkWJcSptnH8oAVOJZ8mZF+cc8rMvfcZPRKPfY6J05t3Av7mNpc1Sv0kG9TkCmtjp4 X-Received: by 2002:a17:906:35da:: with SMTP id p26mr28498703ejb.256.1605159706955; Wed, 11 Nov 2020 21:41:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605159706; cv=none; d=google.com; s=arc-20160816; b=L9rGSJiF/HlHhQIlfuLkbbg44cPzyvaZHTzRMm/rM3z+TP5mfxTxmnrL7X9z1sFRFI yPgsYI32sO1zU3EH1E01pxEJPa9G/q97RINPfG6FWuxd28QI5ZUj6LXvIrrR8408mQ03 sF8a/iMev4rtrY6GZ6CU22MIABNA17qTeSsOkwUKz2R1QKNdo4X9/H5GDRAihUI6X3jR 06YP9dQvZonAkfKpIk+PjpmuFFRNJo+AxNGPvYrZjkF5JkwtT2cMMkxyNIRns2r2GOgX wo7oR+B3Vp392rrCsvXVe6446r4HAC0vr5khdJlfHwURTdQ6ehf3B9Rh0v+Y+jzU6jLm NKWg== 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=T6CplrPxy27A6yiutX6XDympOldMSJN7QDPt35avta4=; b=efHf3hYG2Q4dWLFyo7A/+u82hJxhSgpXfd+jt5QTLzZvaYydSHoYmuIjIxk0cd58F9 wnKeZwahrZfJpCVXAPYl8FGn58V5zJ593fvKM18Sa9ze0m6PQ/d1/s51pqK9Jfq4ozZA uPVZYjq+B6T+qfJfofCO9SUBxtsx7P0ynPO+U/+EWfGsKOdJnQP09qHhe6G37wL0QIea UVbsYjNFtFyTqIovNFR+NSjiupYJUGCh7A44k/XiA1o+lLvC/m/9d52TvwQ6eL0K0+cX CpGbqk2hF36xrPwRlbpW20vhdFOJZteGiZhonJmei2KM0Mbco614hzcSuAn/5M0MhbRl w6hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ELCFvjXL; 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 ho9si3056226ejc.275.2020.11.11.21.41.23; Wed, 11 Nov 2020 21:41:46 -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=ELCFvjXL; 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 S1728965AbgKLFj1 (ORCPT + 99 others); Thu, 12 Nov 2020 00:39:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728563AbgKLEIw (ORCPT ); Wed, 11 Nov 2020 23:08:52 -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 99D94C061A49 for ; Wed, 11 Nov 2020 20:06:56 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id h6so4607485ybk.4 for ; Wed, 11 Nov 2020 20:06:56 -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=T6CplrPxy27A6yiutX6XDympOldMSJN7QDPt35avta4=; b=ELCFvjXL6ZEvxXAt7MuiY8qSckQNyrSWVYRUOWscjvr1LpO5rTXC2Ou2LYrySaI7tn Xk+MzbSByOEz4egWSxEO1I1BXs3nVgINfCXXM5UepiekzGhSUFydk5bUdFmcc3tMmsuT FgNABFsa1hOuHaJPoxGLdGofjQY/pQK1yplGL9rLeYieGVftYPPV0fi4ejOv0La7qQ7h KO7p/5pXLycOu4K9wAealuvgYsNnZOJTO6IUmeotFftH+YhRRqUe1YQrL8uWBqP8T8/q TwUcgv+tggp6Nw9oJ7QU9osxW4i1q9gSn30FEvwlR2jWqE4rLNMKAEPmCHsKSpJmTRJN LS8w== 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=T6CplrPxy27A6yiutX6XDympOldMSJN7QDPt35avta4=; b=lEiwHLUIwiT/7QArAvgEl3fNRWbW/14PFNsIlF8APfKWIJuEA7cRC80Jq5UU+dmMAd ZDKH/lxkhk84HK2VnFd4mG+cm2WoZA3ytkIkygMfOqVb5STBh0wkJGUPJiiOO6HRe31q EMrgIdGTJPddkSlyLnzY6muvsshTle5eR5YTljQONMJ9s4jNyhQZoSrNLI0gdahUk0Xn Rp2Pkhv/gLlBNsGk7zaeUD2EbhmZnwqNuHpftu4DeiGApdvRUtEBwrYM1arUl2hShJ3K u7+MweuhF9wDZa38KMg7I54pm79xuKJkzAIRY8/NNq0F3DLK54qJo/sjqvCQN3GanP1W jALw== X-Gm-Message-State: AOAM530uuwy22Gm9OOjiaEEekZUM/CKJFUiKVmaImUGnq/Nm3f6G7t94 K1bSH4NzloL99v7cilNGssLnubF93hDZCwtiC9oP/OG/Z0NzUcX2HPCo3xlusPAgKTQNmUa8x90 a3lAzIoXREwzeDc4rjJZFU3zbKYYZswKR49YhXwp26ghPt7JHudKzWxjA0psRD1NF9SzRnE+Rg6 ++Il8r1IdW8+E= 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:b68a:: with SMTP id s10mr36237332ybj.311.1605154015834; Wed, 11 Nov 2020 20:06:55 -0800 (PST) Date: Thu, 12 Nov 2020 12:06:38 +0800 In-Reply-To: <20201112120532.v10.1.Ib75f58e90c477f9b82c5598f00c59f0e95a1a352@changeid> Message-Id: <20201112120532.v10.3.I21e5741249e78c560ca377499ba06b56c7214985@changeid> Mime-Version: 1.0 References: <20201112120532.v10.1.Ib75f58e90c477f9b82c5598f00c59f0e95a1a352@changeid> X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8-goog Subject: [PATCH v10 3/5] Bluetooth: Handle active scan case From: Howard Chung To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, luiz.dentz@gmail.com Cc: mmandlik@chromium.org, mcchou@chromium.org, alainm@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 3bb0d2a98e82c..2368b050c17f1 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