Openwrt/target/linux/bcm47xx/patches-5.4/999-wl_exports.patch
Sungbo Eo 6ea87d35c6 bcm47xx: fix brcm-wl module loading
_dma_cache_wback_inv needs to be exported to load wl module successfully.

root@OpenWrt:/# insmod wl
[  363.867779] wl: Unknown symbol _dma_cache_wback_inv (err -2)
failed to insert /lib/modules/5.4.40/wl.ko

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Cc: Rafał Miłecki <rafal@milecki.pl>
2020-06-03 16:49:28 +02:00

25 lines
762 B
Diff

--- a/drivers/firmware/broadcom/bcm47xx_nvram.c
+++ b/drivers/firmware/broadcom/bcm47xx_nvram.c
@@ -30,7 +30,8 @@ struct nvram_header {
u32 config_ncdl; /* ncdl values for memc */
};
-static char nvram_buf[NVRAM_SPACE];
+char nvram_buf[NVRAM_SPACE];
+EXPORT_SYMBOL(nvram_buf);
static size_t nvram_len;
static const u32 nvram_sizes[] = {0x6000, 0x8000, 0xF000, 0x10000};
static int cfe_env;
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -62,6 +62,9 @@ void (*_dma_cache_wback_inv)(unsigned lo
void (*_dma_cache_wback)(unsigned long start, unsigned long size);
void (*_dma_cache_inv)(unsigned long start, unsigned long size);
+EXPORT_SYMBOL(_dma_cache_wback_inv);
+EXPORT_SYMBOL(_dma_cache_inv);
+
#endif /* CONFIG_DMA_NONCOHERENT */
/*