Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp160598ybb; Thu, 19 Mar 2020 18:50:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt/GQBMB01RBZ7q2c9z8JBGsHp6/jaHu9tWOQPf4hxU+TRIFaiYyMwgu/UnFnQC5e7ODzjd X-Received: by 2002:aca:d44d:: with SMTP id l74mr4768503oig.83.1584669039586; Thu, 19 Mar 2020 18:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584669039; cv=none; d=google.com; s=arc-20160816; b=pisaP5hUnaLB45JcEQp21IX1/jsHnglTHGC5jStjr/dA1Jrmg7FinnNW4zKeREjUQ3 JOXMupwqruGFO+R6qyk3l4evGwuSBqNvJv+rAMfwuo6qTI+lZpNuDNiMaTt0RW6q8ikR +2syGzBmFk0BnQK4/FZDa45Tk79v5Nbg8Sn8QWjVutN9P+TvJ2C6doXk5P7p1DnauHsO t+pkopsMSSjCn83bsAa2yybr8xMZLkp7MF5ZnyMchpDf2TKq8no0J3FgpvwWwhfvf8Tq y0om2vjuTa/76+ikNL9+UlUTHWW/UxUIp/SxroCttVjNQpQ7dlNB3IkBjWmZgE9HF0eN mjpw== 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=ETiO7XhZXke6GDuUI6KgWzLWxeC6pDtcPaOKYiXplXI=; b=upMiv/6re1c95HkN+1d7IaPjal0iFVA7+qUw58F+EqUqGSDliLivmk8uX71kvJeXcd 2xuZNIqy8EtrmSrXM3jbWu7VRZQi5UuH70oWTP2HGFvqvgSEJ4rVKkwDJOoj6j6EM6I4 DgYw3fBBnX+/FcmFXjJ87Eevy/6YKQJ405wai9SrP3DS1VBzXnwpaptRJha01ez7OGFy FEycG2B6o2yxq9iKkvOPUC0pqjONBl0+Q1G91ksu+RL0zDaMDbIxuWIz3i/yBVnUgqE7 GZVsPyGjwxcE36VS+KRw/fhU+Jz+q2wuNeQY+6br/18t5mFNYQfRxAJGi8Tvh7lXVHrw Mkmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="m4sQ4Ar/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id f3si1841041oia.264.2020.03.19.18.50.27; Thu, 19 Mar 2020 18:50:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@chromium.org header.s=google header.b="m4sQ4Ar/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727302AbgCTBt7 (ORCPT + 99 others); Thu, 19 Mar 2020 21:49:59 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38370 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726726AbgCTBt6 (ORCPT ); Thu, 19 Mar 2020 21:49:58 -0400 Received: by mail-pf1-f194.google.com with SMTP id z5so2424387pfn.5 for ; Thu, 19 Mar 2020 18:49:58 -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=ETiO7XhZXke6GDuUI6KgWzLWxeC6pDtcPaOKYiXplXI=; b=m4sQ4Ar/8AeFnghpsJxl9gzWUZo4dkOoUwggHTi6im5WlyMNlukpG8VR0Q2/aUzlme 02l5QGH1Xrq+7tg/kjZPFQHGm7wKWT3JWEVQlGcCjcWqtMDhhJahpUJPnJ5E0aDmdeuK swdqraUeWGR9It54oI3HvYrX+c4TDyHbXzs9Q= 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=ETiO7XhZXke6GDuUI6KgWzLWxeC6pDtcPaOKYiXplXI=; b=DR2oBIQyXP1g7f3kwy0dVGldm5b3aEty4QbIZyp0rlIRmOlX+svt+pYVYJ323NwpMd Jz39rqJ42radzT+UJR2o1QAHdXlXT1sESr6TOaGirZuLQnCXk4lOg/pSpE4CTQSIkS5A Nr0jwAJTXc0Cdvbcxn02u2/Y1mj7ThQFFfrdbG80EqKyFA0HUGZ9xZ1qL9pTKDRsHN1v zN5jju02mHBG8qUx6q1RjmlIgF7xXPVUve09QW7MylQBooKSXPl2cVeVAaP7USCEIZjL TRCQ3PjP5UyN/srMOLuywSeDW1l6z6i+KjLNcNwB3A8YDSdqxR9Dhlx0QGjfmSK13fye kBUw== X-Gm-Message-State: ANhLgQ0zEQlRTi4Iokc2HGrk6jQHiajHyFfo+Jko5aWastB3kUMHEWH+ FXj+pa9qZKiOluMHdS/khJ7u4cfpGBY= X-Received: by 2002:a62:1946:: with SMTP id 67mr7337219pfz.0.1584668997488; Thu, 19 Mar 2020 18:49:57 -0700 (PDT) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:e09a:8d06:a338:aafb]) by smtp.gmail.com with ESMTPSA id y9sm3450235pgo.80.2020.03.19.18.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 18:49:57 -0700 (PDT) From: Abhishek Pandit-Subedi To: marcel@holtmann.org, luiz.dentz@gmail.com Cc: linux-bluetooth@vger.kernel.org, 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: [RFC PATCH 0/1] Bluetooth: Set wakeable flag via add_device Date: Thu, 19 Mar 2020 18:49:48 -0700 Message-Id: <20200320014950.85018-1-abhishekpandit@chromium.org> X-Mailer: git-send-email 2.25.1.696.g5e7596f4ac-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marcel and Luiz, As suggested, I've updated the add_device mgmt op to accept flags on the device and added support for the wakeable flag. I've prototyped an implementation in Bluez as well that will send the mask + value on any add_device and then clear it on the add_device completion. This seems to work fairly well and allows updating flags during runtime as well (for example, via dbus property setting). Please take a look. I will also send up the Bluez changes so you can look at how userspace would use this. Thanks Abhishek Abhishek Pandit-Subedi (1): Bluetooth: Update add_device to accept flags include/net/bluetooth/mgmt.h | 5 ++++- net/bluetooth/mgmt.c | 42 +++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 2 deletions(-) -- 2.25.1.696.g5e7596f4ac-goog