blob: 79c642d07da4a5c4aed7fc3f132324b2249466ae [file] [log] [blame]
From 79ee6b65e04daca1e3884f83091a14a439133652 Mon Sep 17 00:00:00 2001
From: Eric Caruso <ejcaruso@chromium.org>
Date: Wed, 14 Mar 2018 14:15:09 -0700
Subject: [PATCH] BACKPORT: add qrtr header file
This is a userspace interface to Qualcomm IPC, which will be used
to talk to Qualcomm modems.
File copied from kernel tree at commit dbcd478f5237.
Change-Id: I797c8367ceb609fdb772c3f9b7912e0a72f5bc10
---
Brian: refreshed from commit dbcd478f5237, with delta against v4.14,
where qrtr.h exists
diff --git a/include/uapi/linux/qrtr.h b/include/uapi/linux/qrtr.h
index 5d9aab1f1893..f7e2fb3d752b 100644
--- a/include/uapi/linux/qrtr.h
+++ b/include/uapi/linux/qrtr.h
@@ -5,10 +5,45 @@
#include <linux/socket.h>
#include <linux/types.h>
+#define QRTR_NODE_BCAST 0xffffffffu
+#define QRTR_PORT_CTRL 0xfffffffeu
+
struct sockaddr_qrtr {
__kernel_sa_family_t sq_family;
__u32 sq_node;
__u32 sq_port;
};
+enum qrtr_pkt_type {
+ QRTR_TYPE_DATA = 1,
+ QRTR_TYPE_HELLO = 2,
+ QRTR_TYPE_BYE = 3,
+ QRTR_TYPE_NEW_SERVER = 4,
+ QRTR_TYPE_DEL_SERVER = 5,
+ QRTR_TYPE_DEL_CLIENT = 6,
+ QRTR_TYPE_RESUME_TX = 7,
+ QRTR_TYPE_EXIT = 8,
+ QRTR_TYPE_PING = 9,
+ QRTR_TYPE_NEW_LOOKUP = 10,
+ QRTR_TYPE_DEL_LOOKUP = 11,
+};
+
+struct qrtr_ctrl_pkt {
+ __le32 cmd;
+
+ union {
+ struct {
+ __le32 service;
+ __le32 instance;
+ __le32 node;
+ __le32 port;
+ } server;
+
+ struct {
+ __le32 node;
+ __le32 port;
+ } client;
+ };
+} __packed;
+
#endif /* _LINUX_QRTR_H */