summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-10-12 01:28:39 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-12 01:28:39 +0300
commitc7c64bca62f35351cf033a1dcea05cba522200a2 (patch)
treec067940c5ffd99874b625013c724aad2fb69ca8a /include
parent7822b0836d2121d7de3d0f9ec636338d7496e5dc (diff)
parent194ccc88297ae78d0803adad83c6dcc369787c9e (diff)
downloadlinux-c7c64bca62f35351cf033a1dcea05cba522200a2.tar.xz
Merge branch 'qrtr-Fixes-and-support-receiving-version-2-packets'
Bjorn Andersson says: ==================== net: qrtr: Fixes and support receiving version 2 packets On the latest Qualcomm platforms remote processors are sending packets with version 2 of the message header. This series starts off with some fixes and then refactors the qrtr code to support receiving messages of both version 1 and version 2. As all remotes are backwards compatible transmitted packets continues to be send as version 1, but some groundwork has been done to make this a per-link property. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/qrtr.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/uapi/linux/qrtr.h b/include/uapi/linux/qrtr.h
index 9d76c566f66e..179af64846e0 100644
--- a/include/uapi/linux/qrtr.h
+++ b/include/uapi/linux/qrtr.h
@@ -4,10 +4,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 */