diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-03-30 09:16:31 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-03-30 09:16:31 +0000 |
commit | 17c3930be856f6dcef608db6320db5e0264d585a (patch) | |
tree | c16745b584bf009b681dd85967cbc9d94381217d /target/linux/lantiq/patches-3.10/0202-lantiq_ath5k.patch | |
parent | 59cf39eb3d3cae94c61165b38f200640ec7a6c38 (diff) |
lantiq: fixup ath5k support
http://patchwork.openwrt.org/patch/4417/
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40323 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.10/0202-lantiq_ath5k.patch')
-rw-r--r-- | target/linux/lantiq/patches-3.10/0202-lantiq_ath5k.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.10/0202-lantiq_ath5k.patch b/target/linux/lantiq/patches-3.10/0202-lantiq_ath5k.patch new file mode 100644 index 0000000000..9806fbb7b7 --- /dev/null +++ b/target/linux/lantiq/patches-3.10/0202-lantiq_ath5k.patch @@ -0,0 +1,55 @@ +Index: linux-3.10.34/arch/mips/lantiq/xway/ath_eep.c +=================================================================== +--- linux-3.10.34.orig/arch/mips/lantiq/xway/ath_eep.c 2014-03-29 20:17:33.826386600 +0000 ++++ linux-3.10.34/arch/mips/lantiq/xway/ath_eep.c 2014-03-29 20:18:19.610387315 +0000 +@@ -36,6 +36,7 @@ + return 0; + } + ++static int ath9k_eep_load; + int __init of_ath9k_eeprom_probe(struct platform_device *pdev) + { + struct device_node *np = pdev->dev.of_node, *mtd_np; +@@ -112,6 +113,12 @@ + if (!of_property_read_u32(np, "ath,pci-slot", &pci_slot)) { + ltq_pci_ath_fixup(pci_slot, ath9k_pdata.eeprom_data); + dev_info(&pdev->dev, "pci slot: %u\n", pci_slot); ++ if (ath9k_eep_load) { ++ struct pci_dev *d = NULL; ++ while ((d = pci_get_device(PCI_VENDOR_ID_ATHEROS, ++ PCI_ANY_ID, d)) != NULL) ++ pci_fixup_device(pci_fixup_early, d); ++ } + } + + dev_info(&pdev->dev, "loaded ath9k eeprom\n"); +@@ -132,20 +139,19 @@ + }, + }; + +-static int ath9k_eep_loaded; + static int __init of_ath9k_eeprom_init(void) + { + int ret = platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe); + +- if (!ret) +- ath9k_eep_loaded = 1; ++ if (ret) ++ ath9k_eep_load = 1; + + return ret; + } + + static int __init of_ath9k_eeprom_init_late(void) + { +- if (ath9k_eep_loaded) ++ if (!ath9k_eep_load) + return 0; + return platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe); + } +@@ -247,4 +253,4 @@ + { + return platform_driver_probe(&ath5k_eeprom_driver, of_ath5k_eeprom_probe); + } +-device_initcall(of_ath5k_eeprom_init); ++subsys_initcall(of_ath5k_eeprom_init); |