Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp951319ybg; Wed, 10 Jun 2020 19:02:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTWFWAGCmKZ56eWvKXrBrOnALkokDPM8LyQff6i9BW9HR9GWVSxb5Bdawsuesp1/AvgmyH X-Received: by 2002:a17:906:8492:: with SMTP id m18mr6123280ejx.168.1591840957088; Wed, 10 Jun 2020 19:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591840957; cv=none; d=google.com; s=arc-20160816; b=c256WEcxqjXsSewQzQ7mMStYD6ZvAZLMkqgdP3OTHGgDPKwyU6NZ8+dnEM7oXHCLBH /SlIQTtK/DMFKber8m2qP6E8rd9Ff7mXnm/eu0+GQWv606HainOPgFAT1dFNZ33T8Ldd 8y9awxL/sc8ir20WmiDWvyQLP/2WJ5zikzYOgfc52aT6TDLlTXCB44q7Wa92F5vcI0XW m8QPTXZ3VGTuGQPqlSMFC4ixr6VwebnQYnEgkjUC914pFh3wijjfiTFTVHqBcxn3iuzC 3GTlR3BZEtj/tl+ahB66oWBYFU3lD25QVpDOEOxNa8SKjqvROXjeV9rgupqc/0dbk2mA 3yXA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4gX5gEjaAhk+Yg1HTNrJsp+Drp+hSN+9K/wcCOjy1ow=; b=KzDDccKsSaHhPcS4sWwEBEJSwJSKafDM5UxIJYbwIBoyDtIaVqqc/kokYHjZRHGIiv ZeA+mdaq+Mb5HA+Q3DZbi7ppp/EUCZe+TeA1iADh0lZfqP1/O6QiY2PdPv2yVFxzmLm4 pQtjbOrLCaAqMfRCsFOV9zI0101twDSgHODS33dTrcgmsATuMf8Hemg3sFBis/Y52Als Gh31SdM9rhnVpyCEpn7TVBvQYj9cw7YBlu7uR8sfslgKhqYJ8t+d9eW/xqKcV+hGYHM4 muSiqV8VaYZ47nTkg4IG0kQM1sEy6blY9xwVBapV8q1l9/s773PNUQWwHTzr/RMQInmi wbOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=n48McVKc; 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 f23si1170141ejy.135.2020.06.10.19.02.12; Wed, 10 Jun 2020 19:02:37 -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=n48McVKc; 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 S1726290AbgFKCCF (ORCPT + 99 others); Wed, 10 Jun 2020 22:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbgFKCCE (ORCPT ); Wed, 10 Jun 2020 22:02:04 -0400 Received: from mail-vs1-xe41.google.com (mail-vs1-xe41.google.com [IPv6:2607:f8b0:4864:20::e41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8955FC08C5C1 for ; Wed, 10 Jun 2020 19:02:04 -0700 (PDT) Received: by mail-vs1-xe41.google.com with SMTP id y123so2509083vsb.6 for ; Wed, 10 Jun 2020 19:02:04 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=4gX5gEjaAhk+Yg1HTNrJsp+Drp+hSN+9K/wcCOjy1ow=; b=n48McVKc1gbG6gCedoSb9KXhbQldd7w8g+rbDnruuJJafGw4HlJMT1q8iJ/PK8RD5l 95tGaPTZrrpMaddjnpkXvmj2ul8Fjlkx1/1kQtUMlUnMYXpPMMM5CEZoFarnfUGDxy/p l0nxttdikMSNpjxYgku7zq1+XxQLlsz4Nwi6c= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=4gX5gEjaAhk+Yg1HTNrJsp+Drp+hSN+9K/wcCOjy1ow=; b=VIt6rt9FxQVFThmIwHCHeYkDjAGeUUM/jMKpPamG/9LTUZGjKnN15dzUGiA4jydgYa BSUPk+a2MbZFaS4OAMGFxb64Q1/oASqnKTMm/PBLIrtlkQ7PymD4We/WBxzGb7z24I78 2yK/LLq+2tawGQ6J7800qWLusLa4FHi4fgdLNHx9X6WX5XLLzoVs2Su8edPuuA6/tOgM UpwXaR/GyBVzkepih68H2TTO5Is7gWmZCnJ2qfbwVhtXAxLQz3bAQtwIDJ3+yltMvBNY sPxTB3A47rfF6BuxZzl7GhlfnIDF4mrnJNND0jZtj7H4MDCTWZseR4ZYCrsS7INdxCtR ptJg== X-Gm-Message-State: AOAM533T9B50PqFlPwQbHptU9z+1R+yUivmROJntlkN+9QG73Sy67er2 YX9ZrPNtoe6DaNHZbadhym3PuZJkxE4= X-Received: by 2002:a67:fc0b:: with SMTP id o11mr4820672vsq.114.1591840923496; Wed, 10 Jun 2020 19:02:03 -0700 (PDT) Received: from alain.c.googlers.com.com (252.177.243.35.bc.googleusercontent.com. [35.243.177.252]) by smtp.gmail.com with ESMTPSA id r17sm243197vsi.34.2020.06.10.19.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 19:02:03 -0700 (PDT) From: Alain Michaud To: linux-bluetooth@vger.kernel.org Cc: Alain Michaud , Abhishek Pandit-Subedi , Yu Liu Subject: [PATCH v3 1/3] mgmt: read/set system parameter definitions Date: Thu, 11 Jun 2020 02:01:55 +0000 Message-Id: <20200611020157.70230-2-alainm@chromium.org> X-Mailer: git-send-email 2.27.0.290.gba653c62da-goog In-Reply-To: <20200611020157.70230-1-alainm@chromium.org> References: <20200611020157.70230-1-alainm@chromium.org> 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 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 --- 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; + __u8 length; + __u8 value[]; +} __packed; + +struct mgmt_rp_read_default_system_config { + __u8 parameters[0]; /* mgmt_tlv */ +} __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; -- 2.27.0.290.gba653c62da-goog