Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp510236imn; Wed, 3 Aug 2022 13:28:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1syAnHF4kpyYI6A4z/Yi2aKCz6wvDKY63SdVU6qxJD1A4EIL1hAwKNFC9o1wnpjp6owQW73 X-Received: by 2002:a17:906:5d08:b0:6ff:8ed:db63 with SMTP id g8-20020a1709065d0800b006ff08eddb63mr21966086ejt.408.1659558484539; Wed, 03 Aug 2022 13:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659558484; cv=none; d=google.com; s=arc-20160816; b=YYv2Svt78G2EPG2hY6wS/vUVTG+UV6VO6SoXDPOU2HZTOhOQ1Cy6ce5Rb8hn5vZ7gm Up0EP086ypUL8qF8wWvZl6+HTskH5x5Vj1tK7+6rizD58MiWUhZnoEEvPCTjPuIaQbYo 9wDkiRiObg4fmzP9dUVrPCWNc5TQE7uhtBKVji2NYTq8vbUu1CqDpVl48t8Q2Co8nEzG jgkDb9YoGB3mE6gYm1899kJmPRrYCun7oPgaU48R92SxsWI+vB8s86LITLKGp9PoHYvu Hb5vGHRpR7JuT8obfhz3kr+2lFYonsisHgOkuB8AX++E5IejyhNMoNtuu+JEH3/D1FfE Kuqg== 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:dkim-signature; bh=e8+BGqQecoK41rQp8eMnlTuoC90aodRWA08z3InPywM=; b=ClPFoAMnHcw9SeAJqQi5bMg2giu0UVb97F4wLX4tX8TTtZOTQ/QTKxHCs5u50K43MC 1ztypYWSPuIcBhKaEUV/DaaoLWV9iCFhc7BdHoGDAzqJl4e+EtdtXnVOL6N52edoWGJZ RAFzkDY8tez1XB5tABTMgxHtYPnyeLXPluCUrwsaJlHdin0+fe5wyKoHbZl2UyPF8ewU 0OeMVGLEYw7kLGgRCE4ZHs7Ixg9ohs15KkVoefALPx76vqNhd9AyDJ6CxXqaHr1IOTyR 8p3hyg/9GiwACclEijy8wFskj3B29GVD3yxnEcBJ61Ssc/EJ/bl5GSvtPysob/g04Gk8 Zkew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=NS2BEQEs; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a170906560100b0072a89b3acd3si14436515ejq.497.2022.08.03.13.27.09; Wed, 03 Aug 2022 13:28:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=NS2BEQEs; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S238578AbiHCUZA (ORCPT + 99 others); Wed, 3 Aug 2022 16:25:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236138AbiHCUZA (ORCPT ); Wed, 3 Aug 2022 16:25:00 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D968A4F65E for ; Wed, 3 Aug 2022 13:24:58 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id n184-20020a2540c1000000b0067691de454cso13343121yba.11 for ; Wed, 03 Aug 2022 13:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc; bh=e8+BGqQecoK41rQp8eMnlTuoC90aodRWA08z3InPywM=; b=NS2BEQEsOTnQcMqoV3YcJcS+hpOyHmOhc2HjEH1OQIR9pxGiv4vE3GLUv9zdTi6FRH ePHs3re4GUcTVR9Nk2Xj2/7M+7LDFgeIk8X2E3g0PG+3XrWmZwNuURapOKOivwB+Rj2F Uvp6FL9159m0qjmZg54yfShVwoARnBNYh8rWkltzB86bs29UVbCkhn1SnFDgTFfl4R6Z Qo5jbMluBrAA8zoFBbrf/bmNXTxdt5/unLqNbYl/G9UxvrPte548Glb0CuPgEvNM5TjQ 8cVciqHa+aDxIea/kkXAm3Z/oDHdSkEycsfP/XCrYSddU4Vi0VAPPLTy0Nq0RDAShDEb jZWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc; bh=e8+BGqQecoK41rQp8eMnlTuoC90aodRWA08z3InPywM=; b=DCJt1xH6gRs5um76lVqfcsb37l+VoQUWTPFqUUH33tQYeKWybhe+HW2ZqZSu68dkHB pG4K7XAvIS91+gXxs9sm5QxZAoLGcTEQxQIE1qNCZiJrugT0m9pyyqCqlOG3l4LRa2D7 IXx3lByE+acrVKixZ6FSs58ZtwUtJZ0hvwU7AoV1iwmQQ07YimdNwqYIZB8JF+UNJlUp 7Dt9ryPJNChsgwCC3eiqGlfElm7csKUef4syXDYpcUx9pvKRKgN0EZFprFtsF0PNqIWT rTfTFYltQtmaD+RAj+WVTaj9ybPINtmFzjHTuM1LHhYkmT9uk8hKkV5KlS2BsOCR3WQ+ gNgw== X-Gm-Message-State: ACgBeo3FU0xPAGF8AawwNmWxcFGe/Uy3V/dFi/y3vLyzmH471oyL2I7y yexSxlzIPDYf12lv7TRfe88VEpVjPZVBog== X-Received: from mmandlik.mtv.corp.google.com ([2620:15c:202:201:6eae:dfce:5d69:e05f]) (user=mmandlik job=sendgmr) by 2002:a0d:d40d:0:b0:322:d4c0:c6f6 with SMTP id w13-20020a0dd40d000000b00322d4c0c6f6mr25825644ywd.428.1659558298100; Wed, 03 Aug 2022 13:24:58 -0700 (PDT) Date: Wed, 3 Aug 2022 13:24:51 -0700 In-Reply-To: <20220803132319.1.I5acde3b5af78dbd2ea078d5eb4158d23b496ac87@changeid> Message-Id: <20220803132319.2.I27d3502a0851c75c0c31fb7fea9b09644d54d81d@changeid> Mime-Version: 1.0 References: <20220803132319.1.I5acde3b5af78dbd2ea078d5eb4158d23b496ac87@changeid> X-Mailer: git-send-email 2.37.1.455.g008518b4e5-goog Subject: [PATCH 2/2] Bluetooth: hci_sync: Cancel AdvMonitor interleave scan when suspend From: Manish Mandlik To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: chromeos-bluetooth-upstreaming@chromium.org, linux-bluetooth@vger.kernel.org, Manish Mandlik , Miao-chen Chou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Johan Hedberg , Paolo Abeni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Cancel interleaved scanning for advertisement monitor when suspend. Fixes: 182ee45da083 ("Bluetooth: hci_sync: Rework hci_suspend_notifier") Signed-off-by: Manish Mandlik Reviewed-by: Miao-chen Chou --- net/bluetooth/hci_sync.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index cb0c219ebe1c..33d2221b2bc4 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -1721,6 +1721,9 @@ static bool is_interleave_scanning(struct hci_dev *hdev) static void cancel_interleave_scan(struct hci_dev *hdev) { + if (!is_interleave_scanning(hdev)) + return; + bt_dev_dbg(hdev, "cancelling interleave scan"); cancel_delayed_work_sync(&hdev->interleave_scan); @@ -5288,6 +5291,9 @@ int hci_suspend_sync(struct hci_dev *hdev) /* Pause other advertisements */ hci_pause_advertising_sync(hdev); + /* Cancel interleaved scan */ + cancel_interleave_scan(hdev); + /* Suspend monitor filters */ hci_suspend_monitor_sync(hdev); -- 2.37.1.455.g008518b4e5-goog