Skip to content

Commit 5bf4022

Browse files
silabs-aydoganerzr
authored andcommitted
uic: zpc: UIC-3597: Remove zwave_controller_get_key_from_encapsulation dependency from zwave_api module
(cherry picked from commit 85a4731ae480e40b79ec0dda8123d815e0cf4e77) Forwarded: #11 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
1 parent d7bb289 commit 5bf4022

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

applications/zpc/components/zwave_api/src/zwapi_protocol_controller.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ sl_status_t zwapi_transfer_protocol_cc(
850850
uint8_t response_buffer[FRAME_LENGTH_MAX] = { 0 };
851851

852852
zwapi_write_node_id(request_buffer, &index, srcNode);
853-
request_buffer[index++] = zwave_controller_get_key_from_encapsulation(decryptionKey);
853+
request_buffer[index++] = decryptionKey;
854854

855855
if (payloadLength > ZWAVE_MAX_FRAME_SIZE)
856856
{

applications/zpc/components/zwave_command_handler/src/zwave_command_handler_callbacks.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,15 @@ void zwave_command_handler_on_protocol_frame_received(
296296
message << "]";
297297
sl_log_debug(LOG_TAG, "%s", message.str().c_str());
298298

299-
// Dispatch and look at the status code
299+
uint8_t decryption_key = zwave_controller_get_key_from_encapsulation(connection_info->encapsulation);
300+
301+
// Dispatch and look at the status code
300302
sl_status_t status
301-
= zwapi_transfer_protocol_cc(connection_info->remote.node_id, connection_info->encapsulation, frame_length, frame_data);
302-
303+
= zwapi_transfer_protocol_cc(connection_info->remote.node_id,
304+
decryption_key,
305+
frame_length,
306+
frame_data);
307+
303308
switch (status) {
304309
case SL_STATUS_OK:
305310
sl_log_debug(LOG_TAG,

0 commit comments

Comments
 (0)