New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
broadcom-wl-dkms: Doesn't compile with kernel >= 5.9 #101040
Comments
The same issue for me, did you find a fix as it is very quiet in here otherwise. |
I have a fix for it @mannp : Create the file diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
index c8c168d..39706ae 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -1647,9 +1647,13 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
goto done2;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
+ if (uaccess_kernel())
+ buf = ioc.buf;
+#else
if (segment_eq(get_fs(), KERNEL_DS))
buf = ioc.buf;
-
+#endif
else if (ioc.buf) {
if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
bcmerror = BCME_NORESOURCE; |
Hi @bagnaram thanks for the reply and the solution 👍 I am not sure if 5.9 is a cutting edge kernel on nix, as am not really looking to patch things to get a working distro. As I cannot currently get 5.8 to build either I may try your patch to at least get a working installation. Cheers. |
Any progress on this? |
I ran into this issue today when trying to set Edit: I was able to fix the build by using @bagnaram's patch and putting this in my configuration. linuxPackages_patched = pkgs.linuxPackages_latest.extend (self: super: {
broadcom_sta = super.broadcom_sta.overrideAttrs (oA: {
patches = [ ./broadcom-sta-5.9.patch ] ++ oA.patches;
});
}); |
For some reason @bagnaram's patch was on the wrong lines for me. diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
index 0d05100..7a972b9 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -1643,8 +1643,13 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
goto done2;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
+if (uaccess_kernel())
+ buf = ioc.buf;
+#else
if (segment_eq(get_fs(), KERNEL_DS))
buf = ioc.buf;
+#endif
else if (ioc.buf) {
if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
|
I marked this as stale due to inactivity. → More info |
Describe the bug
In kernel versions before 5.9 there was a macro called "segment_eq". This macro was only used to implement "uaccess_kernel" and removed with 5.9.0. Now broadcom-wl-dkms fails to build as it can't find it.
See: for patch https://bugs.archlinux.org/task/68030
To Reproduce
Steps to reproduce the behavior:
Screenshots
Notify maintainers
Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: