If MSI isn't configured device ROM program expects
legacy interrupts to be enabled before it can
fully boot. Don't forget to disable legacy
interrupts after that.
While at it re-use the legacy irq enabling helper
instead of calling ath10k_pci_write32().
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
 
                if (ar_pci->num_msi_intrs == 0)
                        /* Fix potential race by repeating CORE_BASE writes */
-                       ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS +
-                                          PCIE_INTR_ENABLE_ADDRESS,
-                                          PCIE_INTR_FIRMWARE_MASK |
-                                          PCIE_INTR_CE_MASK_ALL);
+                       ath10k_pci_enable_legacy_irq(ar);
 
                mdelay(10);
        } while (time_before(jiffies, timeout));
 
+       ath10k_pci_disable_and_clear_legacy_irq(ar);
+
        if (val == 0xffffffff) {
                ath10k_err(ar, "failed to read device register, device is gone\n");
                return -EIO;