Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp638191ybg; Wed, 10 Jun 2020 09:43:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx08ZKWRulDU8A/zIxaAr+m+NcllXYkHR4Kg9v+RqTlMA0oaFu6+kHUphdfI3ROq1NM2eTw X-Received: by 2002:a17:906:d1c5:: with SMTP id bs5mr4344811ejb.117.1591807416452; Wed, 10 Jun 2020 09:43:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591807416; cv=none; d=google.com; s=arc-20160816; b=hY34Wjw1HXRIIwhFA5nP2vYCtbESxvFCanVx4+Jwa9IWptBnJMIlHjA55sA0axOrwq qcm0AIlwE6dlLq66C66Xw5wBvdAwzm23rHhFQLIDzYI06/Cl0ZpDOooHVHZ8toWPxuuj eUKKnPbN94DYbVjIYMhoAagJ5vHg/ORQNJXZ85gNE4dOCvmNlB6MM5VAHdfJZOCNYU6D YEpkU+AXcVNwWAY07N5H2JSl6cBdSYllPuLrCJ4KdaQyzTlG2k8y9Nw6q2NR4IhlchoY CxH1o1AeLU03kWYTEJL0uHZcrErt0t0y/aRllsip6s3gwL3Z+aRge8PLE9FGYuxb7CTv aeoA== 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=MZFmBi+uGsBvIpLYW2EhhtW1NIj4VMQVXkj+G4XaMYo=; b=tjG6ZJmL8CUorOVImdZec+2lDWAmYkctACh0xHFD7Hfy2rEc3tRWGh8xCEm7HzJA0z BCvO8JXCvkGe6qgdpdvhdYr5zLYW6DMk0wbmor373s8BqBy56DOzj13Nh3SveajbnveV wm0BRVT0cyzy1yx93AREaFlTZgdj+/MHN22HkHaQtN9kDVia/mywa98pfAO/QMujhDpx xehiPyUStpqPRH3pmy5Fiio84YkKSNy+qEQj6Zyxq4NWZkO78p8SAHZGzyZklk551jWc ucV4OghDOPOdd2La2SzfdBIek7LbAkDYnmy5WhiQbySCmEHDlfOya4gIar+39ufayxgb 5v6Q== 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 j17si81005edh.365.2020.06.10.09.43.11; Wed, 10 Jun 2020 09:43:36 -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 S1729779AbgFJOQl convert rfc822-to-8bit (ORCPT + 99 others); Wed, 10 Jun 2020 10:16:41 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:33011 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbgFJOQl (ORCPT ); Wed, 10 Jun 2020 10:16:41 -0400 Received: from marcel-macbook.fritz.box (p5b3d2638.dip0.t-ipconnect.de [91.61.38.56]) by mail.holtmann.org (Postfix) with ESMTPSA id C7CEBCECE6; Wed, 10 Jun 2020 16:26:28 +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 v1 1/3] mgmt: read/set system parameter definitions From: Marcel Holtmann In-Reply-To: <20200609140351.153833-2-alainm@chromium.org> Date: Wed, 10 Jun 2020 16:16:38 +0200 Cc: linux-bluetooth@vger.kernel.org, Abhishek Pandit-Subedi , Yu Liu Content-Transfer-Encoding: 8BIT Message-Id: References: <20200609140351.153833-1-alainm@chromium.org> <20200609140351.153833-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, > 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 > > Signed-off-by: Alain Michaud > --- > > include/net/bluetooth/mgmt.h | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h > index 16e0d87bd8fa..1081e371f03d 100644 > --- a/include/net/bluetooth/mgmt.h > +++ b/include/net/bluetooth/mgmt.h > @@ -702,6 +702,24 @@ struct mgmt_rp_set_exp_feature { > __le32 flags; > } __packed; > > +#define MGMT_OP_READ_DEFAULT_SYSTEM_PARAMETERS 0x004b > + I would go for MGMT_OP_READ_DEF_SYSTEM_CONFIG or MGMT_OP_READ_DEFAULT_SYSTEM_CONFIG to match the name in the mgmt-api.txt more closely. > +struct mgmt_system_parameter_tlv { > + __u16 type; > + __u8 length; > + __u8 value[]; > +} __packed; > + Can we just introduce a generic mgmt_tlv {} struct. I think we could use it more broadly. However I wonder if we need it actually since have the EIR parsing support. Maybe just extend that one. > +struct mgmt_rp_read_default_system_parameters { > + __u8 parameters[0]; /* mgmt_system_parameter_tlv */ > +} __packed; > + > +#define MGMT_OP_SET_DEFAULT_SYSTEM_PARAMETERS 0x004c Similar to the comment above. > + > +struct mgmt_cp_set_default_system_parameters { > + __u8 parameters[0]; /* mgmt_system_parameter_tlv */ > +} __packed; > + > #define MGMT_EV_CMD_COMPLETE 0x0001 > struct mgmt_ev_cmd_complete { > __le16 opcode; If you have a chance, please also add MGMT_OP_{READ,SET}_DEF_RUNTIME_CONFIG as well. If not, then I am going to send out a patch for that by myself. Regards Marcel