__u8 control;
};
+/* Loopback */
+
+/* Version of the Greybus loopback protocol we support */
+#define GB_LOOPBACK_VERSION_MAJOR 0x00
+#define GB_LOOPBACK_VERSION_MINOR 0x01
+
+/* Greybus loopback request types */
+#define GB_LOOPBACK_TYPE_INVALID 0x00
+#define GB_LOOPBACK_TYPE_PROTOCOL_VERSION 0x01
+#define GB_LOOPBACK_TYPE_PING 0x02
+#define GB_LOOPBACK_TYPE_TRANSFER 0x03
+
+struct gb_loopback_transfer_request {
+ __le32 len;
+ __u8 data[0];
+};
+
+struct gb_loopback_transfer_response {
+ __u8 data[0];
+};
+
/* SDIO */
/* Version of the Greybus sdio protocol we support */
#define GB_SDIO_VERSION_MAJOR 0x00
u32 error;
};
-/* Version of the Greybus loopback protocol we support */
-#define GB_LOOPBACK_VERSION_MAJOR 0x00
-#define GB_LOOPBACK_VERSION_MINOR 0x01
-
-/* Greybus loopback request types */
-#define GB_LOOPBACK_TYPE_INVALID 0x00
-#define GB_LOOPBACK_TYPE_PROTOCOL_VERSION 0x01
-#define GB_LOOPBACK_TYPE_PING 0x02
-#define GB_LOOPBACK_TYPE_TRANSFER 0x03
-
/* Current function (type of traffic generated by the loopback thread) */
#define GB_LOOPBACK_FN_NONE 0x00
#define GB_LOOPBACK_FN_PING 0x01
};
ATTRIBUTE_GROUPS(loopback);
-struct gb_loopback_transfer_request {
- __le32 len;
- __u8 data[0];
-};
-
-struct gb_loopback_transfer_response {
- __u8 data[0];
-};
-
-
static int gb_loopback_transfer(struct gb_loopback *gb,
struct timeval *tping, u32 len)
{