When chip reset is done before the chip is checked if supported
there will be crash. Previous behaviour caused bootloops on
Archer C7 v1 units, this patch allows clean device boot without
excluding ath10k driver.

Signed-off-by: Tomislav Požega <pozega.tomis...@gmail.com>
---
 drivers/net/wireless/ath/ath10k/pci.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c 
b/drivers/net/wireless/ath/ath10k/pci.c
index e24403c..ec681da 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -3619,12 +3619,6 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
                goto err_deinit_irq;
        }
 
-       ret = ath10k_pci_chip_reset(ar);
-       if (ret) {
-               ath10k_err(ar, "failed to reset chip: %d\n", ret);
-               goto err_free_irq;
-       }
-
        bus_params.dev_type = ATH10K_DEV_TYPE_LL;
        bus_params.link_can_suspend = true;
        bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
@@ -3639,6 +3633,12 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
                goto err_free_irq;
        }
 
+       ret = ath10k_pci_chip_reset(ar);
+       if (ret) {
+               ath10k_err(ar, "failed to reset chip: %d\n", ret);
+               goto err_free_irq;
+       }
+
        ret = ath10k_core_register(ar, &bus_params);
        if (ret) {
                ath10k_err(ar, "failed to register driver core: %d\n", ret);
-- 
1.7.0.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to