static struct workqueue_struct *ap_workqueue;
-static struct svc_msg *svc_msg_alloc(enum svc_function_type type)
+static struct svc_msg *svc_msg_alloc(enum svc_function_id id)
{
struct svc_msg *svc_msg;
if (!svc_msg)
return NULL;
- // FIXME - verify we are only sending message types we should be
- svc_msg->header.type = type;
+ // FIXME - verify we are only sending function IDs we should be
+ svc_msg->header.function_id = id;
return svc_msg;
}
}
/* Look at the message to figure out what to do with it */
- switch (svc_msg->header.type) {
+ switch (svc_msg->header.function_id) {
case SVC_FUNCTION_HANDSHAKE:
svc_handshake(&svc_msg->handshake, hd);
break;
svc_suspend(&svc_msg->suspend, hd);
break;
default:
- dev_err(hd->parent, "received invalid SVC message type %d\n",
- svc_msg->header.type);
+ dev_err(hd->parent, "received invalid SVC function ID %d\n",
+ svc_msg->header.function_id);
}
/* clean the message up */
#pragma pack(push, 1)
-enum svc_function_type {
+enum svc_function_id {
SVC_FUNCTION_HANDSHAKE = 0x00,
SVC_FUNCTION_UNIPRO_NETWORK_MANAGEMENT = 0x01,
SVC_FUNCTION_HOTPLUG = 0x02,
SVC_FUNCTION_SUSPEND = 0x06,
};
+enum svc_msg_type {
+ SVC_MSG_DATA = 0x00,
+ SVC_MSG_ERROR = 0xff,
+};
+
struct svc_msg_header {
- __u8 function;
- __u8 type; /* enum svc_function_type */
+ __u8 function_id; /* enum svc_function_id */
+ __u8 message_type;
__u8 version_major;
__u8 version_minor;
__le16 payload_length;