FS#53974 - [broadcom-wl-dkms] Doesn't build with kernel >= 4.11

Attached to Project: Community Packages
Opened by Deactivated account (TechnicalTotoro) - Monday, 08 May 2017, 17:36 GMT
Last edited by Alexander F. Rødseth (xyproto) - Wednesday, 10 May 2017, 20:37 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

In kernel versions before 4.11 struct net_device had a member called last_rx, but since this member has been removed in 4.11-rc1, broadcom-wl-dkms fails to build as it can't find it. I have attached my build log.

The broadcom-wl package in the AUR has a patch for this: https://aur.archlinux.org/cgit/aur.git/tree/linux411.patch?h=broadcom-wl
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Wednesday, 10 May 2017, 20:37 GMT
Reason for closing:  Fixed
Comment by Ike Devolder (BlackEagle) - Monday, 08 May 2017, 18:20 GMT
there is a patch for 4.11 in aur https://aur.archlinux.org/packages/broadcom-wl
Comment by Deactivated account (TechnicalTotoro) - Monday, 08 May 2017, 18:23 GMT
Yes, that is what I said.
Comment by loqs (loqs) - Monday, 08 May 2017, 23:40 GMT
Alternative simpler patch from https://bbs.archlinux.org/viewtopic.php?id=225902
diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
index a9671e2..e2c69f9 100644
--- a/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
@@ -38,6 +38,9 @@
#include <wlioctl.h>
#include <proto/802.11.h>
#include <wl_cfg80211_hybrid.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/sched/signal.h>
+#endif

#define EVENT_TYPE(e) dtoh32((e)->event_type)
#define EVENT_FLAGS(e) dtoh16((e)->flags)
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
index 4a99b9a..89e615b 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -2916,7 +2916,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
if (skb == NULL) return;

skb->dev = wl->monitor_dev;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
skb->dev->last_rx = jiffies;
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
skb_reset_mac_header(skb);
#else

follow the same principal as https://git.archlinux.org/svntogit/community.git/tree/trunk/linux-4.11.patch?h=packages/r8168&id=dc514506045c45a2d81da61b536d7bd4ebaccba8
of not storing a value that is never used
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 09 May 2017, 12:04 GMT
Hi, thanks for reporting. Will fix.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 10 May 2017, 19:33 GMT
Updated the package to include the patch. It builds here. Please confirm that it works as expected.
Comment by Deactivated account (TechnicalTotoro) - Wednesday, 10 May 2017, 20:12 GMT
Yes, it builds successfully and now works as expected.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 10 May 2017, 20:37 GMT
Great, thanks.

Loading...