From 97c0b43d86ede4574b241268f37d936265ef0fe0 Mon Sep 17 00:00:00 2001 From: Filipe Cavalcanti Date: Tue, 17 Dec 2024 13:50:57 -0300 Subject: [PATCH] arch/risc-v/espressif: add missing spinlock to wlan_recvframe --- arch/risc-v/src/common/espressif/esp_wlan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/risc-v/src/common/espressif/esp_wlan.c b/arch/risc-v/src/common/espressif/esp_wlan.c index 231cfab461..dc0d879a46 100644 --- a/arch/risc-v/src/common/espressif/esp_wlan.c +++ b/arch/risc-v/src/common/espressif/esp_wlan.c @@ -321,8 +321,11 @@ 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; }