wok-current rev 25673

Up broadcom-wl drivers, add miss driver for mesa-dri (iris, crocus, virtio)
author Stanislas Leduc <shann@slitaz.org>
date Mon Mar 04 16:57:21 2024 +0000 (9 months ago)
parents d1dd7ab93442
children 9c5525edd04f
files broadcom-wl-pae/receipt broadcom-wl-pae/stuff/017-linux56.patch broadcom-wl-pae/stuff/018-linux59.patch broadcom-wl/receipt broadcom-wl/stuff/017-linux56.patch broadcom-wl/stuff/018-linux59.patch broadcom-wl64/receipt broadcom-wl64/stuff/017-linux56.patch broadcom-wl64/stuff/018-linux59.patch mesa-dri-crocus/receipt mesa-dri-iris/receipt mesa-dri-nouveau/receipt mesa-dri-virtio/receipt mesa/receipt
line diff
     1.1 --- a/broadcom-wl-pae/receipt	Sun Mar 03 17:58:42 2024 +0000
     1.2 +++ b/broadcom-wl-pae/receipt	Mon Mar 04 16:57:21 2024 +0000
     1.3 @@ -37,6 +37,9 @@
     1.4  008-linux415.patch
     1.5  009-fix_mac_profile_discrepancy.patch
     1.6  014-linux414.patch
     1.7 +016-linux51.patch
     1.8 +017-linux56.patch
     1.9 +018-linux59.patch
    1.10  EOT
    1.11  
    1.12      KBUILD_NOPEDANTIC=1 make -C /usr/src/linux M=`pwd`
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/broadcom-wl-pae/stuff/017-linux56.patch	Mon Mar 04 16:57:21 2024 +0000
     2.3 @@ -0,0 +1,55 @@
     2.4 +diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
     2.5 +index 6157d18..8237ec7 100644
     2.6 +--- a/src/shared/linux_osl.c
     2.7 ++++ b/src/shared/linux_osl.c
     2.8 +@@ -942,7 +942,7 @@ osl_getcycles(void)
     2.9 + void *
    2.10 + osl_reg_map(uint32 pa, uint size)
    2.11 + {
    2.12 +-	return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
    2.13 ++	return (ioremap((unsigned long)pa, (unsigned long)size));
    2.14 + }
    2.15 + 
    2.16 + void
    2.17 +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
    2.18 +index 0d05100..2ed1f0d 100644
    2.19 +--- a/src/wl/sys/wl_linux.c
    2.20 ++++ b/src/wl/sys/wl_linux.c
    2.21 +@@ -582,7 +582,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
    2.22 + 	}
    2.23 + 	wl->bcm_bustype = bustype;
    2.24 + 
    2.25 +-	if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
    2.26 ++	if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
    2.27 + 		WL_ERROR(("wl%d: ioremap() failed\n", unit));
    2.28 + 		goto fail;
    2.29 + 	}
    2.30 +@@ -772,7 +772,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
    2.31 + 	if ((val & 0x0000ff00) != 0)
    2.32 + 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
    2.33 + 		bar1_size = pci_resource_len(pdev, 2);
    2.34 +-		bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
    2.35 ++		bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
    2.36 + 			bar1_size);
    2.37 + 	wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
    2.38 + 		pdev->irq, bar1_addr, bar1_size);
    2.39 +@@ -3335,12 +3335,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
    2.40 + }
    2.41 + 
    2.42 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
    2.43 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
    2.44 ++static struct proc_ops wl_fops = {
    2.45 ++        .proc_read     = wl_proc_read,
    2.46 ++        .proc_write    = wl_proc_write,
    2.47 ++};
    2.48 ++#else
    2.49 + static const struct file_operations wl_fops = {
    2.50 + 	.owner	= THIS_MODULE,
    2.51 + 	.read	= wl_proc_read,
    2.52 + 	.write	= wl_proc_write,
    2.53 + };
    2.54 + #endif
    2.55 ++#endif
    2.56 + 
    2.57 + static int
    2.58 + wl_reg_proc_entry(wl_info_t *wl)
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/broadcom-wl-pae/stuff/018-linux59.patch	Mon Mar 04 16:57:21 2024 +0000
     3.3 @@ -0,0 +1,211 @@
     3.4 +From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
     3.5 +From: Joan Bruguera <joanbrugueram@gmail.com>
     3.6 +Date: Tue, 13 Oct 2020 19:35:55 +0200
     3.7 +Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
     3.8 +
     3.9 +Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
    3.10 +
    3.11 +Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
    3.12 +
    3.13 +NB: Some checks in wlc_ioctl_internal are likely superfluous,
    3.14 +    but I'm not familiar enough with the driver to remove them with confidence.
    3.15 +
    3.16 +See also: https://lwn.net/Articles/722267/
    3.17 +          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47058bb54b57962b3958a936ddbc59355e4c5504
    3.18 +          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5
    3.19 +
    3.20 +Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
    3.21 +---
    3.22 + src/wl/sys/wl_cfg80211_hybrid.c | 25 ++-------------------
    3.23 + src/wl/sys/wl_iw.c              | 25 ++-------------------
    3.24 + src/wl/sys/wl_linux.c           | 40 ++++++++++++++++++++++++++++-----
    3.25 + src/wl/sys/wl_linux.h           |  2 ++
    3.26 + src/wl/sys/wlc_pub.h            |  1 +
    3.27 + 5 files changed, 42 insertions(+), 51 deletions(-)
    3.28 +
    3.29 +diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
    3.30 +index 7b606e0..1e0adb7 100644
    3.31 +--- a/src/wl/sys/wl_cfg80211_hybrid.c
    3.32 ++++ b/src/wl/sys/wl_cfg80211_hybrid.c
    3.33 +@@ -38,6 +38,7 @@
    3.34 + #include <wlioctl.h>
    3.35 + #include <proto/802.11.h>
    3.36 + #include <wl_cfg80211_hybrid.h>
    3.37 ++#include <wl_linux.h>
    3.38 + 
    3.39 + #define EVENT_TYPE(e) dtoh32((e)->event_type)
    3.40 + #define EVENT_FLAGS(e) dtoh16((e)->flags)
    3.41 +@@ -435,30 +436,7 @@ static void key_endian_to_host(struct wl_wsec_key *key)
    3.42 + static s32
    3.43 + wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
    3.44 + {
    3.45 +-	struct ifreq ifr;
    3.46 +-	struct wl_ioctl ioc;
    3.47 +-	mm_segment_t fs;
    3.48 +-	s32 err = 0;
    3.49 +-
    3.50 +-	BUG_ON(len < sizeof(int));
    3.51 +-
    3.52 +-	memset(&ioc, 0, sizeof(ioc));
    3.53 +-	ioc.cmd = cmd;
    3.54 +-	ioc.buf = arg;
    3.55 +-	ioc.len = len;
    3.56 +-	strcpy(ifr.ifr_name, dev->name);
    3.57 +-	ifr.ifr_data = (caddr_t)&ioc;
    3.58 +-
    3.59 +-	fs = get_fs();
    3.60 +-	set_fs(get_ds());
    3.61 +-#if defined(WL_USE_NETDEV_OPS)
    3.62 +-	err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
    3.63 +-#else
    3.64 +-	err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
    3.65 +-#endif
    3.66 +-	set_fs(fs);
    3.67 +-
    3.68 +-	return err;
    3.69 ++	return wlc_ioctl_internal(dev, cmd, arg, len);
    3.70 + }
    3.71 + 
    3.72 + static s32
    3.73 +diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
    3.74 +index c4c610b..e346b15 100644
    3.75 +--- a/src/wl/sys/wl_iw.c
    3.76 ++++ b/src/wl/sys/wl_iw.c
    3.77 +@@ -37,6 +37,7 @@ typedef const struct si_pub	si_t;
    3.78 + 
    3.79 + #include <wl_dbg.h>
    3.80 + #include <wl_iw.h>
    3.81 ++#include <wl_linux.h>
    3.82 + 
    3.83 + extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
    3.84 + 	uint32 reason, char* stringBuf, uint buflen);
    3.85 +@@ -103,29 +104,7 @@ dev_wlc_ioctl(
    3.86 + 	int len
    3.87 + )
    3.88 + {
    3.89 +-	struct ifreq ifr;
    3.90 +-	wl_ioctl_t ioc;
    3.91 +-	mm_segment_t fs;
    3.92 +-	int ret;
    3.93 +-
    3.94 +-	memset(&ioc, 0, sizeof(ioc));
    3.95 +-	ioc.cmd = cmd;
    3.96 +-	ioc.buf = arg;
    3.97 +-	ioc.len = len;
    3.98 +-
    3.99 +-	strcpy(ifr.ifr_name, dev->name);
   3.100 +-	ifr.ifr_data = (caddr_t) &ioc;
   3.101 +-
   3.102 +-	fs = get_fs();
   3.103 +-	set_fs(get_ds());
   3.104 +-#if defined(WL_USE_NETDEV_OPS)
   3.105 +-	ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
   3.106 +-#else
   3.107 +-	ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
   3.108 +-#endif
   3.109 +-	set_fs(fs);
   3.110 +-
   3.111 +-	return ret;
   3.112 ++	return wlc_ioctl_internal(dev, cmd, arg, len);
   3.113 + }
   3.114 + 
   3.115 + static int
   3.116 +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
   3.117 +index 947cef3..f04c148 100644
   3.118 +--- a/src/wl/sys/wl_linux.c
   3.119 ++++ b/src/wl/sys/wl_linux.c
   3.120 +@@ -1643,10 +1643,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
   3.121 + 		goto done2;
   3.122 + 	}
   3.123 + 
   3.124 +-	if (segment_eq(get_fs(), KERNEL_DS))
   3.125 +-		buf = ioc.buf;
   3.126 +-
   3.127 +-	else if (ioc.buf) {
   3.128 ++	if (ioc.buf) {
   3.129 + 		if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
   3.130 + 			bcmerror = BCME_NORESOURCE;
   3.131 + 			goto done2;
   3.132 +@@ -1667,7 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
   3.133 + 	WL_UNLOCK(wl);
   3.134 + 
   3.135 + done1:
   3.136 +-	if (ioc.buf && (ioc.buf != buf)) {
   3.137 ++	if (ioc.buf) {
   3.138 + 		if (copy_to_user(ioc.buf, buf, ioc.len))
   3.139 + 			bcmerror = BCME_BADADDR;
   3.140 + 		MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
   3.141 +@@ -1680,6 +1677,39 @@ done2:
   3.142 + 	return (OSL_ERROR(bcmerror));
   3.143 + }
   3.144 + 
   3.145 ++int
   3.146 ++wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)
   3.147 ++{
   3.148 ++	wl_info_t *wl;
   3.149 ++	wl_if_t *wlif;
   3.150 ++	int bcmerror;
   3.151 ++
   3.152 ++	if (!dev)
   3.153 ++		return -ENETDOWN;
   3.154 ++
   3.155 ++	wl = WL_INFO(dev);
   3.156 ++	wlif = WL_DEV_IF(dev);
   3.157 ++	if (wlif == NULL || wl == NULL || wl->dev == NULL)
   3.158 ++		return -ENETDOWN;
   3.159 ++
   3.160 ++	bcmerror = 0;
   3.161 ++
   3.162 ++	WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd));
   3.163 ++
   3.164 ++	WL_LOCK(wl);
   3.165 ++	if (!capable(CAP_NET_ADMIN)) {
   3.166 ++		bcmerror = BCME_EPERM;
   3.167 ++	} else {
   3.168 ++		bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);
   3.169 ++	}
   3.170 ++	WL_UNLOCK(wl);
   3.171 ++
   3.172 ++	ASSERT(VALID_BCMERROR(bcmerror));
   3.173 ++	if (bcmerror != 0)
   3.174 ++		wl->pub->bcmerror = bcmerror;
   3.175 ++	return (OSL_ERROR(bcmerror));
   3.176 ++}
   3.177 ++
   3.178 + static struct net_device_stats*
   3.179 + wl_get_stats(struct net_device *dev)
   3.180 + {
   3.181 +diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
   3.182 +index 5b1048e..c8c1f41 100644
   3.183 +--- a/src/wl/sys/wl_linux.h
   3.184 ++++ b/src/wl/sys/wl_linux.h
   3.185 +@@ -22,6 +22,7 @@
   3.186 + #define _wl_linux_h_
   3.187 + 
   3.188 + #include <wlc_types.h>
   3.189 ++#include <wlc_pub.h>
   3.190 + 
   3.191 + typedef struct wl_timer {
   3.192 + 	struct timer_list 	timer;
   3.193 +@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);
   3.194 + extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
   3.195 + extern void wl_free(wl_info_t *wl);
   3.196 + extern int  wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
   3.197 ++extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);
   3.198 + extern struct net_device * wl_netdev_get(wl_info_t *wl);
   3.199 + 
   3.200 + #endif 
   3.201 +diff --git a/src/wl/sys/wlc_pub.h b/src/wl/sys/wlc_pub.h
   3.202 +index 53a98b8..2b5a029 100644
   3.203 +--- a/src/wl/sys/wlc_pub.h
   3.204 ++++ b/src/wl/sys/wlc_pub.h
   3.205 +@@ -24,6 +24,7 @@
   3.206 + 
   3.207 + #include <wlc_types.h>
   3.208 + #include <wlc_utils.h>
   3.209 ++#include <siutils.h>
   3.210 + #include "proto/802.11.h"
   3.211 + #include "proto/bcmevent.h"
   3.212 + 
   3.213 +--
   3.214 +2.28.0
     4.1 --- a/broadcom-wl/receipt	Sun Mar 03 17:58:42 2024 +0000
     4.2 +++ b/broadcom-wl/receipt	Mon Mar 04 16:57:21 2024 +0000
     4.3 @@ -36,6 +36,9 @@
     4.4  008-linux415.patch
     4.5  009-fix_mac_profile_discrepancy.patch
     4.6  014-linux414.patch
     4.7 +016-linux51.patch
     4.8 +017-linux56.patch
     4.9 +018-linux59.patch
    4.10  EOT
    4.11  
    4.12      KBUILD_NOPEDANTIC=1 make -C /usr/src/linux M=`pwd`
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/broadcom-wl/stuff/017-linux56.patch	Mon Mar 04 16:57:21 2024 +0000
     5.3 @@ -0,0 +1,55 @@
     5.4 +diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
     5.5 +index 6157d18..8237ec7 100644
     5.6 +--- a/src/shared/linux_osl.c
     5.7 ++++ b/src/shared/linux_osl.c
     5.8 +@@ -942,7 +942,7 @@ osl_getcycles(void)
     5.9 + void *
    5.10 + osl_reg_map(uint32 pa, uint size)
    5.11 + {
    5.12 +-	return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
    5.13 ++	return (ioremap((unsigned long)pa, (unsigned long)size));
    5.14 + }
    5.15 + 
    5.16 + void
    5.17 +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
    5.18 +index 0d05100..2ed1f0d 100644
    5.19 +--- a/src/wl/sys/wl_linux.c
    5.20 ++++ b/src/wl/sys/wl_linux.c
    5.21 +@@ -582,7 +582,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
    5.22 + 	}
    5.23 + 	wl->bcm_bustype = bustype;
    5.24 + 
    5.25 +-	if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
    5.26 ++	if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
    5.27 + 		WL_ERROR(("wl%d: ioremap() failed\n", unit));
    5.28 + 		goto fail;
    5.29 + 	}
    5.30 +@@ -772,7 +772,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
    5.31 + 	if ((val & 0x0000ff00) != 0)
    5.32 + 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
    5.33 + 		bar1_size = pci_resource_len(pdev, 2);
    5.34 +-		bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
    5.35 ++		bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
    5.36 + 			bar1_size);
    5.37 + 	wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
    5.38 + 		pdev->irq, bar1_addr, bar1_size);
    5.39 +@@ -3335,12 +3335,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
    5.40 + }
    5.41 + 
    5.42 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
    5.43 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
    5.44 ++static struct proc_ops wl_fops = {
    5.45 ++        .proc_read     = wl_proc_read,
    5.46 ++        .proc_write    = wl_proc_write,
    5.47 ++};
    5.48 ++#else
    5.49 + static const struct file_operations wl_fops = {
    5.50 + 	.owner	= THIS_MODULE,
    5.51 + 	.read	= wl_proc_read,
    5.52 + 	.write	= wl_proc_write,
    5.53 + };
    5.54 + #endif
    5.55 ++#endif
    5.56 + 
    5.57 + static int
    5.58 + wl_reg_proc_entry(wl_info_t *wl)
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/broadcom-wl/stuff/018-linux59.patch	Mon Mar 04 16:57:21 2024 +0000
     6.3 @@ -0,0 +1,211 @@
     6.4 +From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
     6.5 +From: Joan Bruguera <joanbrugueram@gmail.com>
     6.6 +Date: Tue, 13 Oct 2020 19:35:55 +0200
     6.7 +Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
     6.8 +
     6.9 +Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
    6.10 +
    6.11 +Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
    6.12 +
    6.13 +NB: Some checks in wlc_ioctl_internal are likely superfluous,
    6.14 +    but I'm not familiar enough with the driver to remove them with confidence.
    6.15 +
    6.16 +See also: https://lwn.net/Articles/722267/
    6.17 +          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47058bb54b57962b3958a936ddbc59355e4c5504
    6.18 +          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5
    6.19 +
    6.20 +Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
    6.21 +---
    6.22 + src/wl/sys/wl_cfg80211_hybrid.c | 25 ++-------------------
    6.23 + src/wl/sys/wl_iw.c              | 25 ++-------------------
    6.24 + src/wl/sys/wl_linux.c           | 40 ++++++++++++++++++++++++++++-----
    6.25 + src/wl/sys/wl_linux.h           |  2 ++
    6.26 + src/wl/sys/wlc_pub.h            |  1 +
    6.27 + 5 files changed, 42 insertions(+), 51 deletions(-)
    6.28 +
    6.29 +diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
    6.30 +index 7b606e0..1e0adb7 100644
    6.31 +--- a/src/wl/sys/wl_cfg80211_hybrid.c
    6.32 ++++ b/src/wl/sys/wl_cfg80211_hybrid.c
    6.33 +@@ -38,6 +38,7 @@
    6.34 + #include <wlioctl.h>
    6.35 + #include <proto/802.11.h>
    6.36 + #include <wl_cfg80211_hybrid.h>
    6.37 ++#include <wl_linux.h>
    6.38 + 
    6.39 + #define EVENT_TYPE(e) dtoh32((e)->event_type)
    6.40 + #define EVENT_FLAGS(e) dtoh16((e)->flags)
    6.41 +@@ -435,30 +436,7 @@ static void key_endian_to_host(struct wl_wsec_key *key)
    6.42 + static s32
    6.43 + wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
    6.44 + {
    6.45 +-	struct ifreq ifr;
    6.46 +-	struct wl_ioctl ioc;
    6.47 +-	mm_segment_t fs;
    6.48 +-	s32 err = 0;
    6.49 +-
    6.50 +-	BUG_ON(len < sizeof(int));
    6.51 +-
    6.52 +-	memset(&ioc, 0, sizeof(ioc));
    6.53 +-	ioc.cmd = cmd;
    6.54 +-	ioc.buf = arg;
    6.55 +-	ioc.len = len;
    6.56 +-	strcpy(ifr.ifr_name, dev->name);
    6.57 +-	ifr.ifr_data = (caddr_t)&ioc;
    6.58 +-
    6.59 +-	fs = get_fs();
    6.60 +-	set_fs(get_ds());
    6.61 +-#if defined(WL_USE_NETDEV_OPS)
    6.62 +-	err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
    6.63 +-#else
    6.64 +-	err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
    6.65 +-#endif
    6.66 +-	set_fs(fs);
    6.67 +-
    6.68 +-	return err;
    6.69 ++	return wlc_ioctl_internal(dev, cmd, arg, len);
    6.70 + }
    6.71 + 
    6.72 + static s32
    6.73 +diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
    6.74 +index c4c610b..e346b15 100644
    6.75 +--- a/src/wl/sys/wl_iw.c
    6.76 ++++ b/src/wl/sys/wl_iw.c
    6.77 +@@ -37,6 +37,7 @@ typedef const struct si_pub	si_t;
    6.78 + 
    6.79 + #include <wl_dbg.h>
    6.80 + #include <wl_iw.h>
    6.81 ++#include <wl_linux.h>
    6.82 + 
    6.83 + extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
    6.84 + 	uint32 reason, char* stringBuf, uint buflen);
    6.85 +@@ -103,29 +104,7 @@ dev_wlc_ioctl(
    6.86 + 	int len
    6.87 + )
    6.88 + {
    6.89 +-	struct ifreq ifr;
    6.90 +-	wl_ioctl_t ioc;
    6.91 +-	mm_segment_t fs;
    6.92 +-	int ret;
    6.93 +-
    6.94 +-	memset(&ioc, 0, sizeof(ioc));
    6.95 +-	ioc.cmd = cmd;
    6.96 +-	ioc.buf = arg;
    6.97 +-	ioc.len = len;
    6.98 +-
    6.99 +-	strcpy(ifr.ifr_name, dev->name);
   6.100 +-	ifr.ifr_data = (caddr_t) &ioc;
   6.101 +-
   6.102 +-	fs = get_fs();
   6.103 +-	set_fs(get_ds());
   6.104 +-#if defined(WL_USE_NETDEV_OPS)
   6.105 +-	ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
   6.106 +-#else
   6.107 +-	ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
   6.108 +-#endif
   6.109 +-	set_fs(fs);
   6.110 +-
   6.111 +-	return ret;
   6.112 ++	return wlc_ioctl_internal(dev, cmd, arg, len);
   6.113 + }
   6.114 + 
   6.115 + static int
   6.116 +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
   6.117 +index 947cef3..f04c148 100644
   6.118 +--- a/src/wl/sys/wl_linux.c
   6.119 ++++ b/src/wl/sys/wl_linux.c
   6.120 +@@ -1643,10 +1643,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
   6.121 + 		goto done2;
   6.122 + 	}
   6.123 + 
   6.124 +-	if (segment_eq(get_fs(), KERNEL_DS))
   6.125 +-		buf = ioc.buf;
   6.126 +-
   6.127 +-	else if (ioc.buf) {
   6.128 ++	if (ioc.buf) {
   6.129 + 		if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
   6.130 + 			bcmerror = BCME_NORESOURCE;
   6.131 + 			goto done2;
   6.132 +@@ -1667,7 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
   6.133 + 	WL_UNLOCK(wl);
   6.134 + 
   6.135 + done1:
   6.136 +-	if (ioc.buf && (ioc.buf != buf)) {
   6.137 ++	if (ioc.buf) {
   6.138 + 		if (copy_to_user(ioc.buf, buf, ioc.len))
   6.139 + 			bcmerror = BCME_BADADDR;
   6.140 + 		MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
   6.141 +@@ -1680,6 +1677,39 @@ done2:
   6.142 + 	return (OSL_ERROR(bcmerror));
   6.143 + }
   6.144 + 
   6.145 ++int
   6.146 ++wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)
   6.147 ++{
   6.148 ++	wl_info_t *wl;
   6.149 ++	wl_if_t *wlif;
   6.150 ++	int bcmerror;
   6.151 ++
   6.152 ++	if (!dev)
   6.153 ++		return -ENETDOWN;
   6.154 ++
   6.155 ++	wl = WL_INFO(dev);
   6.156 ++	wlif = WL_DEV_IF(dev);
   6.157 ++	if (wlif == NULL || wl == NULL || wl->dev == NULL)
   6.158 ++		return -ENETDOWN;
   6.159 ++
   6.160 ++	bcmerror = 0;
   6.161 ++
   6.162 ++	WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd));
   6.163 ++
   6.164 ++	WL_LOCK(wl);
   6.165 ++	if (!capable(CAP_NET_ADMIN)) {
   6.166 ++		bcmerror = BCME_EPERM;
   6.167 ++	} else {
   6.168 ++		bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);
   6.169 ++	}
   6.170 ++	WL_UNLOCK(wl);
   6.171 ++
   6.172 ++	ASSERT(VALID_BCMERROR(bcmerror));
   6.173 ++	if (bcmerror != 0)
   6.174 ++		wl->pub->bcmerror = bcmerror;
   6.175 ++	return (OSL_ERROR(bcmerror));
   6.176 ++}
   6.177 ++
   6.178 + static struct net_device_stats*
   6.179 + wl_get_stats(struct net_device *dev)
   6.180 + {
   6.181 +diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
   6.182 +index 5b1048e..c8c1f41 100644
   6.183 +--- a/src/wl/sys/wl_linux.h
   6.184 ++++ b/src/wl/sys/wl_linux.h
   6.185 +@@ -22,6 +22,7 @@
   6.186 + #define _wl_linux_h_
   6.187 + 
   6.188 + #include <wlc_types.h>
   6.189 ++#include <wlc_pub.h>
   6.190 + 
   6.191 + typedef struct wl_timer {
   6.192 + 	struct timer_list 	timer;
   6.193 +@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);
   6.194 + extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
   6.195 + extern void wl_free(wl_info_t *wl);
   6.196 + extern int  wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
   6.197 ++extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);
   6.198 + extern struct net_device * wl_netdev_get(wl_info_t *wl);
   6.199 + 
   6.200 + #endif 
   6.201 +diff --git a/src/wl/sys/wlc_pub.h b/src/wl/sys/wlc_pub.h
   6.202 +index 53a98b8..2b5a029 100644
   6.203 +--- a/src/wl/sys/wlc_pub.h
   6.204 ++++ b/src/wl/sys/wlc_pub.h
   6.205 +@@ -24,6 +24,7 @@
   6.206 + 
   6.207 + #include <wlc_types.h>
   6.208 + #include <wlc_utils.h>
   6.209 ++#include <siutils.h>
   6.210 + #include "proto/802.11.h"
   6.211 + #include "proto/bcmevent.h"
   6.212 + 
   6.213 +--
   6.214 +2.28.0
     7.1 --- a/broadcom-wl64/receipt	Sun Mar 03 17:58:42 2024 +0000
     7.2 +++ b/broadcom-wl64/receipt	Mon Mar 04 16:57:21 2024 +0000
     7.3 @@ -13,7 +13,8 @@
     7.4  PROVIDE="broadcom-wl:linux64"
     7.5  
     7.6  DEPENDS="linux64"
     7.7 -BUILD_DEPENDS="linux64-module-headers xz"
     7.8 +BUILD_DEPENDS="git xz sysfsutils-dev findutils diffutils \
     7.9 +libtool kmod bc elfutils-dev openssl-dev"
    7.10  
    7.11  # Rules to configure and make the package.
    7.12  compile_rules()
    7.13 @@ -37,13 +38,24 @@
    7.14  008-linux415.patch
    7.15  009-fix_mac_profile_discrepancy.patch
    7.16  014-linux414.patch
    7.17 +017-linux56.patch
    7.18 +018-linux59.patch
    7.19  EOT
    7.20  
    7.21      # Use cross toolchain x86_64
    7.22      export PATH=$PATH:/cross/x86_64/tools/bin
    7.23  
    7.24 +    # linux64-module-headers seem not enought for build module
    7.25 +    # Use linux kernel source and modules_prepare
    7.26 +    tar xf $SRC/linux-$kvers.tar.xz
    7.27 +    cd linux-$kvers
    7.28 +    cp $WOK/linux/stuff/linux-slitaz.config64 .config
    7.29 +    make ARCH=x86_64 CROSS_COMPILE=x86_64-slitaz-linux- modules_prepare
    7.30 +    cp $WOK/linux/install/linux64/usr/src/linux-$kvers-slitaz64/Module.symvers .
    7.31 +    cd -
    7.32 +
    7.33      KBUILD_NOPEDANTIC=1 make ARCH=x86_64 CROSS_COMPILE=x86_64-slitaz-linux- \
    7.34 -        -C /usr/src/linux M=`pwd`
    7.35 +        -C ./linux-$kvers M=`pwd`
    7.36      xz wl.ko
    7.37  }
    7.38  
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/broadcom-wl64/stuff/017-linux56.patch	Mon Mar 04 16:57:21 2024 +0000
     8.3 @@ -0,0 +1,55 @@
     8.4 +diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
     8.5 +index 6157d18..8237ec7 100644
     8.6 +--- a/src/shared/linux_osl.c
     8.7 ++++ b/src/shared/linux_osl.c
     8.8 +@@ -942,7 +942,7 @@ osl_getcycles(void)
     8.9 + void *
    8.10 + osl_reg_map(uint32 pa, uint size)
    8.11 + {
    8.12 +-	return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
    8.13 ++	return (ioremap((unsigned long)pa, (unsigned long)size));
    8.14 + }
    8.15 + 
    8.16 + void
    8.17 +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
    8.18 +index 0d05100..2ed1f0d 100644
    8.19 +--- a/src/wl/sys/wl_linux.c
    8.20 ++++ b/src/wl/sys/wl_linux.c
    8.21 +@@ -582,7 +582,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
    8.22 + 	}
    8.23 + 	wl->bcm_bustype = bustype;
    8.24 + 
    8.25 +-	if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
    8.26 ++	if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
    8.27 + 		WL_ERROR(("wl%d: ioremap() failed\n", unit));
    8.28 + 		goto fail;
    8.29 + 	}
    8.30 +@@ -772,7 +772,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
    8.31 + 	if ((val & 0x0000ff00) != 0)
    8.32 + 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
    8.33 + 		bar1_size = pci_resource_len(pdev, 2);
    8.34 +-		bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
    8.35 ++		bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
    8.36 + 			bar1_size);
    8.37 + 	wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
    8.38 + 		pdev->irq, bar1_addr, bar1_size);
    8.39 +@@ -3335,12 +3335,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
    8.40 + }
    8.41 + 
    8.42 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
    8.43 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
    8.44 ++static struct proc_ops wl_fops = {
    8.45 ++        .proc_read     = wl_proc_read,
    8.46 ++        .proc_write    = wl_proc_write,
    8.47 ++};
    8.48 ++#else
    8.49 + static const struct file_operations wl_fops = {
    8.50 + 	.owner	= THIS_MODULE,
    8.51 + 	.read	= wl_proc_read,
    8.52 + 	.write	= wl_proc_write,
    8.53 + };
    8.54 + #endif
    8.55 ++#endif
    8.56 + 
    8.57 + static int
    8.58 + wl_reg_proc_entry(wl_info_t *wl)
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/broadcom-wl64/stuff/018-linux59.patch	Mon Mar 04 16:57:21 2024 +0000
     9.3 @@ -0,0 +1,211 @@
     9.4 +From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
     9.5 +From: Joan Bruguera <joanbrugueram@gmail.com>
     9.6 +Date: Tue, 13 Oct 2020 19:35:55 +0200
     9.7 +Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
     9.8 +
     9.9 +Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
    9.10 +
    9.11 +Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
    9.12 +
    9.13 +NB: Some checks in wlc_ioctl_internal are likely superfluous,
    9.14 +    but I'm not familiar enough with the driver to remove them with confidence.
    9.15 +
    9.16 +See also: https://lwn.net/Articles/722267/
    9.17 +          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47058bb54b57962b3958a936ddbc59355e4c5504
    9.18 +          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5
    9.19 +
    9.20 +Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
    9.21 +---
    9.22 + src/wl/sys/wl_cfg80211_hybrid.c | 25 ++-------------------
    9.23 + src/wl/sys/wl_iw.c              | 25 ++-------------------
    9.24 + src/wl/sys/wl_linux.c           | 40 ++++++++++++++++++++++++++++-----
    9.25 + src/wl/sys/wl_linux.h           |  2 ++
    9.26 + src/wl/sys/wlc_pub.h            |  1 +
    9.27 + 5 files changed, 42 insertions(+), 51 deletions(-)
    9.28 +
    9.29 +diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
    9.30 +index 7b606e0..1e0adb7 100644
    9.31 +--- a/src/wl/sys/wl_cfg80211_hybrid.c
    9.32 ++++ b/src/wl/sys/wl_cfg80211_hybrid.c
    9.33 +@@ -38,6 +38,7 @@
    9.34 + #include <wlioctl.h>
    9.35 + #include <proto/802.11.h>
    9.36 + #include <wl_cfg80211_hybrid.h>
    9.37 ++#include <wl_linux.h>
    9.38 + 
    9.39 + #define EVENT_TYPE(e) dtoh32((e)->event_type)
    9.40 + #define EVENT_FLAGS(e) dtoh16((e)->flags)
    9.41 +@@ -435,30 +436,7 @@ static void key_endian_to_host(struct wl_wsec_key *key)
    9.42 + static s32
    9.43 + wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
    9.44 + {
    9.45 +-	struct ifreq ifr;
    9.46 +-	struct wl_ioctl ioc;
    9.47 +-	mm_segment_t fs;
    9.48 +-	s32 err = 0;
    9.49 +-
    9.50 +-	BUG_ON(len < sizeof(int));
    9.51 +-
    9.52 +-	memset(&ioc, 0, sizeof(ioc));
    9.53 +-	ioc.cmd = cmd;
    9.54 +-	ioc.buf = arg;
    9.55 +-	ioc.len = len;
    9.56 +-	strcpy(ifr.ifr_name, dev->name);
    9.57 +-	ifr.ifr_data = (caddr_t)&ioc;
    9.58 +-
    9.59 +-	fs = get_fs();
    9.60 +-	set_fs(get_ds());
    9.61 +-#if defined(WL_USE_NETDEV_OPS)
    9.62 +-	err = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
    9.63 +-#else
    9.64 +-	err = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
    9.65 +-#endif
    9.66 +-	set_fs(fs);
    9.67 +-
    9.68 +-	return err;
    9.69 ++	return wlc_ioctl_internal(dev, cmd, arg, len);
    9.70 + }
    9.71 + 
    9.72 + static s32
    9.73 +diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c
    9.74 +index c4c610b..e346b15 100644
    9.75 +--- a/src/wl/sys/wl_iw.c
    9.76 ++++ b/src/wl/sys/wl_iw.c
    9.77 +@@ -37,6 +37,7 @@ typedef const struct si_pub	si_t;
    9.78 + 
    9.79 + #include <wl_dbg.h>
    9.80 + #include <wl_iw.h>
    9.81 ++#include <wl_linux.h>
    9.82 + 
    9.83 + extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
    9.84 + 	uint32 reason, char* stringBuf, uint buflen);
    9.85 +@@ -103,29 +104,7 @@ dev_wlc_ioctl(
    9.86 + 	int len
    9.87 + )
    9.88 + {
    9.89 +-	struct ifreq ifr;
    9.90 +-	wl_ioctl_t ioc;
    9.91 +-	mm_segment_t fs;
    9.92 +-	int ret;
    9.93 +-
    9.94 +-	memset(&ioc, 0, sizeof(ioc));
    9.95 +-	ioc.cmd = cmd;
    9.96 +-	ioc.buf = arg;
    9.97 +-	ioc.len = len;
    9.98 +-
    9.99 +-	strcpy(ifr.ifr_name, dev->name);
   9.100 +-	ifr.ifr_data = (caddr_t) &ioc;
   9.101 +-
   9.102 +-	fs = get_fs();
   9.103 +-	set_fs(get_ds());
   9.104 +-#if defined(WL_USE_NETDEV_OPS)
   9.105 +-	ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
   9.106 +-#else
   9.107 +-	ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE);
   9.108 +-#endif
   9.109 +-	set_fs(fs);
   9.110 +-
   9.111 +-	return ret;
   9.112 ++	return wlc_ioctl_internal(dev, cmd, arg, len);
   9.113 + }
   9.114 + 
   9.115 + static int
   9.116 +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
   9.117 +index 947cef3..f04c148 100644
   9.118 +--- a/src/wl/sys/wl_linux.c
   9.119 ++++ b/src/wl/sys/wl_linux.c
   9.120 +@@ -1643,10 +1643,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
   9.121 + 		goto done2;
   9.122 + 	}
   9.123 + 
   9.124 +-	if (segment_eq(get_fs(), KERNEL_DS))
   9.125 +-		buf = ioc.buf;
   9.126 +-
   9.127 +-	else if (ioc.buf) {
   9.128 ++	if (ioc.buf) {
   9.129 + 		if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
   9.130 + 			bcmerror = BCME_NORESOURCE;
   9.131 + 			goto done2;
   9.132 +@@ -1667,7 +1664,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
   9.133 + 	WL_UNLOCK(wl);
   9.134 + 
   9.135 + done1:
   9.136 +-	if (ioc.buf && (ioc.buf != buf)) {
   9.137 ++	if (ioc.buf) {
   9.138 + 		if (copy_to_user(ioc.buf, buf, ioc.len))
   9.139 + 			bcmerror = BCME_BADADDR;
   9.140 + 		MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
   9.141 +@@ -1680,6 +1677,39 @@ done2:
   9.142 + 	return (OSL_ERROR(bcmerror));
   9.143 + }
   9.144 + 
   9.145 ++int
   9.146 ++wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len)
   9.147 ++{
   9.148 ++	wl_info_t *wl;
   9.149 ++	wl_if_t *wlif;
   9.150 ++	int bcmerror;
   9.151 ++
   9.152 ++	if (!dev)
   9.153 ++		return -ENETDOWN;
   9.154 ++
   9.155 ++	wl = WL_INFO(dev);
   9.156 ++	wlif = WL_DEV_IF(dev);
   9.157 ++	if (wlif == NULL || wl == NULL || wl->dev == NULL)
   9.158 ++		return -ENETDOWN;
   9.159 ++
   9.160 ++	bcmerror = 0;
   9.161 ++
   9.162 ++	WL_TRACE(("wl%d: wlc_ioctl_internal: cmd 0x%x\n", wl->pub->unit, cmd));
   9.163 ++
   9.164 ++	WL_LOCK(wl);
   9.165 ++	if (!capable(CAP_NET_ADMIN)) {
   9.166 ++		bcmerror = BCME_EPERM;
   9.167 ++	} else {
   9.168 ++		bcmerror = wlc_ioctl(wl->wlc, cmd, buf, len, wlif->wlcif);
   9.169 ++	}
   9.170 ++	WL_UNLOCK(wl);
   9.171 ++
   9.172 ++	ASSERT(VALID_BCMERROR(bcmerror));
   9.173 ++	if (bcmerror != 0)
   9.174 ++		wl->pub->bcmerror = bcmerror;
   9.175 ++	return (OSL_ERROR(bcmerror));
   9.176 ++}
   9.177 ++
   9.178 + static struct net_device_stats*
   9.179 + wl_get_stats(struct net_device *dev)
   9.180 + {
   9.181 +diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h
   9.182 +index 5b1048e..c8c1f41 100644
   9.183 +--- a/src/wl/sys/wl_linux.h
   9.184 ++++ b/src/wl/sys/wl_linux.h
   9.185 +@@ -22,6 +22,7 @@
   9.186 + #define _wl_linux_h_
   9.187 + 
   9.188 + #include <wlc_types.h>
   9.189 ++#include <wlc_pub.h>
   9.190 + 
   9.191 + typedef struct wl_timer {
   9.192 + 	struct timer_list 	timer;
   9.193 +@@ -187,6 +188,7 @@ extern irqreturn_t wl_isr(int irq, void *dev_id, struct pt_regs *ptregs);
   9.194 + extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
   9.195 + extern void wl_free(wl_info_t *wl);
   9.196 + extern int  wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
   9.197 ++extern int wlc_ioctl_internal(struct net_device *dev, int cmd, void *buf, int len);
   9.198 + extern struct net_device * wl_netdev_get(wl_info_t *wl);
   9.199 + 
   9.200 + #endif 
   9.201 +diff --git a/src/wl/sys/wlc_pub.h b/src/wl/sys/wlc_pub.h
   9.202 +index 53a98b8..2b5a029 100644
   9.203 +--- a/src/wl/sys/wlc_pub.h
   9.204 ++++ b/src/wl/sys/wlc_pub.h
   9.205 +@@ -24,6 +24,7 @@
   9.206 + 
   9.207 + #include <wlc_types.h>
   9.208 + #include <wlc_utils.h>
   9.209 ++#include <siutils.h>
   9.210 + #include "proto/802.11.h"
   9.211 + #include "proto/bcmevent.h"
   9.212 + 
   9.213 +--
   9.214 +2.28.0
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/mesa-dri-crocus/receipt	Mon Mar 04 16:57:21 2024 +0000
    10.3 @@ -0,0 +1,19 @@
    10.4 +# SliTaz package receipt.
    10.5 +
    10.6 +PACKAGE="mesa-dri-crocus"
    10.7 +VERSION="21.3.5"
    10.8 +CATEGORY="x-window"
    10.9 +SHORT_DESC="Mesa DRI drivers for Intel Crocus."
   10.10 +MAINTAINER="pascal.bellard@slitaz.org"
   10.11 +LICENSE="MIT"
   10.12 +WEB_SITE="https://www.mesa3d.org/"
   10.13 +
   10.14 +DEPENDS="libdrm-intel mesa mesa-dri"
   10.15 +WANTED="mesa"
   10.16 +
   10.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
   10.18 +genpkg_rules()
   10.19 +{
   10.20 +	mkdir -p $fs/usr/lib/dri
   10.21 +	cp $install/usr/lib/dri/crocus_dri.so $fs/usr/lib/dri
   10.22 +}
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/mesa-dri-iris/receipt	Mon Mar 04 16:57:21 2024 +0000
    11.3 @@ -0,0 +1,19 @@
    11.4 +# SliTaz package receipt.
    11.5 +
    11.6 +PACKAGE="mesa-dri-iris"
    11.7 +VERSION="21.3.5"
    11.8 +CATEGORY="x-window"
    11.9 +SHORT_DESC="Mesa DRI drivers for Intel Iris."
   11.10 +MAINTAINER="pascal.bellard@slitaz.org"
   11.11 +LICENSE="MIT"
   11.12 +WEB_SITE="https://www.mesa3d.org/"
   11.13 +
   11.14 +DEPENDS="libdrm-intel mesa mesa-dri"
   11.15 +WANTED="mesa"
   11.16 +
   11.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
   11.18 +genpkg_rules()
   11.19 +{
   11.20 +	mkdir -p $fs/usr/lib/dri
   11.21 +	cp $install/usr/lib/dri/iris_dri.so $fs/usr/lib/dri
   11.22 +}
    12.1 --- a/mesa-dri-nouveau/receipt	Sun Mar 03 17:58:42 2024 +0000
    12.2 +++ b/mesa-dri-nouveau/receipt	Mon Mar 04 16:57:21 2024 +0000
    12.3 @@ -17,7 +17,7 @@
    12.4  	mkdir -p $fs/usr/lib/dri
    12.5  	mkdir -p $fs/etc/X11/xorg.conf.d
    12.6  
    12.7 -	cp $install/usr/lib/dri/nouveau_vieux_dri.so	$fs/usr/lib/dri
    12.8 +	cp $install/usr/lib/dri/nouveau*_dri.so	$fs/usr/lib/dri
    12.9  
   12.10  	cat > $fs/etc/X11/xorg.conf.d/90-DRI.conf <<EOT
   12.11  Section "DRI"
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/mesa-dri-virtio/receipt	Mon Mar 04 16:57:21 2024 +0000
    13.3 @@ -0,0 +1,19 @@
    13.4 +# SliTaz package receipt.
    13.5 +
    13.6 +PACKAGE="mesa-dri-virtio"
    13.7 +VERSION="21.3.5"
    13.8 +CATEGORY="x-window"
    13.9 +SHORT_DESC="Mesa DRI drivers for virtio."
   13.10 +MAINTAINER="pascal.bellard@slitaz.org"
   13.11 +LICENSE="MIT"
   13.12 +WEB_SITE="https://www.mesa3d.org/"
   13.13 +
   13.14 +DEPENDS="libdrm mesa mesa-dri"
   13.15 +WANTED="mesa"
   13.16 +
   13.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
   13.18 +genpkg_rules()
   13.19 +{
   13.20 +	mkdir -p $fs/usr/lib/dri
   13.21 +	cp $install/usr/lib/dri/virtio_gpu_dri.so $fs/usr/lib/dri
   13.22 +}
    14.1 --- a/mesa/receipt	Sun Mar 03 17:58:42 2024 +0000
    14.2 +++ b/mesa/receipt	Mon Mar 04 16:57:21 2024 +0000
    14.3 @@ -35,7 +35,7 @@
    14.4  compile_rules()
    14.5  {
    14.6  	DRI_DRIVERS="i915,i965,r100,r200,nouveau"
    14.7 -	GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast"
    14.8 +	GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast,virgl,iris,crocus"
    14.9  
   14.10  
   14.11  	# Use meson 0.54, issue with meson 0.62