From 6e81f891c602c97eee65a8dbe219ff0cec27a728 Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Fri, 8 Apr 2022 11:57:15 +0200 Subject: [PATCH] modem: ublox-sara-r4: use NET_SOCKETS_OFFLOAD_PRIORITY Use configurable NET_SOCKETS_OFFLOAD_PRIORITY instead of hardcoded value in the driver itself. This allows to select relative priority of offloaded TLS versus native TLS when used together with NET_SOCKETS_TLS_PRIORITY. Drop the build assert, as always prioritizing offloaded TLS over native TLS should be application developer choice. Signed-off-by: Marcin Niestroj --- drivers/modem/ublox-sara-r4.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/modem/ublox-sara-r4.c b/drivers/modem/ublox-sara-r4.c index 912749169db..97f31eb1403 100644 --- a/drivers/modem/ublox-sara-r4.c +++ b/drivers/modem/ublox-sara-r4.c @@ -1951,12 +1951,7 @@ static bool offload_is_supported(int family, int type, int proto) return true; } -#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, +NET_SOCKET_REGISTER(ublox_sara_r4, CONFIG_NET_SOCKETS_OFFLOAD_PRIORITY, AF_UNSPEC, offload_is_supported, offload_socket); #if defined(CONFIG_DNS_RESOLVER)