diff options
author | Jonas Gorski <jogo@openwrt.org> | 2014-08-11 11:36:41 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2014-08-11 11:36:41 +0000 |
commit | 647c40e6dc9394fd6ba09cbef53c345f714f8bcf (patch) | |
tree | d0887c8e21c07176f3e00573b66c129de34052a9 /target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch | |
parent | 2e6a1f011069e28d4092cc251306dac631bf54a5 (diff) | |
download | master-187ad058-647c40e6dc9394fd6ba09cbef53c345f714f8bcf.tar.gz master-187ad058-647c40e6dc9394fd6ba09cbef53c345f714f8bcf.tar.bz2 master-187ad058-647c40e6dc9394fd6ba09cbef53c345f714f8bcf.zip |
brcm63xx: correctly export fallback sprom for brcm-wl
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42118 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch b/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch index 4acf40d627..11a83536b7 100644 --- a/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch +++ b/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch @@ -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) |