summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2017-01-12 13:20:27 -0600
committerAngela Stegmaier <angelabaker@ti.com>2017-01-19 11:19:33 -0600
commit16e5bff46674d62d55f874e0e107599fd1938c26 (patch)
treedf71eac1d49242113894432f77e8dec66ccba3b4
parent55d78d9bf7b26bb6562288f063aba1b073d9ad46 (diff)
downloadipc-16e5bff46674d62d55f874e0e107599fd1938c26.tar.gz
Linux: Update user AF_RPMSG define for 4.7+ kernels
IPC's Linux user space support contains a copy of a few kernel-defined structs and definitions including the socket address family used for rpmsg-based sockets - AF_RPMSG. This definition is always 'one more' than the last address family defined by the mainline kernel's socket.h. Prior to Linux 3.9, this was aways 40. Couple of new address families were introduced in 4.6 (AF_KCM) and 4.7 (AF_QIPCRTR), and as a result, we needed to set AF_RPMSG to 43 post 4.7 kernel. The user space header has been updated to reflect on the kernel version and appropriately assign the value of AF_RPMSG. Do note that a specific value of AF_RPMSG can always be provided through the products.mak when KERNEL_INSTALL_DIR is not set. Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r--linux/include/net/rpmsg.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux/include/net/rpmsg.h b/linux/include/net/rpmsg.h
index 3afb835..a545220 100644
--- a/linux/include/net/rpmsg.h
+++ b/linux/include/net/rpmsg.h
@@ -44,8 +44,12 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
#define AF_RPMSG 40
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0)
#define AF_RPMSG 41
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+#define AF_RPMSG 42
+#else
+#define AF_RPMSG 43
#endif /* LINUX_VERSION_CODE */
#endif /* AF_RPMSG */