diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2016-07-23 14:20:53 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-07-25 10:38:48 +0200 |
commit | 3f506bdbb08c0062cbbeac3c9409e479293493d3 (patch) | |
tree | ded13d33366b25436e5eb46edae3abe6083154c6 /target/linux/apm821xx/files | |
parent | 08257a40530df36528fb2916fe8cf4ecddc526eb (diff) | |
download | mtk-20170518-3f506bdbb08c0062cbbeac3c9409e479293493d3.zip mtk-20170518-3f506bdbb08c0062cbbeac3c9409e479293493d3.tar.gz mtk-20170518-3f506bdbb08c0062cbbeac3c9409e479293493d3.tar.bz2 |
apm821xx: fix atheros PCIe cards on the MR24
The consolidation of the MR24 and WNDR4700 subtargets
into the nand subtarget broke MR24's atheros wlan.
This was because the wndr4700's board code used a
pci_fixup routines to supply the ath9k module with
the calibration data.
This is not necessary on the MR24 as it has standard
mini-pcie ports. Hence the two AR9380 mini-pcie cards
do not need any calibration data overrides.
Cc: chrisrblake93@gmail.com
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/files')
-rw-r--r-- | target/linux/apm821xx/files/arch/powerpc/platforms/44x/wndr4700.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/target/linux/apm821xx/files/arch/powerpc/platforms/44x/wndr4700.c b/target/linux/apm821xx/files/arch/powerpc/platforms/44x/wndr4700.c index 975ac46..f50f43f 100644 --- a/target/linux/apm821xx/files/arch/powerpc/platforms/44x/wndr4700.c +++ b/target/linux/apm821xx/files/arch/powerpc/platforms/44x/wndr4700.c @@ -82,15 +82,18 @@ static struct ath9k_platform_data ar9580_wmac1_data = { .eeprom_name = "pci_wmac0.eeprom", }; -static void load_eeprom_ar9380(struct pci_dev *dev) +static int __init wndr4700_ath9k_eeprom_load(void) { - dev->dev.platform_data = &ar9380_wmac0_data; -} + struct pci_dev *dev; -static void load_eeprom_ar9580(struct pci_dev *dev) -{ - dev->dev.platform_data = &ar9580_wmac1_data; -} + dev = pci_get_device(PCI_VENDOR_ID_ATHEROS, 0x0030, NULL); + if (dev) + dev->dev.platform_data = &ar9380_wmac0_data; -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, 0x0030, load_eeprom_ar9380); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, 0x0033, load_eeprom_ar9580); + dev = pci_get_device(PCI_VENDOR_ID_ATHEROS, 0x0033, NULL); + if (dev) + dev->dev.platform_data = &ar9580_wmac1_data; + + return 0; +} +machine_device_initcall(wndr4700, wndr4700_ath9k_eeprom_load); |