Skip to content

Commit bdabad3

Browse files
courtcdavem330
authored andcommitted
net: Add Qualcomm IPC router
Add an implementation of Qualcomm's IPC router protocol, used to communicate with service providing remote processors. Signed-off-by: Courtney Cavin <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> [bjorn: Cope with 0 being a valid node id and implement RTM_NEWADDR] Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 43315f3 commit bdabad3

File tree

9 files changed

+1198
-1
lines changed

9 files changed

+1198
-1
lines changed

include/linux/socket.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ struct ucred {
201201
#define AF_NFC 39 /* NFC sockets */
202202
#define AF_VSOCK 40 /* vSockets */
203203
#define AF_KCM 41 /* Kernel Connection Multiplexor*/
204+
#define AF_QIPCRTR 42 /* Qualcomm IPC Router */
204205

205-
#define AF_MAX 42 /* For now.. */
206+
#define AF_MAX 43 /* For now.. */
206207

207208
/* Protocol families, same as address families. */
208209
#define PF_UNSPEC AF_UNSPEC
@@ -249,6 +250,7 @@ struct ucred {
249250
#define PF_NFC AF_NFC
250251
#define PF_VSOCK AF_VSOCK
251252
#define PF_KCM AF_KCM
253+
#define PF_QIPCRTR AF_QIPCRTR
252254
#define PF_MAX AF_MAX
253255

254256
/* Maximum queue length specifiable by listen. */

include/uapi/linux/qrtr.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef _LINUX_QRTR_H
2+
#define _LINUX_QRTR_H
3+
4+
#include <linux/socket.h>
5+
6+
struct sockaddr_qrtr {
7+
__kernel_sa_family_t sq_family;
8+
__u32 sq_node;
9+
__u32 sq_port;
10+
};
11+
12+
#endif /* _LINUX_QRTR_H */

net/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ source "net/mpls/Kconfig"
236236
source "net/hsr/Kconfig"
237237
source "net/switchdev/Kconfig"
238238
source "net/l3mdev/Kconfig"
239+
source "net/qrtr/Kconfig"
239240

240241
config RPS
241242
bool

net/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,4 @@ endif
7878
ifneq ($(CONFIG_NET_L3_MASTER_DEV),)
7979
obj-y += l3mdev/
8080
endif
81+
obj-$(CONFIG_QRTR) += qrtr/

net/qrtr/Kconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Qualcomm IPC Router configuration
2+
#
3+
4+
config QRTR
5+
tristate "Qualcomm IPC Router support"
6+
depends on ARCH_QCOM || COMPILE_TEST
7+
---help---
8+
Say Y if you intend to use Qualcomm IPC router protocol. The
9+
protocol is used to communicate with services provided by other
10+
hardware blocks in the system.
11+
12+
In order to do service lookups, a userspace daemon is required to
13+
maintain a service listing.
14+
15+
if QRTR
16+
17+
config QRTR_SMD
18+
tristate "SMD IPC Router channels"
19+
depends on QCOM_SMD || COMPILE_TEST
20+
---help---
21+
Say Y here to support SMD based ipcrouter channels. SMD is the
22+
most common transport for IPC Router.
23+
24+
endif # QRTR

net/qrtr/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj-$(CONFIG_QRTR) := qrtr.o
2+
obj-$(CONFIG_QRTR_SMD) += smd.o

0 commit comments

Comments
 (0)