Commit be5064c7 authored by Matt Porter's avatar Matt Porter Committed by Greg Kroah-Hartman

greybus: initialize all fields in an SVC handshake message

Currently only the handshake_type is being initialized when
responding to an SVC handshake request. Update this to
explicitly set all header/payload fields appropriately.
Signed-off-by: default avatarMatt Porter <mporter@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 648cb6cb
......@@ -93,6 +93,12 @@ static void svc_handshake(struct svc_function_handshake *handshake,
if (!svc_msg)
return;
svc_msg->header.function_id = SVC_FUNCTION_HANDSHAKE;
svc_msg->header.message_type = SVC_MSG_DATA;
svc_msg->header.payload_length =
cpu_to_le16(sizeof(struct svc_function_handshake));
svc_msg->handshake.version_major = GREYBUS_VERSION_MAJOR;
svc_msg->handshake.version_minor = GREYBUS_VERSION_MINOR;
svc_msg->handshake.handshake_type = SVC_HANDSHAKE_AP_HELLO;
svc_msg_send(svc_msg, hd);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment