Skip to content

Commit

Permalink
net: Add Qualcomm IPC router
Browse files Browse the repository at this point in the history
Add an implementation of Qualcomm's IPC router protocol, used to
communicate with service providing remote processors.

Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
[bjorn: Cope with 0 being a valid node id and implement RTM_NEWADDR]
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
courtc authored and davem330 committed May 9, 2016
1 parent 43315f3 commit bdabad3
Show file tree
Hide file tree
Showing 9 changed files with 1,198 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,9 @@ struct ucred {
#define AF_NFC 39 /* NFC sockets */
#define AF_VSOCK 40 /* vSockets */
#define AF_KCM 41 /* Kernel Connection Multiplexor*/
#define AF_QIPCRTR 42 /* Qualcomm IPC Router */

#define AF_MAX 42 /* For now.. */
#define AF_MAX 43 /* For now.. */

/* Protocol families, same as address families. */
#define PF_UNSPEC AF_UNSPEC
Expand Down Expand Up @@ -249,6 +250,7 @@ struct ucred {
#define PF_NFC AF_NFC
#define PF_VSOCK AF_VSOCK
#define PF_KCM AF_KCM
#define PF_QIPCRTR AF_QIPCRTR
#define PF_MAX AF_MAX

/* Maximum queue length specifiable by listen. */
Expand Down
12 changes: 12 additions & 0 deletions include/uapi/linux/qrtr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef _LINUX_QRTR_H
#define _LINUX_QRTR_H

#include <linux/socket.h>

struct sockaddr_qrtr {
__kernel_sa_family_t sq_family;
__u32 sq_node;
__u32 sq_port;
};

#endif /* _LINUX_QRTR_H */
1 change: 1 addition & 0 deletions net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ source "net/mpls/Kconfig"
source "net/hsr/Kconfig"
source "net/switchdev/Kconfig"
source "net/l3mdev/Kconfig"
source "net/qrtr/Kconfig"

config RPS
bool
Expand Down
1 change: 1 addition & 0 deletions net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ endif
ifneq ($(CONFIG_NET_L3_MASTER_DEV),)
obj-y += l3mdev/
endif
obj-$(CONFIG_QRTR) += qrtr/
24 changes: 24 additions & 0 deletions net/qrtr/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Qualcomm IPC Router configuration
#

config QRTR
tristate "Qualcomm IPC Router support"
depends on ARCH_QCOM || COMPILE_TEST
---help---
Say Y if you intend to use Qualcomm IPC router protocol. The
protocol is used to communicate with services provided by other
hardware blocks in the system.

In order to do service lookups, a userspace daemon is required to
maintain a service listing.

if QRTR

config QRTR_SMD
tristate "SMD IPC Router channels"
depends on QCOM_SMD || COMPILE_TEST
---help---
Say Y here to support SMD based ipcrouter channels. SMD is the
most common transport for IPC Router.

endif # QRTR
2 changes: 2 additions & 0 deletions net/qrtr/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
obj-$(CONFIG_QRTR) := qrtr.o
obj-$(CONFIG_QRTR_SMD) += smd.o
Loading

0 comments on commit bdabad3

Please sign in to comment.