Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1037052ybb; Wed, 25 Mar 2020 14:27:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuV0ogkny/rbpWD7gJfS385Ir3CIti08ylxDyG47WXWpBAdYrFnIdmxYfRupBetQGtD/fVo X-Received: by 2002:aca:891:: with SMTP id 139mr3993793oii.137.1585171673402; Wed, 25 Mar 2020 14:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585171673; cv=none; d=google.com; s=arc-20160816; b=f9omYx0FNhnHM3FOmbE1pETQ6LVZvm5sZmTGgoYIzdawurwUha9jeuRTv/BsqbGn4x 95jzqiIQyjMKmI1RBI6sQU4U8HGwtgww5ogynZhYiVPkg13YsMoZJ3+g2GnroDhMXNZ/ XVTk6kkC35P84Zq074J6SLVmMH7iC5pGuVPIVFq6sAhBDTl+6zSXDkns8wb+Im6bcTLC EXmYdhY2rcS8ZfbeVpYupgKJzVOsZ9i9u4YXHhmIzGoGSwEaTiF8R1qCbUrtF/0zD2az O9IYCau0igA5L9NO7jwPL5pEHwR/J98bxkVXgSC9z/6uRD465tJ3sZZ/tNZsIHjk+YOC JelQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=2X32bgvElx77RhPNYrDqtCCpdh1zsvZPoNBAPk/q7KY=; b=ddrUR4OuIcWpElx1EUc970rI4rDSO0oV5j7vSy38sfdhO5NxqiLMAXmbBlxkyRrzeT b5RLFBe3eEaMH9P09p7yx0aTVyF+3ZDN4cmnImMoJ9E8vsoRcmJEY42qHO5QCYlyH0SJ q8FfR0uCOisfRVl3EA5iWTWlEHITL7RvD4AX0mEt88juwbWTn4ZWyB3bLQn1czUz4kVF XYi+ZZp6HeQVH/pgnkyOgD1e8tNRSt/R4rbzepugpqshAxOnxFhuTMyuHOps6NZ7Qxbe WSYEbq5DTSLB/f4iT7JNdEvr/TENfwgN6OGciouIqswYb+jclY930h7QQ+umnvIuEqAp Hlpw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si160524ote.164.2020.03.25.14.27.40; Wed, 25 Mar 2020 14:27:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727556AbgCYV1T (ORCPT + 99 others); Wed, 25 Mar 2020 17:27:19 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:54800 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727358AbgCYV1S (ORCPT ); Wed, 25 Mar 2020 17:27:18 -0400 Received: from marcel-macbook.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 45775CECD7; Wed, 25 Mar 2020 22:36:48 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [RFC PATCH 1/1] Bluetooth: Update add_device to accept flags From: Marcel Holtmann In-Reply-To: <20200319184913.RFC.1.I4657d5566e8562d9813915e16a1a38a27195671d@changeid> Date: Wed, 25 Mar 2020 22:27:15 +0100 Cc: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, chromeos-bluetooth-upstreaming@chromium.org, "David S. Miller" , Johan Hedberg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jakub Kicinski Content-Transfer-Encoding: 7bit Message-Id: <75E407EB-397F-459C-A346-255307D92AC1@holtmann.org> References: <20200320014950.85018-1-abhishekpandit@chromium.org> <20200319184913.RFC.1.I4657d5566e8562d9813915e16a1a38a27195671d@changeid> To: Abhishek Pandit-Subedi X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Abhishek, > Add the capability to set flags on devices being added via add_device. > The first flag being used is the wakeable flag which allows the device > to wake the system from suspend. > > Signed-off-by: Abhishek Pandit-Subedi > --- > > include/net/bluetooth/mgmt.h | 5 ++++- > net/bluetooth/mgmt.c | 42 +++++++++++++++++++++++++++++++++++- > 2 files changed, 45 insertions(+), 2 deletions(-) > > diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h > index f41cd87550dc..e9db9b1a4436 100644 > --- a/include/net/bluetooth/mgmt.h > +++ b/include/net/bluetooth/mgmt.h > @@ -445,8 +445,11 @@ struct mgmt_rp_get_clock_info { > struct mgmt_cp_add_device { > struct mgmt_addr_info addr; > __u8 action; > + __u8 flags_mask; > + __u8 flags_value; > } __packed; > -#define MGMT_ADD_DEVICE_SIZE (MGMT_ADDR_INFO_SIZE + 1) > +#define MGMT_ADD_DEVICE_SIZE (MGMT_ADDR_INFO_SIZE + 3) as I mentioned in the other review. This is not backwards compatible. Regards Marcel