mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Drivers: hv: Support the newly introduced KVP messages in the driver
Support the newly defined KVP message types. It turns out that the host pushes a set of standard key value pairs as soon as the guest opens the KVP channel. Since we cannot handle these tuples until the user level daemon loads up, defer reading the KVP channel until the user level daemon is launched. Signed-off-by: K. Y. Srinivasan <[email protected]> Reviewed-by: Haiyang Zhang <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
e485ceac9e
commit
fa3d5b85c6
3 changed files with 176 additions and 51 deletions
|
|
@ -389,10 +389,16 @@ int main(void)
|
|||
}
|
||||
continue;
|
||||
|
||||
case KVP_OP_SET:
|
||||
case KVP_OP_GET:
|
||||
case KVP_OP_DELETE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (hv_msg->kvp_hdr.operation != KVP_OP_ENUMERATE)
|
||||
goto kvp_done;
|
||||
|
||||
hv_msg = (struct hv_kvp_msg *)incoming_cn_msg->data;
|
||||
key_name = (char *)hv_msg->body.kvp_enum_data.data.key;
|
||||
key_value = (char *)hv_msg->body.kvp_enum_data.data.value;
|
||||
|
|
@ -454,6 +460,7 @@ int main(void)
|
|||
* already in the receive buffer. Update the cn_msg header to
|
||||
* reflect the key value that has been added to the message
|
||||
*/
|
||||
kvp_done:
|
||||
|
||||
incoming_cn_msg->id.idx = CN_KVP_IDX;
|
||||
incoming_cn_msg->id.val = CN_KVP_VAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue