summaryrefslogtreecommitdiff
path: root/mesh/net.h
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2019-02-06 19:55:33 -0800
committerBrian Gix <brian.gix@intel.com>2019-02-12 15:30:53 -0800
commitc1551f20270f5a3cf43729645a1f1fd15a11c0c8 (patch)
tree6cd70a8ab9afe562bd1b8af41ca31b25b4d0c86e /mesh/net.h
parentdb15160d5ca3f8234137dc3083f5cb8795827b98 (diff)
downloadbluez-c1551f20270f5a3cf43729645a1f1fd15a11c0c8.tar.gz
mesh: Separate functions for net key add and update
This splits mesh_net_key_add() into two separate functions: mesh_net_key_add() and mesh_net_key_update(). mesh_net_key_update() essentially replaces mesh_net_kr_phase_one() since switching to Key Refresh phase one can only be triggered by successful network key update.
Diffstat (limited to 'mesh/net.h')
-rw-r--r--mesh/net.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesh/net.h b/mesh/net.h
index 0ef01b63e..b27a4e614 100644
--- a/mesh/net.h
+++ b/mesh/net.h
@@ -280,8 +280,10 @@ bool mesh_net_set_relay_mode(struct mesh_net *net, bool enable, uint8_t cnt,
uint8_t interval);
bool mesh_net_set_friend_mode(struct mesh_net *net, bool enable);
int mesh_net_del_key(struct mesh_net *net, uint16_t net_idx);
-int mesh_net_add_key(struct mesh_net *net, bool update,
- uint16_t net_idx, const void *key);
+int mesh_net_add_key(struct mesh_net *net, uint16_t net_idx,
+ const uint8_t *key);
+int mesh_net_update_key(struct mesh_net *net, uint16_t net_idx,
+ const uint8_t *key);
uint32_t mesh_net_get_iv_index(struct mesh_net *net);
void mesh_net_get_snb_state(struct mesh_net *net,
uint8_t *flags, uint32_t *iv_index);
@@ -335,8 +337,6 @@ uint8_t mesh_net_key_refresh_phase_set(struct mesh_net *net, uint16_t net_idx,
uint8_t transition);
uint8_t mesh_net_key_refresh_phase_get(struct mesh_net *net, uint16_t net_idx,
uint8_t *phase);
-int mesh_net_kr_phase_one(struct mesh_net *net, uint16_t net_idx,
- const uint8_t *key);
int mesh_net_key_refresh_phase_two(struct mesh_net *net, uint16_t net_idx);
int mesh_net_key_refresh_finish(struct mesh_net *net, uint16_t net_idx);
void mesh_net_send_seg(struct mesh_net *net, uint32_t key_id,