From 38eed4a49ed25e91a81b45472c76bd96d868aca1 Mon Sep 17 00:00:00 2001 From: Emil Lindqvist Date: Thu, 4 Nov 2021 14:03:34 +0100 Subject: [PATCH] sara-r4: increase socket processing prio Higher socket processing prio is required for offloaded sockets. Resolves #40074 Signed-off-by: Emil Lindqvist --- drivers/modem/ublox-sara-r4.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/modem/ublox-sara-r4.c b/drivers/modem/ublox-sara-r4.c index 4caf703155..908fa1ea79 100644 --- a/drivers/modem/ublox-sara-r4.c +++ b/drivers/modem/ublox-sara-r4.c @@ -1973,7 +1973,12 @@ static bool offload_is_supported(int family, int type, int proto) return true; } -NET_SOCKET_REGISTER(ublox_sara_r4, NET_SOCKET_DEFAULT_PRIO, AF_UNSPEC, +#define SARA_R4_SOCKET_PRIORITY 40 + +BUILD_ASSERT(SARA_R4_SOCKET_PRIORITY < CONFIG_NET_SOCKETS_TLS_PRIORITY, + "SARA_R4_SOCKET_PRIORITY must be < than NET_SOCKETS_TLS_PRIORITY"); + +NET_SOCKET_REGISTER(ublox_sara_r4, SARA_R4_SOCKET_PRIORITY, AF_UNSPEC, offload_is_supported, offload_socket); #if defined(CONFIG_DNS_RESOLVER)