]> git.pld-linux.org Git - packages/wl.git/commitdiff
- fix building for kernel 5.6 auto/th/wl-6.30.223.271-10
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 5 Apr 2020 20:20:46 +0000 (22:20 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 5 Apr 2020 20:20:46 +0000 (22:20 +0200)
- rel 10

linux-5.6.patch [new file with mode: 0644]
wl.spec

diff --git a/linux-5.6.patch b/linux-5.6.patch
new file mode 100644 (file)
index 0000000..c4a30be
--- /dev/null
@@ -0,0 +1,59 @@
+--- wl-6.30.223.271/wl/src/shared/linux_osl.c~ 2020-04-04 23:51:43.000000000 +0200
++++ wl-6.30.223.271/wl/src/shared/linux_osl.c  2020-04-05 22:13:14.896669372 +0200
+@@ -929,7 +929,11 @@
+ void *
+ osl_reg_map(uint32 pa, uint size)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
+       return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
++#else
++      return (ioremap((unsigned long)pa, (unsigned long)size));
++#endif
+ }
+ void
+--- wl-6.30.223.271/wl/src/wl/sys/wl_linux.c~  2020-04-04 23:51:43.000000000 +0200
++++ wl-6.30.223.271/wl/src/wl/sys/wl_linux.c   2020-04-05 22:14:41.633337296 +0200
+@@ -586,7 +586,11 @@
+       }
+       wl->bcm_bustype = bustype;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
+       if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
++#else
++      if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
++#endif
+               WL_ERROR(("wl%d: ioremap() failed\n", unit));
+               goto fail;
+       }
+@@ -783,7 +787,11 @@
+       if ((val & 0x0000ff00) != 0)
+               pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
+               bar1_size = pci_resource_len(pdev, 2);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
+               bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
++#else
++              bar1_addr = (uchar *)ioremap(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);
+@@ -3374,11 +3374,18 @@
+ }
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
+ static const struct file_operations wl_fops = {
+       .owner  = THIS_MODULE,
+       .read   = wl_proc_read,
+       .write  = wl_proc_write,
+ };
++#else
++static const struct proc_ops wl_fops = {
++      .proc_read      = wl_proc_read,
++      .proc_write     = wl_proc_write,
++};
++#endif
+ #endif
+ static int
diff --git a/wl.spec b/wl.spec
index 80add87a5e14997d75947a7df630d920ee5cb173..6b838b3a4b5d2d06ae0661deca5b2630fe551078 100644 (file)
--- a/wl.spec
+++ b/wl.spec
@@ -18,7 +18,7 @@ exit 1
 
 %define                _duplicate_files_terminate_build        0
 
 
 %define                _duplicate_files_terminate_build        0
 
-%define                rel     9
+%define                rel     10
 %define                pname   wl
 %define                file_ver        %(echo %{version} | tr . _)
 Summary:       Broadcom 802.11 a/b/g/n hybrid Linux networking device driver
 %define                pname   wl
 %define                file_ver        %(echo %{version} | tr . _)
 Summary:       Broadcom 802.11 a/b/g/n hybrid Linux networking device driver
@@ -45,6 +45,7 @@ Patch6:               linux-4.11.patch
 Patch7:                linux-4.12.patch
 Patch8:                008-linux415.patch
 Patch9:                linux-5.1.patch
 Patch7:                linux-4.12.patch
 Patch8:                008-linux415.patch
 Patch9:                linux-5.1.patch
+Patch10:       linux-5.6.patch
 URL:           http://www.broadcom.com/support/802.11
 BuildRequires: rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
 URL:           http://www.broadcom.com/support/802.11
 BuildRequires: rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -135,6 +136,7 @@ EOF\
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch10 -p2
 
 mkdir wl
 mv lib src Makefile wl/
 
 mkdir wl
 mv lib src Makefile wl/
This page took 0.085466 seconds and 4 git commands to generate.