lantiq: refresh patches
[openwrt/staging/mkresin.git] / target / linux / lantiq / patches-4.4 / 0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index 91a884d2ea0fe981e2befc18575180e97a53feed..7116b89230f57070173ae0a2b80a8b0912d9ee52 100644 (file)
@@ -51,7 +51,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o
 --- /dev/null
 +++ b/arch/mips/lantiq/xway/ath_eep.c
-@@ -0,0 +1,298 @@
+@@ -0,0 +1,307 @@
 +/*
 + *  Copyright (C) 2011 Luca Olivetti <luca@ventoso.org>
 + *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
@@ -104,6 +104,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      const __be32 *list;
 +      const char *part;
 +      phandle phandle;
++      u16 dev_ids[2] = { 0 };
 +
 +      if ((list = of_get_property(np, "ath,eep-flash", &i)) && i == 2 *
 +                      sizeof(*list) && (phandle = be32_to_cpup(list++)) &&
@@ -188,6 +189,14 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
 +      }
 +
++      if (!of_property_read_u16_array(np, "ath,device-id", dev_ids, 2)) {
++              struct pci_dev *d = NULL;
++
++              while ((d = pci_get_device(PCI_VENDOR_ID_ATHEROS,
++                                         dev_ids[0], d)) != NULL)
++                      d->device = dev_ids[1];
++      }
++
 +      if (!of_property_read_u32(np, "ath,led-pin", &led_pin)) {
 +              ath9k_pdata.led_pin = led_pin;
 +              dev_info(&pdev->dev, "using led pin %d.\n", led_pin);