921-ath10k_init_devices_synchronously.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From: Sven Eckelmann <sven@open-mesh.com>
  2. Date: Tue, 18 Nov 2014 12:29:28 +0100
  3. Subject: [PATCH] ath10k: Don't initialize devices asynchronously
  4. OpenWrt requires all PHYs to be initialized to create the configuration files
  5. during bootup. ath10k violates this because it delays the creation of the PHY
  6. to a not well defined point in the future.
  7. Forcing the work to be done immediately works around this problem but may also
  8. delay the boot when firmware images cannot be found.
  9. Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
  10. ---
  11. --- a/drivers/net/wireless/ath/ath10k/core.c
  12. +++ b/drivers/net/wireless/ath/ath10k/core.c
  13. @@ -2009,6 +2009,16 @@ int ath10k_core_register(struct ath10k *
  14. ar->chip_id = chip_id;
  15. queue_work(ar->workqueue, &ar->register_work);
  16. + /* OpenWrt requires all PHYs to be initialized to create the
  17. + * configuration files during bootup. ath10k violates this
  18. + * because it delays the creation of the PHY to a not well defined
  19. + * point in the future.
  20. + *
  21. + * Forcing the work to be done immediately works around this problem
  22. + * but may also delay the boot when firmware images cannot be found.
  23. + */
  24. + flush_workqueue(ar->workqueue);
  25. +
  26. return 0;
  27. }
  28. EXPORT_SYMBOL(ath10k_core_register);