Author: jogo
Date: 2014-08-11 13:36:41 +0200 (Mon, 11 Aug 2014)
New Revision: 42118

Modified:
   trunk/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch
Log:
brcm63xx: correctly export fallback sprom for brcm-wl

Signed-off-by: ?\195?\129lvaro Fern?\195?\161ndez Rojas <[email protected]>

Modified: 
trunk/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch
===================================================================
--- 
trunk/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch    
    2014-08-11 11:36:38 UTC (rev 42117)
+++ 
trunk/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch    
    2014-08-11 11:36:41 UTC (rev 42118)
@@ -8,13 +8,24 @@
  #include <linux/kernel.h>
  #include <linux/string.h>
  #include <linux/platform_device.h>
-@@ -387,7 +388,8 @@ struct fallback_sprom_match {
+@@ -387,7 +388,19 @@ struct fallback_sprom_match {
        struct ssb_sprom sprom;
  };
  
 -static struct fallback_sprom_match fallback_sprom;
 +struct fallback_sprom_match fallback_sprom;
-+EXPORT_SYMBOL(fallback_sprom);
++
++int bcm63xx_get_fallback_sprom(uint pci_bus, uint pci_slot, struct ssb_sprom 
*out)
++{
++      if (pci_bus != fallback_sprom.pci_bus ||
++          pci_slot != fallback_sprom.pci_dev)
++              pr_warn("fallback_sprom: pci bus/device num mismatch: expected 
%i/%i, but got %i/%i\n",
++                      fallback_sprom.pci_bus, fallback_sprom.pci_dev,
++                      pci_bus, pci_slot);
++      memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom));
++      return 0;
++}
++EXPORT_SYMBOL(bcm63xx_get_fallback_sprom);
  
  #if defined(CONFIG_SSB_PCIHOST)
  int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to