module-*
This commit is contained in:
@@ -1,55 +1,59 @@
|
||||
diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
||||
index 6157d18..8237ec7 100644
|
||||
--- a/src/shared/linux_osl.c
|
||||
+++ b/src/shared/linux_osl.c
|
||||
@@ -942,7 +942,7 @@ osl_getcycles(void)
|
||||
diff -Nurp broadcom-wl-6.30.223.271.orig/src/shared/linux_osl.c broadcom-wl-6.30.223.271/src/shared/linux_osl.c
|
||||
--- broadcom-wl-6.30.223.271.orig/src/shared/linux_osl.c 2020-04-11 13:01:14.768843749 +0300
|
||||
+++ broadcom-wl-6.30.223.271/src/shared/linux_osl.c 2020-04-11 13:15:29.246184298 +0300
|
||||
@@ -946,7 +946,11 @@ osl_getcycles(void)
|
||||
void *
|
||||
osl_reg_map(uint32 pa, uint size)
|
||||
{
|
||||
- return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
||||
+ return (ioremap((unsigned long)pa, (unsigned long)size));
|
||||
+#else
|
||||
return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void
|
||||
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
|
||||
index 0d05100..2ed1f0d 100644
|
||||
--- a/src/wl/sys/wl_linux.c
|
||||
+++ b/src/wl/sys/wl_linux.c
|
||||
@@ -582,7 +582,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
|
||||
diff -Nurp broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c
|
||||
--- broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c 2020-04-11 13:01:14.775844079 +0300
|
||||
+++ broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c 2020-04-11 13:18:05.671569807 +0300
|
||||
@@ -586,7 +586,11 @@ wl_attach(uint16 vendor, uint16 device,
|
||||
}
|
||||
wl->bcm_bustype = bustype;
|
||||
|
||||
- if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
||||
+ if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
|
||||
+#else
|
||||
if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
|
||||
+#endif
|
||||
WL_ERROR(("wl%d: ioremap() failed\n", unit));
|
||||
goto fail;
|
||||
}
|
||||
@@ -772,7 +772,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
@@ -776,7 +780,11 @@ wl_pci_probe(struct pci_dev *pdev, const
|
||||
if ((val & 0x0000ff00) != 0)
|
||||
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
|
||||
bar1_size = pci_resource_len(pdev, 2);
|
||||
- bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
||||
+ bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
|
||||
+#else
|
||||
bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
|
||||
+#endif
|
||||
bar1_size);
|
||||
wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
|
||||
pdev->irq, bar1_addr, bar1_size);
|
||||
@@ -3335,12 +3335,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
|
||||
@@ -3348,10 +3356,16 @@ wl_proc_write(struct file *filp, const c
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
||||
+static struct proc_ops wl_fops = {
|
||||
+ .proc_read = wl_proc_read,
|
||||
+ .proc_write = wl_proc_write,
|
||||
+};
|
||||
+static const struct proc_ops wl_fops = {
|
||||
+ .proc_read = wl_proc_read,
|
||||
+ .proc_write = wl_proc_write,
|
||||
+#else
|
||||
static const struct file_operations wl_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.read = wl_proc_read,
|
||||
.write = wl_proc_write,
|
||||
+#endif
|
||||
};
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
static int
|
||||
wl_reg_proc_entry(wl_info_t *wl)
|
||||
|
||||
Reference in New Issue
Block a user