} __packed;
-/* Generic request numbers supported by all modules */
-#define GB_REQUEST_TYPE_INVALID 0x00
+/* Generic request types */
#define GB_REQUEST_TYPE_PROTOCOL_VERSION 0x01
+#define GB_REQUEST_TYPE_INVALID 0x7f
struct gb_protocol_version_request {
__u8 major;
/*
* The type supplied for incoming message buffers will be
- * 0x00. Such buffers will be overwritten by arriving data
- * so there's no need to initialize the message header.
+ * GB_REQUEST_TYPE_INVALID. Such buffers will be overwritten by
+ * arriving data so there's no need to initialize the message header.
*/
- if (type != GB_OPERATION_TYPE_INVALID) {
+ if (type != GB_REQUEST_TYPE_INVALID) {
u16 message_size = (u16)(sizeof(*header) + payload_size);
/*
size_t response_size, unsigned long flags,
gfp_t gfp)
{
- if (WARN_ON_ONCE(type == GB_OPERATION_TYPE_INVALID))
+ if (WARN_ON_ONCE(type == GB_REQUEST_TYPE_INVALID))
return NULL;
if (WARN_ON_ONCE(type & GB_MESSAGE_TYPE_RESPONSE))
type &= ~GB_MESSAGE_TYPE_RESPONSE;
flags |= GB_OPERATION_FLAG_UNIDIRECTIONAL;
operation = gb_operation_create_common(connection, type,
- request_size, 0, flags, GFP_ATOMIC);
+ request_size,
+ GB_REQUEST_TYPE_INVALID,
+ flags, GFP_ATOMIC);
if (!operation)
return NULL;
/* The default amount of time a request is given to complete */
#define GB_OPERATION_TIMEOUT_DEFAULT 1000 /* milliseconds */
-/*
- * No protocol may define an operation that has numeric value 0x00.
- * It is reserved as an explicitly invalid value.
- */
-#define GB_OPERATION_TYPE_INVALID ((u8)0x00)
-
/*
* The top bit of the type in an operation message header indicates
* whether the message is a request (bit clear) or response (bit set)