On 17/06/2014 19:06, Ben Mulvihill wrote: > Changeset 40948 restored an older (and uglier!) version of the code > for reading the athxk calibration partition on lantiq xway boards. > As a result pci fixups stored in this partition are no longer > applied, breaking wireless on the BTHOMEHUBV2B and (I imagine) on > the DGN3500. This is a minimal patch to restore this functionality > for ath9k without reverting any of the other changes in changeset > 40948. > > Note for John Crispin: I guess you won't want to apply this patch > if you are planning to check changeset 40948 anyway yourself. I > produced it for my own use and thought I might as well send it in > in case it was any use to anyone. > > Ben Mulvihill
thanks for looking into this. looks like you picked up the missing pieces. i am building a test image just now with this patch applied on top of trunk. i managed to find a dgn3500 last night and will pick it up in an hour. if this work, i will simply merge your patch and hope that all boards are now working. once BB is out the door i will rework this code and make it aligned with the eep loading code used on ralink/mtk. John > > > --- a/arch/mips/lantiq/xway/ath_eep.c 2014-06-16 12:10:10.413893209 > +0200 +++ b/arch/mips/lantiq/xway/ath_eep.c 2014-06-16 > 12:10:26.366264625 +0200 @@ -35,6 +35,7 @@ static int > ath9k_pci_plat_dev_init(struc 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; @@ -117,6 +118,13 @@ int __init > of_ath9k_eeprom_probe(struct 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"); @@ -139,9 +147,22 @@ > static struct platform_driver ath9k_eepr > > static int __init of_ath9k_eeprom_init(void) { - return > platform_driver_probe(&ath9k_eeprom_driver, > of_ath9k_eeprom_probe); + int ret = > platform_driver_probe(&ath9k_eeprom_driver, > of_ath9k_eeprom_probe); + + if (ret) + > ath9k_eep_load = 1; + + return ret; +} + +static int __init > of_ath9k_eeprom_init_late(void) +{ + if (!ath9k_eep_load) + > return 0; + return > platform_driver_probe(&ath9k_eeprom_driver, > of_ath9k_eeprom_probe); } -arch_initcall(of_ath9k_eeprom_init); > +late_initcall(of_ath9k_eeprom_init_late); > +subsys_initcall(of_ath9k_eeprom_init); > > > static int ath5k_pci_plat_dev_init(struct pci_dev *dev) > _______________________________________________ openwrt-devel > mailing list openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel