Skip to content

Commit cf44066

Browse files
Arend van Spriellinvjw
authored andcommitted
brcm80211: fmac: use spinlock calls saving irq flags in brcmf_enq_event()
This function is executed within irq context. The call spin_unlock_irq does enable interrupts which is not desired in the irq context. This patch replaces them using the spin_loc_irqsave and spin_unlock_irqrestore functions. Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Kan Yan <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent bcbec9e commit cf44066

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3308,6 +3308,7 @@ brcmf_enq_event(struct brcmf_cfg80211_priv *cfg_priv, u32 event,
33083308
{
33093309
struct brcmf_cfg80211_event_q *e;
33103310
s32 err = 0;
3311+
ulong flags;
33113312

33123313
e = kzalloc(sizeof(struct brcmf_cfg80211_event_q), GFP_ATOMIC);
33133314
if (!e)
@@ -3316,9 +3317,9 @@ brcmf_enq_event(struct brcmf_cfg80211_priv *cfg_priv, u32 event,
33163317
e->etype = event;
33173318
memcpy(&e->emsg, msg, sizeof(struct brcmf_event_msg));
33183319

3319-
spin_lock_irq(&cfg_priv->evt_q_lock);
3320+
spin_lock_irqsave(&cfg_priv->evt_q_lock, flags);
33203321
list_add_tail(&e->evt_q_list, &cfg_priv->evt_q_list);
3321-
spin_unlock_irq(&cfg_priv->evt_q_lock);
3322+
spin_unlock_irqrestore(&cfg_priv->evt_q_lock, flags);
33223323

33233324
return err;
33243325
}

0 commit comments

Comments
 (0)