mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
bcm53xx: sprom: prepare to support other hosttype-s
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44463 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -673,7 +673,14 @@ static int bcm47xx_sprom_init(struct bcma_bus *bus, struct ssb_sprom *out)
|
||||
if (!nvram_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
fill.prefix = of_get_property(np, "prefix", NULL);
|
||||
switch (bus->hosttype) {
|
||||
case BCMA_HOSTTYPE_SOC:
|
||||
fill.prefix = of_get_property(np, "prefix", NULL);
|
||||
break;
|
||||
default:
|
||||
pr_err("Unable to fill SPROM for given hosttype.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
fill.fallback = false;
|
||||
fill.getenv = bcm47xx_sprom_getenv;
|
||||
|
||||
Reference in New Issue
Block a user