From 16e5bff46674d62d55f874e0e107599fd1938c26 Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Thu, 12 Jan 2017 13:20:27 -0600 Subject: 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 --- linux/include/net/rpmsg.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 #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 */ -- cgit v1.2.3