drivers: modem: sara-r4: use +USO[RF|RD] based on proto

Regardless of whether from is set, let's use the correct socket read
commands for UDP and TCP.

Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
Michael Scott 2020-02-04 22:34:07 -08:00 committed by Jukka Rissanen
commit b6b4396c48

View file

@ -1138,7 +1138,7 @@ static ssize_t offload_recvfrom(void *obj, void *buf, size_t len,
}
snprintk(sendbuf, sizeof(sendbuf), "AT+USO%s=%d,%d",
from ? "RF" : "RD", sock->id,
sock->ip_proto == IPPROTO_UDP ? "RF" : "RD", sock->id,
len < next_packet_size ? len : next_packet_size);
/* socket read settings */