mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 12:57:57 +08:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user