public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/9] doc: mesh-api: minor copy&paste fix
@ 2025-06-27  7:57 Christian Eggers
  2025-06-27  7:57 ` [PATCH BlueZ 2/9] mesh: keyring: constify Christian Eggers
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Christian Eggers @ 2025-06-27  7:57 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

---
 doc/mesh-api.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt
index ea6f034db8a5..c67b8411d797 100644
--- a/doc/mesh-api.txt
+++ b/doc/mesh-api.txt
@@ -1018,7 +1018,7 @@ Properties:
 		Element index. It is required that the application follows
 		sequential numbering scheme for the elements, starting with 0.
 
-	array{(uint16 id, dict caps)} Models [read-only]
+	array{(uint16 id, dict options)} Models [read-only]
 
 		An array of SIG Models:
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH BlueZ 2/9] mesh: keyring: constify
  2025-06-27  7:57 [PATCH BlueZ 1/9] doc: mesh-api: minor copy&paste fix Christian Eggers
@ 2025-06-27  7:57 ` Christian Eggers
  2025-06-27  7:57 ` [PATCH BlueZ 3/9] mesh: mesh-config: constify Christian Eggers
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Christian Eggers @ 2025-06-27  7:57 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

---
 mesh/keyring.c | 4 ++--
 mesh/keyring.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mesh/keyring.c b/mesh/keyring.c
index cb091e15b613..3a09876777fd 100644
--- a/mesh/keyring.c
+++ b/mesh/keyring.c
@@ -67,7 +67,7 @@ static int open_key_file(struct mesh_node *node, const char *key_dir,
 }
 
 bool keyring_put_net_key(struct mesh_node *node, uint16_t net_idx,
-						struct keyring_net_key *key)
+					const struct keyring_net_key *key)
 {
 	bool result = false;
 	int fd;
@@ -191,7 +191,7 @@ bool keyring_finalize_app_keys(struct mesh_node *node, uint16_t net_idx)
 }
 
 bool keyring_put_remote_dev_key(struct mesh_node *node, uint16_t unicast,
-					uint8_t count, uint8_t dev_key[16])
+					uint8_t count, const uint8_t dev_key[16])
 {
 	const char *node_path;
 	char key_file[PATH_MAX];
diff --git a/mesh/keyring.h b/mesh/keyring.h
index efc499ac267e..e2088edfde14 100644
--- a/mesh/keyring.h
+++ b/mesh/keyring.h
@@ -23,7 +23,7 @@ struct keyring_app_key {
 };
 
 bool keyring_put_net_key(struct mesh_node *node, uint16_t net_idx,
-						struct keyring_net_key *key);
+					const struct keyring_net_key *key);
 bool keyring_get_net_key(struct mesh_node *node, uint16_t net_idx,
 						struct keyring_net_key *key);
 bool keyring_del_net_key(struct mesh_node *node, uint16_t net_idx);
@@ -36,7 +36,7 @@ bool keyring_del_app_key(struct mesh_node *node, uint16_t app_idx);
 bool keyring_get_remote_dev_key(struct mesh_node *node, uint16_t unicast,
 							uint8_t dev_key[16]);
 bool keyring_put_remote_dev_key(struct mesh_node *node, uint16_t unicast,
-					uint8_t count, uint8_t dev_key[16]);
+				uint8_t count, const uint8_t dev_key[16]);
 bool keyring_del_remote_dev_key(struct mesh_node *node, uint16_t unicast,
 								uint8_t count);
 bool keyring_del_remote_dev_key_all(struct mesh_node *node, uint16_t unicast);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH BlueZ 3/9] mesh: mesh-config: constify
  2025-06-27  7:57 [PATCH BlueZ 1/9] doc: mesh-api: minor copy&paste fix Christian Eggers
  2025-06-27  7:57 ` [PATCH BlueZ 2/9] mesh: keyring: constify Christian Eggers
@ 2025-06-27  7:57 ` Christian Eggers
  2025-06-27  7:58 ` [PATCH BlueZ 4/9] mesh: util: constify Christian Eggers
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Christian Eggers @ 2025-06-27  7:57 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

removing 2 prototypes where an implementation never existed
---
 mesh/mesh-config-json.c | 14 +++++++-------
 mesh/mesh-config.h      | 20 ++++++++------------
 2 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c
index 86e7d87e482e..5ad4d832a05a 100644
--- a/mesh/mesh-config-json.c
+++ b/mesh/mesh-config-json.c
@@ -739,7 +739,7 @@ bool mesh_config_net_key_del(struct mesh_config *cfg, uint16_t idx)
 	return save_config(jnode, cfg->node_dir_path);
 }
 
-bool mesh_config_write_device_key(struct mesh_config *cfg, uint8_t *key)
+bool mesh_config_write_device_key(struct mesh_config *cfg, const uint8_t *key)
 {
 	if (!cfg || !add_key_value(cfg->jnode, deviceKey, key))
 		return false;
@@ -747,7 +747,7 @@ bool mesh_config_write_device_key(struct mesh_config *cfg, uint8_t *key)
 	return save_config(cfg->jnode, cfg->node_dir_path);
 }
 
-bool mesh_config_write_candidate(struct mesh_config *cfg, uint8_t *key)
+bool mesh_config_write_candidate(struct mesh_config *cfg, const uint8_t *key)
 {
 	if (!cfg || !add_key_value(cfg->jnode, deviceCan, key))
 		return false;
@@ -782,7 +782,7 @@ bool mesh_config_finalize_candidate(struct mesh_config *cfg)
 	return save_config(cfg->jnode, cfg->node_dir_path);
 }
 
-bool mesh_config_write_token(struct mesh_config *cfg, uint8_t *token)
+bool mesh_config_write_token(struct mesh_config *cfg, const uint8_t *token)
 {
 	if (!cfg || !add_u64_value(cfg->jnode, "token", token))
 		return false;
@@ -2005,7 +2005,7 @@ bool mesh_config_net_key_set_phase(struct mesh_config *cfg, uint16_t idx,
 
 bool mesh_config_model_pub_add(struct mesh_config *cfg, uint16_t ele_addr,
 					uint32_t mod_id, bool vendor,
-					struct mesh_config_pub *pub)
+					const struct mesh_config_pub *pub)
 {
 	json_object *jnode, *jmodel, *jpub, *jrtx;
 	bool res;
@@ -2146,7 +2146,7 @@ void mesh_config_comp_page_del(struct mesh_config *cfg, uint8_t page)
 }
 
 bool mesh_config_comp_page_add(struct mesh_config *cfg, uint8_t page,
-						uint8_t *data, uint16_t size)
+					const uint8_t *data, uint16_t size)
 {
 	json_object *jnode, *jstring, *jarray = NULL;
 	char *buf;
@@ -2187,7 +2187,7 @@ bool mesh_config_comp_page_add(struct mesh_config *cfg, uint8_t page,
 
 bool mesh_config_model_sub_add(struct mesh_config *cfg, uint16_t ele_addr,
 						uint32_t mod_id, bool vendor,
-						struct mesh_config_sub *sub)
+					const struct mesh_config_sub *sub)
 {
 	json_object *jnode, *jmodel, *jstring, *jarray = NULL;
 	int ele_idx, len;
@@ -2239,7 +2239,7 @@ bool mesh_config_model_sub_add(struct mesh_config *cfg, uint16_t ele_addr,
 
 bool mesh_config_model_sub_del(struct mesh_config *cfg, uint16_t ele_addr,
 						uint32_t mod_id, bool vendor,
-						struct mesh_config_sub *sub)
+					const struct mesh_config_sub *sub)
 {
 	json_object *jnode, *jmodel, *jarray;
 	char buf[33];
diff --git a/mesh/mesh-config.h b/mesh/mesh-config.h
index 3cb20b85d5c3..b320116fa8dc 100644
--- a/mesh/mesh-config.h
+++ b/mesh/mesh-config.h
@@ -128,15 +128,11 @@ struct mesh_config *mesh_config_create(const char *cfgdir_name,
 
 bool mesh_config_write_net_transmit(struct mesh_config *cfg, uint8_t cnt,
 							uint16_t interval);
-bool mesh_config_write_device_key(struct mesh_config *cfg, uint8_t *key);
-bool mesh_config_write_candidate(struct mesh_config *cfg, uint8_t *key);
+bool mesh_config_write_device_key(struct mesh_config *cfg, const uint8_t *key);
+bool mesh_config_write_candidate(struct mesh_config *cfg, const uint8_t *key);
 bool mesh_config_read_candidate(struct mesh_config *cfg, uint8_t *key);
 bool mesh_config_finalize_candidate(struct mesh_config *cfg);
-bool mesh_config_write_token(struct mesh_config *cfg, uint8_t *token);
-bool mesh_config_write_network_key(struct mesh_config *cfg, uint16_t idx,
-				uint8_t *key, uint8_t *new_key, int phase);
-bool mesh_config_write_app_key(struct mesh_config *cfg, uint16_t net_idx,
-			uint16_t app_idx, uint8_t *key, uint8_t *new_key);
+bool mesh_config_write_token(struct mesh_config *cfg, const uint8_t *token);
 bool mesh_config_write_seq_number(struct mesh_config *cfg, uint32_t seq,
 								bool cache);
 bool mesh_config_write_unicast(struct mesh_config *cfg, uint16_t unicast);
@@ -150,7 +146,7 @@ bool mesh_config_write_mode(struct mesh_config *cfg, const char *keyword,
 bool mesh_config_write_mode_ex(struct mesh_config *cfg, const char *keyword,
 							int value, bool save);
 bool mesh_config_comp_page_add(struct mesh_config *cfg, uint8_t page,
-						uint8_t *data, uint16_t size);
+					const uint8_t *data, uint16_t size);
 void mesh_config_comp_page_del(struct mesh_config *cfg, uint8_t page);
 bool mesh_config_model_binding_add(struct mesh_config *cfg, uint16_t ele_addr,
 						uint32_t mod_id, bool vendor,
@@ -159,16 +155,16 @@ bool mesh_config_model_binding_del(struct mesh_config *cfg, uint16_t ele_addr,
 						uint32_t mod_id, bool vendor,
 							uint16_t app_idx);
 bool mesh_config_model_pub_add(struct mesh_config *cfg, uint16_t ele_addr,
-						uint32_t mod_id, bool vendor,
-						struct mesh_config_pub *pub);
+					uint32_t mod_id, bool vendor,
+					const struct mesh_config_pub *pub);
 bool mesh_config_model_pub_del(struct mesh_config *cfg, uint16_t ele_addr,
 						uint32_t mod_id, bool vendor);
 bool mesh_config_model_sub_add(struct mesh_config *cfg, uint16_t ele_addr,
 						uint32_t mod_id, bool vendor,
-						struct mesh_config_sub *sub);
+					const struct mesh_config_sub *sub);
 bool mesh_config_model_sub_del(struct mesh_config *cfg, uint16_t ele_addr,
 						uint32_t mod_id, bool vendor,
-						struct mesh_config_sub *sub);
+					const struct mesh_config_sub *sub);
 bool mesh_config_model_sub_del_all(struct mesh_config *cfg, uint16_t ele_addr,
 						uint32_t mod_id, bool vendor);
 bool mesh_config_model_pub_enable(struct mesh_config *cfg, uint16_t ele_addr,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH BlueZ 4/9] mesh: util: constify
  2025-06-27  7:57 [PATCH BlueZ 1/9] doc: mesh-api: minor copy&paste fix Christian Eggers
  2025-06-27  7:57 ` [PATCH BlueZ 2/9] mesh: keyring: constify Christian Eggers
  2025-06-27  7:57 ` [PATCH BlueZ 3/9] mesh: mesh-config: constify Christian Eggers
@ 2025-06-27  7:58 ` Christian Eggers
  2025-06-27  7:58 ` [PATCH BlueZ 5/9] mesh: mesh_net_transport_send: simplify Christian Eggers
  2025-06-27  9:34 ` [BlueZ,1/9] doc: mesh-api: minor copy&paste fix bluez.test.bot
  4 siblings, 0 replies; 7+ messages in thread
From: Christian Eggers @ 2025-06-27  7:58 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

---
 mesh/util.c | 2 +-
 mesh/util.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mesh/util.c b/mesh/util.c
index 73f13aab7d64..348401ae5582 100644
--- a/mesh/util.c
+++ b/mesh/util.c
@@ -75,7 +75,7 @@ bool str2hex(const char *str, uint16_t in_len, uint8_t *out,
 	return true;
 }
 
-size_t hex2str(uint8_t *in, size_t in_len, char *out, size_t out_len)
+size_t hex2str(const uint8_t *in, size_t in_len, char *out, size_t out_len)
 {
 	static const char hexdigits[] = "0123456789abcdef";
 	size_t i;
diff --git a/mesh/util.h b/mesh/util.h
index bb417dc40f16..36247ea4d6c3 100644
--- a/mesh/util.h
+++ b/mesh/util.h
@@ -11,7 +11,7 @@
 uint32_t get_timestamp_secs(void);
 bool str2hex(const char *str, uint16_t in_len, uint8_t *out,
 							uint16_t out_len);
-size_t hex2str(uint8_t *in, size_t in_len, char *out, size_t out_len);
+size_t hex2str(const uint8_t *in, size_t in_len, char *out, size_t out_len);
 void print_packet(const char *label, const void *data, uint16_t size);
 int create_dir(const char *dir_name);
 void del_path(const char *path);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH BlueZ 5/9] mesh: mesh_net_transport_send: simplify
  2025-06-27  7:57 [PATCH BlueZ 1/9] doc: mesh-api: minor copy&paste fix Christian Eggers
                   ` (2 preceding siblings ...)
  2025-06-27  7:58 ` [PATCH BlueZ 4/9] mesh: util: constify Christian Eggers
@ 2025-06-27  7:58 ` Christian Eggers
  2025-06-27  9:34 ` [BlueZ,1/9] doc: mesh-api: minor copy&paste fix bluez.test.bot
  4 siblings, 0 replies; 7+ messages in thread
From: Christian Eggers @ 2025-06-27  7:58 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

No need for internal copy of 'seq'.
---
 mesh/net.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mesh/net.c b/mesh/net.c
index cc862dade5ae..f26a63f178c2 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -3411,7 +3411,6 @@ void mesh_net_transport_send(struct mesh_net *net, uint32_t net_key_id,
 				uint16_t dst, const uint8_t *msg,
 				uint16_t msg_len)
 {
-	uint32_t use_seq = seq;
 	uint8_t pkt_len;
 	uint8_t pkt[30];
 	bool result = false;
@@ -3463,13 +3462,13 @@ void mesh_net_transport_send(struct mesh_net *net, uint32_t net_key_id,
 			return;
 
 		net_key_id = subnet->net_key_tx;
-		use_seq = mesh_net_next_seq_num(net);
+		seq = mesh_net_next_seq_num(net);
 
 		if (result || (dst >= net->src_addr && dst <= net->last_addr))
 			return;
 	}
 
-	if (!mesh_crypto_packet_build(true, ttl, use_seq, src, dst, msg[0],
+	if (!mesh_crypto_packet_build(true, ttl, seq, src, dst, msg[0],
 				false, 0, false, false, 0, 0, 0, msg + 1,
 				msg_len - 1, pkt + 1, &pkt_len))
 		return;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [BlueZ,1/9] doc: mesh-api: minor copy&paste fix
  2025-06-27  7:59 [PATCH BlueZ 1/9] " Christian Eggers
@ 2025-06-27  9:32 ` bluez.test.bot
  0 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2025-06-27  9:32 UTC (permalink / raw)
  To: linux-bluetooth, ceggers

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=976514

---Test result---

Test Summary:
CheckPatch                    PENDING   0.35 seconds
GitLint                       PENDING   0.35 seconds
BuildEll                      PASS      19.97 seconds
BluezMake                     PASS      2655.92 seconds
MakeCheck                     PASS      20.50 seconds
MakeDistcheck                 PASS      198.04 seconds
CheckValgrind                 PASS      274.38 seconds
CheckSmatch                   PASS      303.68 seconds
bluezmakeextell               PASS      127.34 seconds
IncrementalBuild              PENDING   0.37 seconds
ScanBuild                     PASS      909.61 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [BlueZ,1/9] doc: mesh-api: minor copy&paste fix
  2025-06-27  7:57 [PATCH BlueZ 1/9] doc: mesh-api: minor copy&paste fix Christian Eggers
                   ` (3 preceding siblings ...)
  2025-06-27  7:58 ` [PATCH BlueZ 5/9] mesh: mesh_net_transport_send: simplify Christian Eggers
@ 2025-06-27  9:34 ` bluez.test.bot
  4 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2025-06-27  9:34 UTC (permalink / raw)
  To: linux-bluetooth, ceggers

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=976513

---Test result---

Test Summary:
CheckPatch                    PENDING   0.28 seconds
GitLint                       PENDING   0.26 seconds
BuildEll                      PASS      20.11 seconds
BluezMake                     PASS      2798.73 seconds
MakeCheck                     PASS      20.83 seconds
MakeDistcheck                 PASS      198.09 seconds
CheckValgrind                 PASS      272.54 seconds
CheckSmatch                   PASS      303.99 seconds
bluezmakeextell               PASS      127.45 seconds
IncrementalBuild              PENDING   0.25 seconds
ScanBuild                     PASS      911.55 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-06-27  9:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-27  7:57 [PATCH BlueZ 1/9] doc: mesh-api: minor copy&paste fix Christian Eggers
2025-06-27  7:57 ` [PATCH BlueZ 2/9] mesh: keyring: constify Christian Eggers
2025-06-27  7:57 ` [PATCH BlueZ 3/9] mesh: mesh-config: constify Christian Eggers
2025-06-27  7:58 ` [PATCH BlueZ 4/9] mesh: util: constify Christian Eggers
2025-06-27  7:58 ` [PATCH BlueZ 5/9] mesh: mesh_net_transport_send: simplify Christian Eggers
2025-06-27  9:34 ` [BlueZ,1/9] doc: mesh-api: minor copy&paste fix bluez.test.bot
  -- strict thread matches above, loose matches on Subject: below --
2025-06-27  7:59 [PATCH BlueZ 1/9] " Christian Eggers
2025-06-27  9:32 ` [BlueZ,1/9] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox