mac80211: rebase ontop of v4.18.5
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / ath / 921-ath10k_init_devices_synchronously.patch
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
5 OpenWrt requires all PHYs to be initialized to create the configuration files
6 during bootup. ath10k violates this because it delays the creation of the PHY
7 to a not well defined point in the future.
8
9 Forcing the work to be done immediately works around this problem but may also
10 delay the boot when firmware images cannot be found.
11
12 Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
13 ---
14
15 --- a/drivers/net/wireless/ath/ath10k/core.c
16 +++ b/drivers/net/wireless/ath/ath10k/core.c
17 @@ -2507,6 +2507,16 @@ int ath10k_core_register(struct ath10k *
18 ar->chip_id = chip_id;
19 queue_work(ar->workqueue, &ar->register_work);
20
21 + /* OpenWrt requires all PHYs to be initialized to create the
22 + * configuration files during bootup. ath10k violates this
23 + * because it delays the creation of the PHY to a not well defined
24 + * point in the future.
25 + *
26 + * Forcing the work to be done immediately works around this problem
27 + * but may also delay the boot when firmware images cannot be found.
28 + */
29 + flush_workqueue(ar->workqueue);
30 +
31 return 0;
32 }
33 EXPORT_SYMBOL(ath10k_core_register);