* [PATCH BlueZ] mesh: Remove unused/redundant functions
@ 2020-06-05 21:31 Inga Stotland
2020-06-08 20:33 ` Gix, Brian
0 siblings, 1 reply; 2+ messages in thread
From: Inga Stotland @ 2020-06-05 21:31 UTC (permalink / raw)
To: linux-bluetooth; +Cc: brian.gix, Inga Stotland
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(-)
diff --git a/mesh/model.c b/mesh/model.c
index ec79a69b8..f2dfb2644 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -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);
diff --git a/mesh/net.c b/mesh/net.c
index 07813eec4..c12dd6541 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -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;
diff --git a/mesh/net.h b/mesh/net.h
index 84e7c1545..f7fe3f150 100644
--- a/mesh/net.h
+++ b/mesh/net.h
@@ -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);
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] mesh: Remove unused/redundant functions
2020-06-05 21:31 [PATCH BlueZ] mesh: Remove unused/redundant functions Inga Stotland
@ 2020-06-08 20:33 ` Gix, Brian
0 siblings, 0 replies; 2+ messages in thread
From: Gix, Brian @ 2020-06-08 20:33 UTC (permalink / raw)
To: linux-bluetooth, Stotland, Inga
Applied
On Fri, 2020-06-05 at 14:31 -0700, Inga Stotland wrote:
> 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(-)
>
> diff --git a/mesh/model.c b/mesh/model.c
> index ec79a69b8..f2dfb2644 100644
> --- a/mesh/model.c
> +++ b/mesh/model.c
> @@ -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);
> diff --git a/mesh/net.c b/mesh/net.c
> index 07813eec4..c12dd6541 100644
> --- a/mesh/net.c
> +++ b/mesh/net.c
> @@ -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;
> diff --git a/mesh/net.h b/mesh/net.h
> index 84e7c1545..f7fe3f150 100644
> --- a/mesh/net.h
> +++ b/mesh/net.h
> @@ -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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-08 20:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 21:31 [PATCH BlueZ] mesh: Remove unused/redundant functions Inga Stotland
2020-06-08 20:33 ` Gix, Brian
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.