All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gix <brian.gix@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Brian Gix <brian.gix@intel.com>
Subject: [PATCH BlueZ 09/12] mesh: Add internal Mesh Private Beacon model
Date: Thu, 19 Jan 2023 15:57:52 -0800	[thread overview]
Message-ID: <20230119235755.46002-10-brian.gix@gmail.com> (raw)
In-Reply-To: <20230119235755.46002-1-brian.gix@gmail.com>

From: Brian Gix <brian.gix@intel.com>

Adds recgnition that the Mesh Private Beacon model is internal
and foundational, without bindings.
---
 mesh/model.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/mesh/model.c b/mesh/model.c
index e2babea10..4ccafa17e 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -26,6 +26,7 @@
 #include "mesh/cfgmod.h"
 #include "mesh/prov.h"
 #include "mesh/remprv.h"
+#include "mesh/prv-beacon.h"
 #include "mesh/error.h"
 #include "mesh/dbus.h"
 #include "mesh/util.h"
@@ -81,6 +82,9 @@ static bool is_internal(uint32_t id)
 	if (id == REM_PROV_SRV_MODEL || id == REM_PROV_CLI_MODEL)
 		return true;
 
+	if (id == PRV_BEACON_SRV_MODEL || id == PRV_BEACON_CLI_MODEL)
+		return true;
+
 	return false;
 }
 
@@ -647,6 +651,9 @@ static int update_binding(struct mesh_node *node, uint16_t addr, uint32_t id,
 	if (id == CONFIG_SRV_MODEL || id == CONFIG_CLI_MODEL)
 		return MESH_STATUS_INVALID_MODEL;
 
+	if (id == PRV_BEACON_SRV_MODEL || id == PRV_BEACON_CLI_MODEL)
+		return MESH_STATUS_INVALID_MODEL;
+
 	if (!appkey_have_key(node_get_net(node), app_idx))
 		return MESH_STATUS_INVALID_APPKEY;
 
@@ -1655,7 +1662,8 @@ static struct mesh_model *model_setup(struct mesh_net *net, uint8_t ele_idx,
 						SET_ID(SIG_VENDOR, db_mod->id));
 
 	/* Implicitly bind config server model to device key */
-	if (db_mod->id == CONFIG_SRV_MODEL) {
+	if (db_mod->id == CONFIG_SRV_MODEL ||
+					db_mod->id == PRV_BEACON_SRV_MODEL) {
 
 		if (ele_idx != PRIMARY_ELE_IDX) {
 			l_free(mod);
-- 
2.39.0


  parent reply	other threads:[~2023-01-19 23:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 23:57 [PATCH BlueZ 00/12] Mesh v1.1 additions Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 01/12] doc/mesh: Add Remote Provisioning DBus APIs Brian Gix
2023-01-20  4:12   ` Mesh v1.1 additions bluez.test.bot
2023-01-19 23:57 ` [PATCH BlueZ 02/12] mesh: Add Remote Provisioning Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 03/12] tools/mesh: Optimize for multiple RPR servers and NPPI Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 04/12] mesh: Rename parameter list per crypto usage Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 05/12] unit/mesh: Add unit testing of Mesh Private Beaconing Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 06/12] mesh: Add storage of Mesh Private Beacon settings Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 07/12] mesh: Add Mesh Private Beacon server Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 08/12] mesh: Add Tx/Rx support of Mesh Private Beacons Brian Gix
2023-01-19 23:57 ` Brian Gix [this message]
2023-01-19 23:57 ` [PATCH BlueZ 10/12] mesh: Plumb in Mesh Private Beacon model Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 11/12] tools/mesh: Add support for Mesh Private Beacons Brian Gix
2023-01-19 23:57 ` [PATCH BlueZ 12/12] mesh: Switch beaconing net key Brian Gix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230119235755.46002-10-brian.gix@gmail.com \
    --to=brian.gix@gmail.com \
    --cc=brian.gix@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.