Skip to content

Commit

Permalink
esp32s3: fix the halt issue when esp32s3 wlan has high-speed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nuttxs authored and xiaoxiang781216 committed Oct 12, 2023
1 parent c166c98 commit 3d6e893
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions arch/xtensa/src/esp32s3/esp32s3_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3d6e893

Please sign in to comment.