From 4f265fa013a87d6cb960c33f0255bc58b915b5b2 Mon Sep 17 00:00:00 2001 From: nuttxs Date: Tue, 10 Oct 2023 16:53:49 +0800 Subject: [PATCH] esp32s3: fix the halt issue when esp32s3 wlan has high-speed or long time data transmission. The spin_lock in the wlan_recvframe() function that receives RX data packets from the wireless network card and the critical section lock in the iob_remove_queue() processing are nested, which causes the interrupt to be disabled for a longer period of time, resulting in a risk of deadlock. --- arch/xtensa/src/esp32s3/esp32s3_wlan.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/xtensa/src/esp32s3/esp32s3_wlan.c b/arch/xtensa/src/esp32s3/esp32s3_wlan.c index a7c43423eeec5..c96994e63db65 100644 --- a/arch/xtensa/src/esp32s3/esp32s3_wlan.c +++ b/arch/xtensa/src/esp32s3/esp32s3_wlan.c @@ -296,14 +296,9 @@ static inline void wlan_cache_txpkt_tail(struct wlan_priv_s *priv) static struct iob_s *wlan_recvframe(struct wlan_priv_s *priv) { struct iob_s *iob; - irqstate_t flags; - - flags = spin_lock_irqsave(&priv->lock); iob = iob_remove_queue(&priv->rxb); - spin_unlock_irqrestore(&priv->lock, flags); - return iob; }