Skip to content

Commit

Permalink
drivers: modem: Fix UDP management in BG96 modem
Browse files Browse the repository at this point in the history
Fix UDP test in connect and send to be able to send in TCP

Signed-off-by: Guillaume Paquet <guillaume.paquet@smile.fr>
  • Loading branch information
Guillaume Paquet authored and jukkar committed Jan 15, 2021
1 parent a688b4d commit 6e7a2ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/modem/quectel-bg9x.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ static ssize_t offload_sendto(void *obj, const void *buf, size_t len,
}

/* UDP is not supported. */
if (sock->ip_proto != IPPROTO_UDP) {
if (sock->ip_proto == IPPROTO_UDP) {
errno = ENOTSUP;
return -1;
}
Expand Down Expand Up @@ -747,7 +747,7 @@ static int offload_connect(void *obj, const struct sockaddr *addr,
}

/* UDP is not supported. */
if (sock->ip_proto != IPPROTO_UDP) {
if (sock->ip_proto == IPPROTO_UDP) {
errno = ENOTSUP;
return -1;
}
Expand Down

0 comments on commit 6e7a2ec

Please sign in to comment.