Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp176419ybk; Tue, 12 May 2020 19:20:04 -0700 (PDT) X-Google-Smtp-Source: APiQypJS4N1KJxB8hZHDObQ8xsy57lVJ2l2sOpNwDjfIqJvrsJOLm4ZGD2WDqWnU6aQuau19iaE1 X-Received: by 2002:a05:6402:1d37:: with SMTP id dh23mr20065823edb.287.1589336404339; Tue, 12 May 2020 19:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589336404; cv=none; d=google.com; s=arc-20160816; b=NtIfPu4xOzstU7on5D+DWHluUex9obsxlhOcB9olw11/TKEY7nJ9TkxChJZdSQjwjQ R0BhNVRhvnW36+um0fv5pR5c1s/lylebRXTMzSBY18KZ+MjLM7d0f+pRCstEyfijIBOe WpBoqv0NTtBDXo7nG0HvIeYOxszm5K8TyaOkF9c2dEHhsG7GkzwHgmxs73E4QG8ep5vj T+I1zBQDexxF3VFYHJi8NFEOrQAWjsmQ+Scf0rbGDk1MXsMJ4LA8SiQbBg0d4EhQtuGv soWPaaiky6Hpcriy4MgEkZD9yD06c/iavqIYfjVu1AalczuosrWSSPy6JAf+PfmXO1yJ Y4wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lkqIDoib68FB2JDTnUdkS+sJ6c0KSJCfPM4XCGL9+wo=; b=pckqJxstewGDCDCNWoRVkEZlnDREyamztoSlHeB7QJkoVaPyeBac4QeH890ExwOHhC n9teGkWx35GpUPdhBDOgzbp54WvojO4RgvfWp7/lLvUZQnCgQr1ZjK49O48B7x+u7SMu lydH1dUsdV1QybzIyQuB9yldRnX1P9k/7ENRE7iLhAHMK9ZMKG8xVPjTVrTzV+5qjWB4 EKlWVpbA9mYHQKFpwcLzUjqc1pgtLf1sSqe6pL2503yMpdcVpKHjFJ0p1neQGPvjb47+ T5uNLYn96eXEe08XX5t/M/g73rA2ir+fV36fARL0ySJVQfk0yziox2jq+173plO3564s 0TeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=i4oyZDha; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si8833983edq.470.2020.05.12.19.19.38; Tue, 12 May 2020 19:20:04 -0700 (PDT) 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=@chromium.org header.s=google header.b=i4oyZDha; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728131AbgEMCTd (ORCPT + 99 others); Tue, 12 May 2020 22:19:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbgEMCTd (ORCPT ); Tue, 12 May 2020 22:19:33 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30411C061A0E for ; Tue, 12 May 2020 19:19:33 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id j13so294436pjm.2 for ; Tue, 12 May 2020 19:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lkqIDoib68FB2JDTnUdkS+sJ6c0KSJCfPM4XCGL9+wo=; b=i4oyZDhasB3BK4N58xBJKFV7wb9fn+1SGRZKwR34UdXB63m/A0ctudRtq27LnDuPzX TLoqbyusguNq5jwMxryJrk5tkyJWysGVxhcZ+27xGGZmOdC3T+RzhjNVrpG1o6ewhF9f MtCITc7U9pKFK3h0/jGDni3RSnjduO3gFObFI= 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:mime-version :content-transfer-encoding; bh=lkqIDoib68FB2JDTnUdkS+sJ6c0KSJCfPM4XCGL9+wo=; b=OVlJOb4J5CTYQ4UPmz2sM3U57ru6Kojpuz6XhKz5pKLrUBiGiL+bEcH/kkXZsQph1q u3DqkwFnzKlb34Q768T1DPYTRC8VaZ7fUgJK0BmI+ynd66HhNTE5xqH9Cdt1B/Hcv3+Q 68wJ6cVo5mNOYIroUVvXbCQZ1O7xYbZ4XtgQiXeh4TdP+BJD+lwrDdCOGhHLgREkPhO5 4Otr304jq0CzLkatA1VD34YrtuP4zjstfiFrTfAoalAS/xIUsYSwBJNiBNLe+w4CCMTf 6JMOBXOVYC/Y+fe2aa87Oz40VFRhjt2k5JF2MUO5wtBWkJInR4La0wq3V71dgEZ26Bet P0Ug== X-Gm-Message-State: AOAM533S9Ll+ywSQjdpMw0cMYGwVK3HyaNv2Grr5UhokIyUGTvsY2TRQ GrKqLf2wfQK9V2qet9I9wSoIlQ== X-Received: by 2002:a17:902:fe8d:: with SMTP id x13mr1122508plm.198.1589336372539; Tue, 12 May 2020 19:19:32 -0700 (PDT) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:e09a:8d06:a338:aafb]) by smtp.gmail.com with ESMTPSA id w2sm14170600pja.53.2020.05.12.19.19.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 19:19:32 -0700 (PDT) From: Abhishek Pandit-Subedi To: marcel@holtmann.org, linux-bluetooth@vger.kernel.org Cc: chromeos-bluetooth-upstreaming@chromium.org, Abhishek Pandit-Subedi , "David S. Miller" , Johan Hedberg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jakub Kicinski Subject: [PATCH 0/3] Bluetooth: Prevent scanning when device is not configured for wakeup Date: Tue, 12 May 2020 19:19:24 -0700 Message-Id: <20200513021927.115700-1-abhishekpandit@chromium.org> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi linux-bluetooth, This patch series adds a hook to prevent Bluetooth from scanning during suspend if it is not configured to wake up. It's not always clear who the wakeup owner is from looking at hdev->dev so we need the driver to inform us whether to set up scanning. By default, when no `prevent_wake` hook is implemented, we always configure scanning for wake-up. Thanks Abhishek Abhishek Pandit-Subedi (3): Bluetooth: Rename BT_SUSPEND_COMPLETE Bluetooth: Add hook for driver to prevent wake from suspend Bluetooth: btusb: Implement hdev->prevent_wake drivers/bluetooth/btusb.c | 8 ++++++++ include/net/bluetooth/hci_core.h | 3 ++- net/bluetooth/hci_core.c | 8 +++++--- net/bluetooth/hci_request.c | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) -- 2.26.2.645.ge9eca65c58-goog