Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp483163ybg; Fri, 12 Jun 2020 06:47:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4yYK9dt1/F3yT4gr4kZFvcp3dD7TiabnaPFiu4Vk+xXmMuujxuNRkg6uaJQ5IH4LHCzcS X-Received: by 2002:a17:906:68c5:: with SMTP id y5mr13164661ejr.436.1591969643673; Fri, 12 Jun 2020 06:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591969643; cv=none; d=google.com; s=arc-20160816; b=ekDSFcOF5+QcJ5cTIlTF5chaGhxqfHtZ0GDCdI4UQWzcyWB2PRgWLVvAv+Du5CAsJ6 GmX7Eo/4Qcm37g6g2qYpZ+tyluZEx7Z9niCAGGVkmnjy4WcX4T1LOvjE0KKLsqqxTHMW uccaZkGEJw7bO0qxqZXQ9LidUAfooW8opERE80Q+VCNtIi3EN0x3o3hYvBwF3J0JfWUf OteiTunhb5yryWywrAaFxH04zM8WCG63cmg0Zx/WjS/76Dr9bNsseSuNEcJWfiwEeTzg hic6irGBEaxiuJ20icG3I/YW15xQ2SrxF5SNLSM6/PMkiu8MBaIVupeYCUy1sjtIStT8 piXA== 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=zMLFiJOPVB0kcmC8dbvNO+B/apVXsq6wGl4vzhkt61Y=; b=FkzUAbKegUoPjSmYancbJmMtu/5xwMi1qJqyftm45Y/mJ5RWldRhKJZCppZqk9YTjl kroLgdZpCYHpxYKdk9OXjlR2wRasrMaqg0qTfAtr1G9C5ikq7D1gGAriLq/SkGfoL8ov pcYMGa55YRlO3jq2R0tk11MvAD6fnrypyuyacwNkBhh02Nlq4pn2tl1GMfq92CQJKkyJ QyclJ95o2/rX84S+l1HVOXwUCyRYjkN21zaXGUk4ty2gfT2K9mBEyJzX4mDp5YTRA4bV qCxA/Y3j3q1DwFJ9Oep5vGQ4kUfb4bt7xMMT4btzdGz2wU0MNAohRuW1lvoK9OHaXjOm sfWw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si3776812ejb.629.2020.06.12.06.46.58; Fri, 12 Jun 2020 06:47:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726335AbgFLNqi convert rfc822-to-8bit (ORCPT + 99 others); Fri, 12 Jun 2020 09:46:38 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:38352 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbgFLNqi (ORCPT ); Fri, 12 Jun 2020 09:46:38 -0400 Received: from marcel-macbook.fritz.box (ip-109-41-64-170.web.vodafone.de [109.41.64.170]) by mail.holtmann.org (Postfix) with ESMTPSA id EC2C1CED04; Fri, 12 Jun 2020 15:56:26 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v3 1/3] mgmt: read/set system parameter definitions From: Marcel Holtmann In-Reply-To: <20200611020157.70230-2-alainm@chromium.org> Date: Fri, 12 Jun 2020 15:46:36 +0200 Cc: Bluez mailing list , Abhishek Pandit-Subedi , Yu Liu Content-Transfer-Encoding: 8BIT Message-Id: <738ADF85-6602-4CFF-AB50-E17829624246@holtmann.org> References: <20200611020157.70230-1-alainm@chromium.org> <20200611020157.70230-2-alainm@chromium.org> To: Alain Michaud X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Alain, please remember to put Bluetooth: as prefix in the subject. I fixed this up for you. > This patch submits the corresponding kernel definitions to mgmt.h. > This is submitted before the implementation to avoid any conflicts in > values allocations. > > Reviewed-by: Abhishek Pandit-Subedi > Reviewed-by: Yu Liu Please put these behind your Signed-off-by line. I changed this for you. > Signed-off-by: Alain Michaud > --- > > Changes in v3: > - Fixed sparse errors > > Changes in v2: > - Renamed the mgmt.h per Marcel's comments. > - Addressed Marcel's comments in the implementation. > > include/net/bluetooth/mgmt.h | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h > index 16e0d87bd8fa..09452d2ea6d3 100644 > --- a/include/net/bluetooth/mgmt.h > +++ b/include/net/bluetooth/mgmt.h > @@ -702,6 +702,36 @@ struct mgmt_rp_set_exp_feature { > __le32 flags; > } __packed; > > +#define MGMT_OP_READ_DEF_SYSTEM_CONFIG 0x004b > + > +struct mgmt_tlv { > + __u16 type; I changed this to __le16 since we developed mgmt as little-endian. I missed this before and fixed this up as well. > + __u8 length; > + __u8 value[]; > +} __packed; > + > +struct mgmt_rp_read_default_system_config { > + __u8 parameters[0]; /* mgmt_tlv */ I changed this to params[] to follow recent global style changes. And hmmm, that seems to be not possible with no other values. ./include/net/bluetooth/mgmt.h:714:7: error: flexible array member in a struct with no named members 714 | __u8 params[]; /* mgmt_tlv */ | ^~~~~~ Maybe we need to leave these structs out since they only contain TLVs anyway. > +} __packed; > + > +#define MGMT_OP_SET_DEF_SYSTEM_CONFIG 0x004c > + > +struct mgmt_cp_set_default_system_config { > + __u8 parameters[0]; /* mgmt_tlv */ > +} __packed; > + > +#define MGMT_OP_READ_DEF_RUNTIME_CONFIG 0x004d > + > +struct mgmt_rp_read_default_runtime_config { > + __u8 parameters[0]; /* mgmt_tlv */ > +} __packed; > + > +#define MGMT_OP_SET_DEF_RUNTIME_CONFIG 0x004e > + > +struct mgmt_cp_set_default_runtime_config { > + __u8 parameters[0]; /* mgmt_tlv */ > +} __packed; > + > #define MGMT_EV_CMD_COMPLETE 0x0001 > struct mgmt_ev_cmd_complete { > __le16 opcode; Other than that patch has been applied to bluetooth-next tree. Regards Marcel