net: use netdev_lock to protect netdev_txnotify_dev

since the type of sconn lock is rmutex, there is no need to release
sconn lock before TX

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu
2025-11-14 17:53:20 +08:00
committed by Xiang Xiao
parent eb5c8f4e9c
commit d377f6b788
20 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -403,13 +403,13 @@ ssize_t icmp_sendmsg(FAR struct socket *psock, FAR struct msghdr *msg,
/* Notify the device driver of the availability of TX data */
conn_dev_unlock(&conn->sconn, dev);
netdev_txnotify_dev(dev);
/* Wait for either the send to complete or for timeout to occur.
* net_sem_timedwait will also terminate if a signal is received.
*/
conn_dev_unlock(&conn->sconn, dev);
ret = net_sem_timedwait(&state.snd_sem,
_SO_TIMEOUT(conn->sconn.s_sndtimeo));
conn_dev_lock(&conn->sconn, dev);