wifi: ath11k: fix race due to setting ATH11K_FLAG_EXT_IRQ_ENABLED too early
[platform/kernel/linux-rpi.git] / drivers / net / wireless / ath / ath11k / pcic.c
index c630836..011cf5f 100644 (file)
@@ -460,8 +460,6 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
 {
        int i;
 
-       set_bit(ATH11K_FLAG_EXT_IRQ_ENABLED, &ab->dev_flags);
-
        for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) {
                struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
 
@@ -471,6 +469,8 @@ void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab)
                }
                ath11k_pcic_ext_grp_enable(irq_grp);
        }
+
+       set_bit(ATH11K_FLAG_EXT_IRQ_ENABLED, &ab->dev_flags);
 }
 EXPORT_SYMBOL(ath11k_pcic_ext_irq_enable);