mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 05:08:41 +08:00
arch/risc-v/espressif: add missing spinlock to wlan_recvframe
This commit is contained in:
parent
a7869bb28b
commit
97c0b43d86
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
static struct iob_s *wlan_recvframe(struct wlan_priv_s *priv)
|
||||||
{
|
{
|
||||||
struct iob_s *iob;
|
struct iob_s *iob;
|
||||||
|
irqstate_t flags;
|
||||||
|
|
||||||
|
flags = spin_lock_irqsave(&priv->lock);
|
||||||
iob = iob_remove_queue(&priv->rxb);
|
iob = iob_remove_queue(&priv->rxb);
|
||||||
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
|
|
||||||
return iob;
|
return iob;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue