diff options
-rw-r--r-- | bsps/shared/grlib/spw/grspw_pkt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bsps/shared/grlib/spw/grspw_pkt.c b/bsps/shared/grlib/spw/grspw_pkt.c index 2cc4e886d6..ca8767eeae 100644 --- a/bsps/shared/grlib/spw/grspw_pkt.c +++ b/bsps/shared/grlib/spw/grspw_pkt.c @@ -655,7 +655,7 @@ void grspw_hw_support(void *d, struct grspw_hw_sup *hw) void grspw_addr_ctrl(void *d, struct grspw_addr_config *cfg) { struct grspw_priv *priv = d; - struct grspw_regs *regs = priv->regs; + struct grspw_regs *regs; unsigned int ctrl, nodeaddr; SPIN_IRQFLAGS(irqflags); int i; @@ -663,6 +663,8 @@ void grspw_addr_ctrl(void *d, struct grspw_addr_config *cfg) if (!priv || !cfg) return; + regs = priv->regs; + SPIN_LOCK_IRQ(&priv->devlock, irqflags); if (cfg->promiscuous != -1) { |