wok-current view broadcom-wl64/stuff/017-linux56.patch @ rev 25687
Up expat CVE-2024-28757
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Mar 15 07:23:20 2024 +0000 (5 months ago) |
parents | |
children |
line source
1 diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
2 index 6157d18..8237ec7 100644
3 --- a/src/shared/linux_osl.c
4 +++ b/src/shared/linux_osl.c
5 @@ -942,7 +942,7 @@ osl_getcycles(void)
6 void *
7 osl_reg_map(uint32 pa, uint size)
8 {
9 - return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
10 + return (ioremap((unsigned long)pa, (unsigned long)size));
11 }
13 void
14 diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
15 index 0d05100..2ed1f0d 100644
16 --- a/src/wl/sys/wl_linux.c
17 +++ b/src/wl/sys/wl_linux.c
18 @@ -582,7 +582,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
19 }
20 wl->bcm_bustype = bustype;
22 - if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
23 + if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
24 WL_ERROR(("wl%d: ioremap() failed\n", unit));
25 goto fail;
26 }
27 @@ -772,7 +772,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
28 if ((val & 0x0000ff00) != 0)
29 pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
30 bar1_size = pci_resource_len(pdev, 2);
31 - bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
32 + bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
33 bar1_size);
34 wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
35 pdev->irq, bar1_addr, bar1_size);
36 @@ -3335,12 +3335,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
37 }
39 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
40 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
41 +static struct proc_ops wl_fops = {
42 + .proc_read = wl_proc_read,
43 + .proc_write = wl_proc_write,
44 +};
45 +#else
46 static const struct file_operations wl_fops = {
47 .owner = THIS_MODULE,
48 .read = wl_proc_read,
49 .write = wl_proc_write,
50 };
51 #endif
52 +#endif
54 static int
55 wl_reg_proc_entry(wl_info_t *wl)