diff options
author | John Crispin <john@openwrt.org> | 2013-06-21 16:54:37 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-06-21 16:54:37 +0000 |
commit | 4ebf19b48fafc8d94e14e4ba779969613b241a6a (patch) | |
tree | 9918f890a8915023b49ea30948beb5d048c333fa /package/broadcom-wl/patches | |
parent | 44b1688e6c7b4f16f7165fbd560e1183aef69090 (diff) | |
download | mtk-20170518-4ebf19b48fafc8d94e14e4ba779969613b241a6a.zip mtk-20170518-4ebf19b48fafc8d94e14e4ba779969613b241a6a.tar.gz mtk-20170518-4ebf19b48fafc8d94e14e4ba779969613b241a6a.tar.bz2 |
packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37007
Diffstat (limited to 'package/broadcom-wl/patches')
14 files changed, 0 insertions, 575 deletions
diff --git a/package/broadcom-wl/patches/003-compat-2.6.35.patch b/package/broadcom-wl/patches/003-compat-2.6.35.patch deleted file mode 100644 index 89b6653..0000000 --- a/package/broadcom-wl/patches/003-compat-2.6.35.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/driver/wl_linux.c -+++ b/driver/wl_linux.c -@@ -2082,7 +2082,11 @@ static void - _wl_set_multicast_list(struct net_device *dev) - { - wl_info_t *wl; -+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34) - struct dev_mc_list *mclist; -+#else -+ struct netdev_hw_addr *ha; -+#endif - int i; - - if (!dev) -@@ -2098,14 +2102,24 @@ _wl_set_multicast_list(struct net_device - wl->pub->allmulti = (dev->flags & IFF_ALLMULTI)? TRUE: FALSE; - - /* copy the list of multicasts into our private table */ -+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34) - for (i = 0, mclist = dev->mc_list; mclist && (i < dev->mc_count); - i++, mclist = mclist->next) { -+#else -+ i = 0; -+ netdev_for_each_mc_addr(ha, dev) { -+#endif - if (i >= MAXMULTILIST) { - wl->pub->allmulti = TRUE; - i = 0; - break; - } -+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34) - wl->pub->multicast[i] = *((struct ether_addr*) mclist->dmi_addr); -+#else -+ wl->pub->multicast[i] = *((struct ether_addr*) ha->addr); -+ i++; -+#endif - } - wl->pub->nmulticast = i; - wlc_set(wl->wlc, WLC_SET_PROMISC, (dev->flags & IFF_PROMISC)); diff --git a/package/broadcom-wl/patches/004-remove-pcmcia.patch b/package/broadcom-wl/patches/004-remove-pcmcia.patch deleted file mode 100644 index 36dda47..0000000 --- a/package/broadcom-wl/patches/004-remove-pcmcia.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/driver/include/linuxver.h -+++ b/driver/include/linuxver.h -@@ -111,7 +111,7 @@ typedef irqreturn_t(*FN_ISR) (int irq, v - #endif /* not SANDGATE2G */ - #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 67) */ - --#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) -+#if 0 - - #include <pcmcia/cs_types.h> - #include <pcmcia/cs.h> ---- a/driver/linux_osl.c -+++ b/driver/linux_osl.c -@@ -62,7 +62,7 @@ struct osl_info { - }; - - /* PCMCIA attribute space access macros */ --#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) -+#if 0 - struct pcmcia_dev { - dev_link_t link; /* PCMCIA device pointer */ - dev_node_t node; /* PCMCIA node structure */ diff --git a/package/broadcom-wl/patches/005-fix-mem-leak-on-unload.patch b/package/broadcom-wl/patches/005-fix-mem-leak-on-unload.patch deleted file mode 100644 index 41c246f..0000000 --- a/package/broadcom-wl/patches/005-fix-mem-leak-on-unload.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: George Kashperko <george@znau.edu.ua> - -Release nvram variables buffer. -Prevent block reserved by alloc_etherdev from being freed. -Signed-off-by: George Kashperko <george@znau.edu.ua> ---- ---- ---- a/driver/siutils.c -+++ b/driver/siutils.c -@@ -647,7 +647,10 @@ si_detach(si_t *sih) - #if !defined(BCMBUSTYPE) || (BCMBUSTYPE == SI_BUS) - if (sii != &ksii) - #endif /* !BCMBUSTYPE || (BCMBUSTYPE == SI_BUS) */ -- MFREE(sii->osh, sii, sizeof(si_info_t)); -+ do { -+ MFREE(sii->osh, sii, sizeof(si_info_t)); -+ nvram_exit((void *)&(sii->pub)); -+ } while (0); - } - - void * ---- a/driver/wl_linux.c -+++ b/driver/wl_linux.c -@@ -1477,7 +1477,6 @@ wl_free_if(wl_info_t *wl, wl_if_t *wlif) - free_netdev(wlif->dev); - #endif - } -- MFREE(wl->osh, wlif, sizeof(wl_if_t)); - } - - #ifdef AP diff --git a/package/broadcom-wl/patches/006-generic-dma-api.patch b/package/broadcom-wl/patches/006-generic-dma-api.patch deleted file mode 100644 index a90bbe1..0000000 --- a/package/broadcom-wl/patches/006-generic-dma-api.patch +++ /dev/null @@ -1,88 +0,0 @@ -From: George Kashperko <george@znau.edu.ua> - -broadcom-wl driver bound to ssb device with ssb driver probe -have osh handle struct pdev pointer value initialized with -ssb_device pointer. Later on pdev is used with legacy pci -dma api as pci_dev thus causing oops sometimes. - -The patch replaces legacy pci dma api and pass relevant -device struct pointer to avoid crashes. -Signed-off-by: George Kashperko <george@znau.edu.ua> ---- - driver/linux_osl.c | 28 +++++++++++++++++++++++----- - 1 file changed, 23 insertions(+), 5 deletions(-) ---- a/driver/linux_osl.c -+++ b/driver/linux_osl.c -@@ -25,6 +25,9 @@ - #include <asm/paccess.h> - #endif /* mips */ - #include <pcicfg.h> -+#ifdef CONFIG_SSB -+#include <linux/ssb/ssb.h> -+#endif - - #define PCI_CFG_RETRY 10 - -@@ -364,12 +367,27 @@ osl_dma_consistent_align(void) - return (PAGE_SIZE); - } - -+static struct device * -+osl_get_dmadev(osl_t *osh) -+{ -+#ifdef CONFIG_SSB -+ if (osh->bustype == SI_BUS) { -+ /* This can be SiliconBackplane emulated as pci with Broadcom or -+ * ssb device. Less harmful is to check for pci_bus_type and if -+ * no match then assume we got ssb */ -+ if (((struct pci_dev *)osh->pdev)->dev.bus != &pci_bus_type) -+ return ((struct ssb_device *)osh->pdev)->dma_dev; -+ } -+#endif -+ return &((struct pci_dev *)osh->pdev)->dev; -+} -+ - void* - osl_dma_alloc_consistent(osl_t *osh, uint size, ulong *pap) - { - ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); - -- return (pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap)); -+ return (dma_alloc_coherent(osl_get_dmadev(osh), size, (dma_addr_t*)pap, GFP_ATOMIC)); - } - - void -@@ -377,7 +395,7 @@ osl_dma_free_consistent(osl_t *osh, void - { - ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); - -- pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); -+ dma_free_coherent(osl_get_dmadev(osh), size, va, (dma_addr_t)pa); - } - - uint BCMFASTPATH -@@ -386,13 +404,13 @@ osl_dma_map(osl_t *osh, void *va, uint s - ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); - - if (direction == DMA_TX) -- return (pci_map_single(osh->pdev, va, size, PCI_DMA_TODEVICE)); -+ return (dma_map_single(osl_get_dmadev(osh), va, size, PCI_DMA_TODEVICE)); - else { - #ifdef mips - dma_cache_inv((uint)va, size); - return (virt_to_phys(va)); - #else /* mips */ -- return (pci_map_single(osh->pdev, va, size, PCI_DMA_FROMDEVICE)); -+ return (dma_map_single(osl_get_dmadev(osh), va, size, PCI_DMA_FROMDEVICE)); - #endif /* mips */ - } - } -@@ -404,7 +422,7 @@ osl_dma_unmap(osl_t *osh, uint pa, uint - - ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); - dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; -- pci_unmap_single(osh->pdev, (uint32)pa, size, dir); -+ dma_unmap_single(osl_get_dmadev(osh), (uint32)pa, size, dir); - } - - diff --git a/package/broadcom-wl/patches/007-use-glue-driver.patch b/package/broadcom-wl/patches/007-use-glue-driver.patch deleted file mode 100644 index 2639abc..0000000 --- a/package/broadcom-wl/patches/007-use-glue-driver.patch +++ /dev/null @@ -1,184 +0,0 @@ ---- a/driver/wl_linux.c -+++ b/driver/wl_linux.c -@@ -85,10 +85,9 @@ typedef void wlc_hw_info_t; - #include <bcmjtag.h> - #endif /* BCMJTAG */ - -- --#ifdef CONFIG_SSB --#include <linux/ssb/ssb.h> --#endif -+#if defined(CONFIG_SSB) || defined(CONFIG_BCMA) -+#include <wl_glue.h> -+#endif /* defined(CONFIG_SSB) || defined(CONFIG_BCMA) */ - - /* Linux wireless extension support */ - #ifdef CONFIG_WIRELESS_EXT -@@ -997,62 +996,32 @@ static struct pci_driver wl_pci_driver = - #endif /* CONFIG_PCI */ - #endif - -+#ifdef BCMJTAG -+static bcmjtag_driver_t wl_jtag_driver = { -+ wl_jtag_probe, -+ wl_jtag_detach, -+ wl_jtag_poll, -+ }; -+#endif /* BCMJTAG */ - --static int wl_ssb_probe(struct ssb_device *dev, const struct ssb_device_id *id) -+#if defined(CONFIG_SSB) || defined(CONFIG_BCMA) -+static void * glue_attach_cb(u16 vendor, u16 device, -+ ulong mmio, void *dev, u32 irq) - { -- wl_info_t *wl; -- void *mmio; -- -- if (dev->bus->bustype != SSB_BUSTYPE_SSB) { -- printk("Attaching to SSB behind PCI is not supported. Please remove the b43 ssb bridge\n"); -- return -EINVAL; -- } -- -- mmio = (void *) 0x18000000 + dev->core_index * 0x1000; -- wl = wl_attach(id->vendor, id->coreid, (ulong) mmio, SI_BUS, dev, dev->irq); -- if (!wl) { -- printk("wl_attach failed\n"); -- return -ENODEV; -- } -- -- ssb_set_drvdata(dev, wl); -- -- return 0; -+ return wl_attach(vendor, device, mmio, SI_BUS, dev, irq); - } - --static void wl_ssb_remove(struct ssb_device *dev) -+static void glue_remove_cb(void *wldev) - { -- wl_info_t *wl = (wl_info_t *) ssb_get_drvdata(dev); -+ wl_info_t *wl = (wl_info_t *)wldev; - - WL_LOCK(wl); - WL_APSTA_UPDN(("wl%d (%s): wl_remove() -> wl_down()\n", wl->pub->unit, wl->dev->name)); - wl_down(wl); - WL_UNLOCK(wl); - wl_free(wl); -- ssb_set_drvdata(dev, NULL); - } -- --static const struct ssb_device_id wl_ssb_tbl[] = { -- SSB_DEVICE(SSB_VENDOR_BROADCOM, SSB_DEV_80211, SSB_ANY_REV), -- SSB_DEVTABLE_END --}; -- --#ifdef CONFIG_SSB --static struct ssb_driver wl_ssb_driver = { -- .name = KBUILD_MODNAME, -- .id_table = wl_ssb_tbl, -- .probe = wl_ssb_probe, -- .remove = wl_ssb_remove, --}; --#endif -- --#ifdef BCMJTAG --static bcmjtag_driver_t wl_jtag_driver = { -- wl_jtag_probe, -- wl_jtag_detach, -- wl_jtag_poll, -- }; --#endif /* BCMJTAG */ -+#endif/* defined(CONFIG_SSB) || defined(CONFIG_BCMA) */ - - - /** -@@ -1067,11 +1036,13 @@ wl_module_init(void) - { - int error = -ENODEV; - --#ifdef CONFIG_SSB -- error = ssb_driver_register(&wl_ssb_driver); -+#if defined(CONFIG_SSB) || defined(CONFIG_BCMA) -+ wl_glue_set_attach_callback(&glue_attach_cb); -+ wl_glue_set_remove_callback(&glue_remove_cb); -+ error = wl_glue_register(); - if (error) - return error; --#endif /* CONFIG_SSB */ -+#endif /* defined(CONFIG_SSB) || defined(CONFIG_BCMA) */ - - #ifdef CONFIG_PCI - error = pci_register_driver(&wl_pci_driver); -@@ -1082,7 +1053,9 @@ wl_module_init(void) - return 0; - - error_pci: -- ssb_driver_unregister(&wl_ssb_driver); -+#if defined(CONFIG_SSB) || defined(CONFIG_BCMA) -+ wl_glue_unregister(); -+#endif /* defined(CONFIG_SSB) || defined(CONFIG_BCMA) */ - return error; - } - -@@ -1099,9 +1072,9 @@ wl_module_exit(void) - #ifdef CONFIG_PCI - pci_unregister_driver(&wl_pci_driver); - #endif /* CONFIG_PCI */ --#ifdef CONFIG_SSB -- ssb_driver_unregister(&wl_ssb_driver); --#endif /* CONFIG_SSB */ -+#if defined(CONFIG_SSB) || defined(CONFIG_BCMA) -+ wl_glue_unregister(); -+#endif /* defined(CONFIG_SSB) || defined(CONFIG_BCMA) */ - } - - module_init(wl_module_init); ---- a/driver/linux_osl.c -+++ b/driver/linux_osl.c -@@ -25,9 +25,9 @@ - #include <asm/paccess.h> - #endif /* mips */ - #include <pcicfg.h> --#ifdef CONFIG_SSB --#include <linux/ssb/ssb.h> --#endif -+#if defined(CONFIG_SSB) || defined(CONFIG_BCMA) -+#include <wl_glue.h> -+#endif /* defined(CONFIG_SSB) || defined(CONFIG_BCMA) */ - - #define PCI_CFG_RETRY 10 - -@@ -370,15 +370,17 @@ osl_dma_consistent_align(void) - static struct device * - osl_get_dmadev(osl_t *osh) - { --#ifdef CONFIG_SSB -+#if defined(CONFIG_SSB) || defined(CONFIG_BCMA) - if (osh->bustype == SI_BUS) { -- /* This can be SiliconBackplane emulated as pci with Broadcom or -- * ssb device. Less harmful is to check for pci_bus_type and if -- * no match then assume we got ssb */ -+ /* This can be SiliconBackplane emulated as pci with Broadcom, -+ * ssb or bcma device. Less harmful is to check for pci_bus_type and if -+ * no match then assume we got either ssb or bcma */ - if (((struct pci_dev *)osh->pdev)->dev.bus != &pci_bus_type) -- return ((struct ssb_device *)osh->pdev)->dma_dev; -+ { -+ return wl_glue_get_dmadev(osh->pdev); -+ } - } --#endif -+#endif /* defined(CONFIG_SSB) || defined(CONFIG_BCMA) */ - return &((struct pci_dev *)osh->pdev)->dev; - } - ---- a/driver/Makefile -+++ b/driver/Makefile -@@ -1,7 +1,7 @@ - BUILD_TYPE=wl_apsta - include $(src)/$(BUILD_TYPE)/buildflags.mk - --EXTRA_CFLAGS += -I$(src)/include -I$(src) -DBCMDRIVER $(WLFLAGS) -+EXTRA_CFLAGS += -I$(src)/include -I$(src) -I$(realpath $(src)/../glue) -DBCMDRIVER $(WLFLAGS) - - wl-objs := $(BUILD_TYPE)/wl_prebuilt.o wl_iw.o wl_linux.o linux_osl.o siutils.o aiutils.o hndpmu.o bcmutils.o sbutils.o nicpci.o hnddma.o bcmsrom.o nvram_stub.o - diff --git a/package/broadcom-wl/patches/008-fix_virtual_interfaces.patch b/package/broadcom-wl/patches/008-fix_virtual_interfaces.patch deleted file mode 100644 index 6cffa27..0000000 --- a/package/broadcom-wl/patches/008-fix_virtual_interfaces.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/driver/wl_linux.c -+++ b/driver/wl_linux.c -@@ -1541,6 +1541,8 @@ wl_add_if(wl_info_t *wl, struct wlc_if* - return NULL; - } - -+ wl_if_setup(wlif->dev); -+ - sprintf(wlif->dev->name, "%s%d.%d", devname, wl->pub->unit, wlif->subunit); - if (remote) - bcopy(remote, &wlif->remote, ETHER_ADDR_LEN); diff --git a/package/broadcom-wl/patches/009-fix_compile_3_2.patch b/package/broadcom-wl/patches/009-fix_compile_3_2.patch deleted file mode 100644 index 628f2fd..0000000 --- a/package/broadcom-wl/patches/009-fix_compile_3_2.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/driver/wl_linux.c -+++ b/driver/wl_linux.c -@@ -462,6 +462,16 @@ wl_schedule_fn(wl_info_t *wl, void (*fn) - } - #endif /* DSLCPE_DELAY */ - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) -+#define WL_DEFAULT_OPS \ -+ .ndo_open = wl_open, \ -+ .ndo_stop = wl_close, \ -+ .ndo_start_xmit = wl_start, \ -+ .ndo_get_stats = wl_get_stats, \ -+ .ndo_set_mac_address = wl_set_mac_address, \ -+ .ndo_set_rx_mode = wl_set_multicast_list, \ -+ .ndo_do_ioctl = wl_ioctl -+#else - #define WL_DEFAULT_OPS \ - .ndo_open = wl_open, \ - .ndo_stop = wl_close, \ -@@ -470,6 +480,7 @@ wl_schedule_fn(wl_info_t *wl, void (*fn) - .ndo_set_mac_address = wl_set_mac_address, \ - .ndo_set_multicast_list = wl_set_multicast_list, \ - .ndo_do_ioctl = wl_ioctl -+#endif - - static const struct net_device_ops wl_ops = { - WL_DEFAULT_OPS, diff --git a/package/broadcom-wl/patches/010-remove_irqf_samble_random.patch b/package/broadcom-wl/patches/010-remove_irqf_samble_random.patch deleted file mode 100644 index 27b132d..0000000 --- a/package/broadcom-wl/patches/010-remove_irqf_samble_random.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/driver/wl_linux.c 2012-09-26 20:51:48.099454971 -0400 -+++ b/driver/wl_linux.c 2012-09-26 20:53:24.115453441 -0400 -@@ -691,7 +691,7 @@ - if (wl->bustype != JTAG_BUS) - #endif /* BCMJTAG */ - { -- if (request_irq(irq, wl_isr, IRQF_SHARED|IRQF_SAMPLE_RANDOM, dev->name, wl)) { -+ if (request_irq(irq, wl_isr, IRQF_SHARED, dev->name, wl)) { - WL_ERROR(("wl%d: request_irq() failed\n", unit)); - goto fail; - } diff --git a/package/broadcom-wl/patches/011-fix_compile_3_4.patch b/package/broadcom-wl/patches/011-fix_compile_3_4.patch deleted file mode 100644 index 585d53c..0000000 --- a/package/broadcom-wl/patches/011-fix_compile_3_4.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/driver/wl_linux.c -+++ b/driver/wl_linux.c -@@ -49,7 +49,9 @@ - #include <linux/ieee80211.h> - #endif - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0) - #include <asm/system.h> -+#endif - #include <asm/io.h> - #include <asm/irq.h> - #include <asm/pgtable.h> diff --git a/package/broadcom-wl/patches/100-fix_nvram_two_devices.patch b/package/broadcom-wl/patches/100-fix_nvram_two_devices.patch deleted file mode 100644 index 5650862..0000000 --- a/package/broadcom-wl/patches/100-fix_nvram_two_devices.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/driver/nvram_stub.c -+++ b/driver/nvram_stub.c -@@ -22,6 +22,7 @@ typedef struct _vars { - #define VARS_T_OH sizeof(vars_t) - - static vars_t *vars = NULL; -+static int nvram_init_done = 0; - extern char *nvram_buf[]; - - int -@@ -33,6 +34,10 @@ BCMATTACHFN(nvram_init)(void *si) - uint nvs, bufsz; - vars_t *new; - -+ nvram_init_done++; -+ if (nvram_init_done != 1) -+ return 0; -+ - osh = si_osh(sih); - - nvs = R_REG(osh, &nvh->len) - sizeof(struct nvram_header); -@@ -79,6 +84,10 @@ BCMATTACHFN(nvram_exit)(void *si) - vars_t *this, *next; - si_t *sih; - -+ nvram_init_done--; -+ if (nvram_init_done != 0) -+ return 0; -+ - sih = (si_t *)si; - this = vars; - while (this) { diff --git a/package/broadcom-wl/patches/110-add_number_to_dev_name.patch b/package/broadcom-wl/patches/110-add_number_to_dev_name.patch deleted file mode 100644 index 13ce727..0000000 --- a/package/broadcom-wl/patches/110-add_number_to_dev_name.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/driver/wl_linux.c -+++ b/driver/wl_linux.c -@@ -1412,7 +1412,7 @@ wl_alloc_if(wl_info_t *wl, int iftype, u - dev = alloc_etherdev(sizeof(wl_if_t)); - wlif = netdev_priv(dev); - bzero(wlif, sizeof(wl_if_t)); -- strncpy(dev->name, name, IFNAMSIZ); -+ snprintf(dev->name, IFNAMSIZ, name, subunit); - - wlif->type = iftype; - wlif->dev = dev; diff --git a/package/broadcom-wl/patches/910-fallback-sprom.patch b/package/broadcom-wl/patches/910-fallback-sprom.patch deleted file mode 100644 index 749ecbf..0000000 --- a/package/broadcom-wl/patches/910-fallback-sprom.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- a/driver/bcmsrom.c -+++ b/driver/bcmsrom.c -@@ -39,6 +39,11 @@ - #include <sbsdpcmdev.h> - #endif - -+#if defined(CONFIG_SSB_PCIHOST) && defined(CONFIG_BOARD_BCM963XX) -+#include <linux/ssb/ssb.h> -+extern struct ssb_sprom bcm63xx_sprom; -+#endif -+ - #ifdef WLTEST - #include <sbsprom.h> - #endif /* WLTEST */ -@@ -2058,6 +2063,10 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih - bool flash = FALSE; - int err = 0; - -+#if defined(CONFIG_SSB_PCIHOST) && defined(CONFIG_BOARD_BCM963XX) -+ char eabuf[18]; -+#endif -+ - /* - * Apply CRC over SROM content regardless SROM is present or not, - * and use variable <devpath>sromrev's existance in flash to decide -@@ -2120,6 +2129,58 @@ BCMATTACHFN(initvars_srom_pci)(si_t *sih - goto varscont; - } - -+#if defined(CONFIG_SSB_PCIHOST) && defined(CONFIG_BOARD_BCM963XX) -+ base = vp = MALLOC(osh, MAXSZ_NVRAM_VARS); -+ -+ if( base != NULL ) -+ { -+ varbuf_init(&b, base, MAXSZ_NVRAM_VARS); -+ -+ printk("Got version %i SPROM from SSB\n", bcm63xx_sprom.revision); -+ -+ varbuf_append(&b, vstr_sromrev, bcm63xx_sprom.revision); -+ varbuf_append(&b, vstr_boardrev, bcm63xx_sprom.board_rev); -+ -+ /* ToDo: map bcm63xx_sprom.country_code */ -+ varbuf_append(&b, vstr_noccode); -+ -+ varbuf_append(&b, vstr_aa2g, bcm63xx_sprom.ant_available_bg); -+ -+ varbuf_append(&b, vstr_pa0b[0], bcm63xx_sprom.pa0b0); -+ varbuf_append(&b, vstr_pa1b[0], bcm63xx_sprom.pa1b0); -+ varbuf_append(&b, vstr_pa0b[1], bcm63xx_sprom.pa0b1); -+ varbuf_append(&b, vstr_pa1b[1], bcm63xx_sprom.pa1b1); -+ varbuf_append(&b, vstr_pa0b[2], bcm63xx_sprom.pa0b2); -+ varbuf_append(&b, vstr_pa1b[2], bcm63xx_sprom.pa1b2); -+ -+ varbuf_append(&b, vstr_pa0maxpwr, bcm63xx_sprom.maxpwr_bg); -+ varbuf_append(&b, vstr_pa0itssit, bcm63xx_sprom.itssi_bg); -+ -+ varbuf_append(&b, vstr_boardflags, (bcm63xx_sprom.boardflags_hi << 16) | bcm63xx_sprom.boardflags_lo); -+ varbuf_append(&b, vstr_boardflags2, (bcm63xx_sprom.boardflags2_hi << 16) | bcm63xx_sprom.boardflags2_lo); -+ -+ snprintf(eabuf, sizeof(eabuf), "%02x:%02x:%02x:%02x:%02x:%02x", -+ bcm63xx_sprom.il0mac[0], bcm63xx_sprom.il0mac[1], bcm63xx_sprom.il0mac[2], -+ bcm63xx_sprom.il0mac[3], bcm63xx_sprom.il0mac[4], bcm63xx_sprom.il0mac[5] -+ ); -+ -+ varbuf_append(&b, vstr_macaddr, eabuf); -+ -+ /* final nullbyte terminator */ -+ ASSERT(b.size >= 1); -+ vp = b.buf; -+ *vp++ = '\0'; -+ -+ ASSERT((vp - base) <= MAXSZ_NVRAM_VARS); -+ goto varsdone; -+ } -+ else -+ { -+ err = -2; -+ goto errout; -+ } -+#endif -+ - BS_ERROR(("SROM CRC Error\n")); - - #if defined(WLTEST) diff --git a/package/broadcom-wl/patches/912-pci-bus-nvram-hack.patch b/package/broadcom-wl/patches/912-pci-bus-nvram-hack.patch deleted file mode 100644 index 65e8bd3..0000000 --- a/package/broadcom-wl/patches/912-pci-bus-nvram-hack.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/driver/siutils.c -+++ b/driver/siutils.c -@@ -1859,7 +1859,7 @@ BCMINITFN(si_devpath)(si_t *sih, char *p - case PCI_BUS: - ASSERT((SI_INFO(sih))->osh != NULL); - slen = snprintf(path, (size_t)size, "pci/%u/%u/", -- OSL_PCI_BUS((SI_INFO(sih))->osh), -+ OSL_PCI_BUS((SI_INFO(sih))->osh) + 1, - OSL_PCI_SLOT((SI_INFO(sih))->osh)); - break; - case PCMCIA_BUS: diff --git a/package/broadcom-wl/patches/913-avoid-dbe-on-ifs_ctl-readw-hack.patch b/package/broadcom-wl/patches/913-avoid-dbe-on-ifs_ctl-readw-hack.patch deleted file mode 100644 index 412bce9..0000000 --- a/package/broadcom-wl/patches/913-avoid-dbe-on-ifs_ctl-readw-hack.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/driver/linux_osl.c -+++ b/driver/linux_osl.c -@@ -723,6 +723,9 @@ osl_readl(volatile uint32 *r) - uint16 - osl_readw(volatile uint16 *r) - { -+ uint32 addr = (uintptr)r & 0xffff3fff; -+ if (addr == 0xa8000688) /* ifs_ctl */ -+ readl(r); - return (readw(r)); - } - |