diff --git a/drivers/modem/ublox-sara-r4.c b/drivers/modem/ublox-sara-r4.c index 97f31eb1403..c62cef4d933 100644 --- a/drivers/modem/ublox-sara-r4.c +++ b/drivers/modem/ublox-sara-r4.c @@ -1947,7 +1947,22 @@ static const struct socket_op_vtable offload_socket_fd_op_vtable = { static bool offload_is_supported(int family, int type, int proto) { - /* TODO offloading always enabled for now. */ + if (family != AF_INET && + family != AF_INET6) { + return false; + } + + if (type != SOCK_DGRAM && + type != SOCK_STREAM) { + return false; + } + + if (proto != IPPROTO_TCP && + proto != IPPROTO_UDP && + proto != IPPROTO_TLS_1_2) { + return false; + } + return true; }