mesh: Remove unused/redundant functions
PATCH 1/1 mesh: Remove unused/redundant functions
This removes mesh_net_provisioner_mode_set (unused) and mesh_net_provisioner_mode_get (duplicates node_is_provisioner)
--- mesh/model.c | 2 +- mesh/net.c | 10 ---------- mesh/net.h | 2 -- 3 files changed, 1 insertion(+), 13 deletions(-)
mesh/model.c +1 -1
@@ -907,7 +907,7 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,* The packet needs to be decoded by the correct key which * is hinted by key_aid, but is not necessarily definitive */ -if (key_aid ==APP_AID_DEV ||mesh_net_provisioner_mode_get (net)) +if (key_aid ==APP_AID_DEV ||node_is_provisioner (node)) decrypt_idx =dev_packet_decrypt (node, data, size, szmict, src, dst, key_aid, seq0, iv_index, clear_text);
mesh/net.c +0 -10
@@ -3362,16 +3362,6 @@ void mesh_net_set_iv_index(struct mesh_net *net, uint32_t index, bool update) net->iv_update = update; } -void mesh_net_provisioner_mode_set (struct mesh_net *net,bool mode) -{ - net->provisioner = mode; -} - -bool mesh_net_provisioner_mode_get (struct mesh_net *net) -{ -return net->provisioner; -} -uint16_t mesh_net_get_primary_idx (struct mesh_net *net) {struct mesh_subnet *subnet;
mesh/net.h +0 -2
@@ -335,8 +335,6 @@ void mesh_net_send_seg(struct mesh_net *net, uint32_t key_id,struct mesh_net_heartbeat *mesh_net_heartbeat_get (struct mesh_net *net);void mesh_net_heartbeat_init (struct mesh_net *net);void mesh_net_heartbeat_send (struct mesh_net *net); -void mesh_net_provisioner_mode_set (struct mesh_net *net,bool mode); -bool mesh_net_provisioner_mode_get (struct mesh_net *net);bool mesh_net_key_list_get (struct mesh_net *net,uint8_t *buf,uint16_t *count);uint16_t mesh_net_get_primary_idx (struct mesh_net *net);uint32_t mesh_net_friend_timeout (struct mesh_net *net,uint16_t addr);
Signature · 1 line
2.26.2
Gix, Brian
AppliedApplied
Quoted 55 lines · Inga Stotland
This removes
mesh_net_provisioner_mode_set(unused) andmesh_net_provisioner_mode_get(duplicatesnode_is_provisioner)--- mesh/model.c | 2 +- mesh/net.c | 10 ---------- mesh/net.h | 2 -- 3 files changed, 1 insertion(+), 13 deletions(-)mesh/model.c +1
-1@@ -907,7 +907,7 @@ bool mesh_model_rx(struct mesh_node *node, bool szmict, uint32_t seq0,* The packet needs to be decoded by the correct key which * is hinted by key_aid, but is not necessarily definitive */ -if (key_aid ==APP_AID_DEV ||mesh_net_provisioner_mode_get (net)) +if (key_aid ==APP_AID_DEV ||node_is_provisioner (node)) decrypt_idx =dev_packet_decrypt (node, data, size, szmict, src, dst, key_aid, seq0, iv_index, clear_text);mesh/net.c +0
-10@@ -3362,16 +3362,6 @@ void mesh_net_set_iv_index(struct mesh_net *net, uint32_t index, bool update) net->iv_update = update; } -void mesh_net_provisioner_mode_set (struct mesh_net *net,bool mode) -{ - net->provisioner = mode; -} - -bool mesh_net_provisioner_mode_get (struct mesh_net *net) -{ -return net->provisioner; -} -uint16_t mesh_net_get_primary_idx (struct mesh_net *net) {struct mesh_subnet *subnet;mesh/net.h +0
-2@@ -335,8 +335,6 @@ void mesh_net_send_seg(struct mesh_net *net, uint32_t key_id,struct mesh_net_heartbeat *mesh_net_heartbeat_get (struct mesh_net *net);void mesh_net_heartbeat_init (struct mesh_net *net);void mesh_net_heartbeat_send (struct mesh_net *net); -void mesh_net_provisioner_mode_set (struct mesh_net *net,bool mode); -bool mesh_net_provisioner_mode_get (struct mesh_net *net);bool mesh_net_key_list_get (struct mesh_net *net,uint8_t *buf,uint16_t *count);uint16_t mesh_net_get_primary_idx (struct mesh_net *net);uint32_t mesh_net_friend_timeout (struct mesh_net *net,uint16_t addr);