Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c 2index a9671e2..da36405 100644 3--- a/src/wl/sys/wl_cfg80211_hybrid.c 4+++ b/src/wl/sys/wl_cfg80211_hybrid.c 5@@ -30,6 +30,9 @@ 6 #include <linux/kthread.h> 7 #include <linux/netdevice.h> 8 #include <linux/ieee80211.h> 9+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 10+#include <linux/sched/signal.h> 11+#endif 12 #include <net/cfg80211.h> 13 #include <linux/nl80211.h> 14 #include <net/rtnetlink.h> 15diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c 16index 489c9f5..f8278ad 100644 17--- a/src/wl/sys/wl_linux.c 18+++ b/src/wl/sys/wl_linux.c 19@@ -117,6 +117,9 @@ int wl_found = 0; 20 21 typedef struct priv_link { 22 wl_if_t *wlif; 23+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 24+ unsigned long last_rx; 25+#endif 26 } priv_link_t; 27 28 #define WL_DEV_IF(dev) ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif) 29@@ -2450,6 +2453,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) 30 { 31 struct sk_buff *oskb = (struct sk_buff *)p; 32 struct sk_buff *skb; 33+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 34+ priv_link_t *priv_link; 35+#endif 36 uchar *pdata; 37 uint len; 38 39@@ -2916,7 +2922,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) 40 if (skb == NULL) return; 41 42 skb->dev = wl->monitor_dev; 43+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) 44+ priv_link = MALLOC(wl->osh, sizeof(priv_link_t)); 45+ priv_link = netdev_priv(skb->dev); 46+ priv_link->last_rx = jiffies; 47+#else 48 skb->dev->last_rx = jiffies; 49+#endif 50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) 51 skb_reset_mac_header(skb); 52 #else