drivers: modem: sara-r4: dont unblock on sockread
Users may be waiting for data via socket recv() function. We notify them that data is ready when URC is received from modem. Once unblocked, we read the data from the modem buffer which is handled via on_cmd_sockread_common(). At this point, we don't need to unblock waiting users again. Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
parent
1f68802899
commit
ba34136581
|
@ -528,14 +528,6 @@ static void on_cmd_sockread_common(int socket_id,
|
|||
/* remove packet from list (ignore errors) */
|
||||
ret = modem_socket_packet_size_update(&mdata.socket_config, sock,
|
||||
-socket_data_length);
|
||||
if (ret > 0) {
|
||||
/* unblock sockets waiting on recv() */
|
||||
k_sem_give(&sock->sem_data_ready);
|
||||
if (sock->is_polled) {
|
||||
/* unblock poll() */
|
||||
k_sem_give(&mdata.socket_config.sem_poll);
|
||||
}
|
||||
}
|
||||
|
||||
/* don't give back semaphore -- OK to follow */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue