diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c b/boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c index 9d3229bc85..38b626ffcf 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c @@ -123,16 +123,7 @@ static void gs2200m_irq_enable(void) wlinfo("== ec:%d called=%d \n", _enable_count, _n_called++); - if (1 == _enable_count) - { - /* NOTE: This would happen if we received an event */ - - return; - } - - _enable_count++; - - if (1 == _enable_count) + if (0 == _enable_count) { /* Check if irq has been asserted */ @@ -144,6 +135,8 @@ static void gs2200m_irq_enable(void) true, g_irq_handler, g_irq_arg); } + _enable_count++; + spin_unlock_irqrestore(flags); if (dready)