mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
broadcom-wl-dkms: patch for 6.0
While we're at it, import change for 5.17 Close: #39950
This commit is contained in:
parent
c486af6717
commit
51faf6bcba
18 changed files with 250 additions and 201 deletions
|
@ -8,11 +8,9 @@ Last-Update: 2015-08-18
|
||||||
src/wl/sys/wl_linux.c | 2 +-
|
src/wl/sys/wl_linux.c | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
|
|
||||||
index 860b935..295156f 100644
|
|
||||||
--- a/src/wl/sys/wl_linux.c
|
--- a/src/wl/sys/wl_linux.c
|
||||||
+++ b/src/wl/sys/wl_linux.c
|
+++ b/src/wl/sys/wl_linux.c
|
||||||
@@ -2157,8 +2157,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
|
@@ -2165,8 +2165,8 @@ wl_start(struct sk_buff *skb, struct net
|
||||||
wlif = WL_DEV_IF(dev);
|
wlif = WL_DEV_IF(dev);
|
||||||
wl = WL_INFO(dev);
|
wl = WL_INFO(dev);
|
||||||
|
|
||||||
|
@ -22,6 +20,3 @@ index 860b935..295156f 100644
|
||||||
|
|
||||||
TXQ_LOCK(wl);
|
TXQ_LOCK(wl);
|
||||||
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
|
|
||||||
|
|
14
srcpkgs/broadcom-wl-dkms/patches/003-linux-4.3.patch
Normal file
14
srcpkgs/broadcom-wl-dkms/patches/003-linux-4.3.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
--- a/src/shared/linux_osl.c
|
||||||
|
+++ b/src/shared/linux_osl.c
|
||||||
|
@@ -932,7 +932,11 @@ osl_getcycles(void)
|
||||||
|
uint cycles;
|
||||||
|
|
||||||
|
#if defined(__i386__)
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
|
||||||
|
+ cycles = rdtsc();
|
||||||
|
+#else
|
||||||
|
rdtscl(cycles);
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
cycles = 0;
|
||||||
|
#endif
|
|
@ -10,28 +10,12 @@ makes heavy use of that enum. The simple fix is to re-create the values.
|
||||||
This patch came from the folks at Manjaro.
|
This patch came from the folks at Manjaro.
|
||||||
https://github.com/manjaro/packages-extra/blob/master/broadcom-wl-dkms/linux-47.patch
|
https://github.com/manjaro/packages-extra/blob/master/broadcom-wl-dkms/linux-47.patch
|
||||||
|
|
||||||
--- a/src/wl/sys/wl_linux.h 2016-06-04 15:24:22.915341000 +0200
|
--- a/src/wl/sys/wl_cfg80211_hybrid.h
|
||||||
+++ b/src/wl/sys/wl_linux.h 2016-06-04 15:29:36.236136244 +0200
|
+++ b/src/wl/sys/wl_cfg80211_hybrid.h
|
||||||
@@ -18,6 +18,13 @@
|
|
||||||
* $Id: wl_linux.h 369548 2012-11-19 09:01:01Z $
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
|
|
||||||
+#define ieee80211_band nl80211_band
|
|
||||||
+#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
|
|
||||||
+#define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ
|
|
||||||
+#define IEEE80211_NUM_BANDS NUM_NL80211_BANDS
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#ifndef _wl_linux_h_
|
|
||||||
#define _wl_linux_h_
|
|
||||||
|
|
||||||
--- a/src/wl/sys/wl_cfg80211_hybrid.h 2016-06-04 15:34:41.123022255 +0200
|
|
||||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.h 2016-06-04 15:37:25.391772105 +0200
|
|
||||||
@@ -19,6 +19,13 @@
|
@@ -19,6 +19,13 @@
|
||||||
* $Id: wl_cfg80211.h,v 1.1.8.1 2011-01-26 00:57:46 $
|
* $Id: wl_cfg80211.h,v 1.1.8.1 2011-01-26 00:57:46 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
|
||||||
+#define ieee80211_band nl80211_band
|
+#define ieee80211_band nl80211_band
|
||||||
+#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
|
+#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
|
||||||
|
@ -41,3 +25,20 @@ https://github.com/manjaro/packages-extra/blob/master/broadcom-wl-dkms/linux-47.
|
||||||
+
|
+
|
||||||
#ifndef _wl_cfg80211_h_
|
#ifndef _wl_cfg80211_h_
|
||||||
#define _wl_cfg80211_h_
|
#define _wl_cfg80211_h_
|
||||||
|
|
||||||
|
--- a/src/wl/sys/wl_linux.h
|
||||||
|
+++ b/src/wl/sys/wl_linux.h
|
||||||
|
@@ -18,6 +18,13 @@
|
||||||
|
* $Id: wl_linux.h 369548 2012-11-19 09:01:01Z $
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
|
||||||
|
+#define ieee80211_band nl80211_band
|
||||||
|
+#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
|
||||||
|
+#define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ
|
||||||
|
+#define IEEE80211_NUM_BANDS NUM_NL80211_BANDS
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifndef _wl_linux_h_
|
||||||
|
#define _wl_linux_h_
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839629
|
Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839629
|
||||||
|
|
||||||
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2016-10-03 10:53:55.588036464 +0200
|
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2016-10-03 10:54:11.911695944 +0200
|
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
@@ -2386,8 +2386,15 @@
|
@@ -2386,8 +2386,15 @@ wl_bss_connect_done(struct wl_cfg80211_p
|
||||||
s32 err = 0;
|
s32 err = 0;
|
||||||
|
|
||||||
if (wl->scan_request) {
|
if (wl->scan_request) {
|
||||||
|
@ -19,7 +19,7 @@ Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839629
|
||||||
wl->scan_request = NULL;
|
wl->scan_request = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2488,7 +2495,14 @@
|
@@ -2488,7 +2495,14 @@ wl_notify_scan_status(struct wl_cfg80211
|
||||||
|
|
||||||
scan_done_out:
|
scan_done_out:
|
||||||
if (wl->scan_request) {
|
if (wl->scan_request) {
|
||||||
|
@ -34,7 +34,7 @@ Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839629
|
||||||
wl->scan_request = NULL;
|
wl->scan_request = NULL;
|
||||||
}
|
}
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
@@ -2913,7 +2927,14 @@
|
@@ -2913,7 +2927,14 @@ s32 wl_cfg80211_down(struct net_device *
|
||||||
s32 err = 0;
|
s32 err = 0;
|
||||||
|
|
||||||
if (wl->scan_request) {
|
if (wl->scan_request) {
|
|
@ -1,5 +1,3 @@
|
||||||
diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
|
|
||||||
index a9671e2..da36405 100644
|
|
||||||
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
@@ -30,6 +30,9 @@
|
@@ -30,6 +30,9 @@
|
||||||
|
@ -12,8 +10,6 @@ index a9671e2..da36405 100644
|
||||||
#include <net/cfg80211.h>
|
#include <net/cfg80211.h>
|
||||||
#include <linux/nl80211.h>
|
#include <linux/nl80211.h>
|
||||||
#include <net/rtnetlink.h>
|
#include <net/rtnetlink.h>
|
||||||
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
|
|
||||||
index 489c9f5..f8278ad 100644
|
|
||||||
--- a/src/wl/sys/wl_linux.c
|
--- a/src/wl/sys/wl_linux.c
|
||||||
+++ b/src/wl/sys/wl_linux.c
|
+++ b/src/wl/sys/wl_linux.c
|
||||||
@@ -117,6 +117,9 @@ int wl_found = 0;
|
@@ -117,6 +117,9 @@ int wl_found = 0;
|
||||||
|
@ -26,7 +22,7 @@ index 489c9f5..f8278ad 100644
|
||||||
} priv_link_t;
|
} priv_link_t;
|
||||||
|
|
||||||
#define WL_DEV_IF(dev) ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif)
|
#define WL_DEV_IF(dev) ((wl_if_t*)((priv_link_t*)DEV_PRIV(dev))->wlif)
|
||||||
@@ -2450,6 +2453,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
|
@@ -2449,6 +2452,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rx
|
||||||
{
|
{
|
||||||
struct sk_buff *oskb = (struct sk_buff *)p;
|
struct sk_buff *oskb = (struct sk_buff *)p;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
@ -36,7 +32,7 @@ index 489c9f5..f8278ad 100644
|
||||||
uchar *pdata;
|
uchar *pdata;
|
||||||
uint len;
|
uint len;
|
||||||
|
|
||||||
@@ -2916,7 +2922,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
|
@@ -2915,7 +2921,13 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rx
|
||||||
if (skb == NULL) return;
|
if (skb == NULL) return;
|
||||||
|
|
||||||
skb->dev = wl->monitor_dev;
|
skb->dev = wl->monitor_dev;
|
|
@ -1,7 +1,6 @@
|
||||||
diff -ru work.orig/src/wl/sys/wl_cfg80211_hybrid.c work.patched/src/wl/sys/wl_cfg80211_hybrid.c
|
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2017-06-10 15:50:27.328823384 -0700
|
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2017-06-10 15:52:40.540809187 -0700
|
@@ -52,8 +52,13 @@ u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_I
|
||||||
@@ -52,8 +52,13 @@
|
|
||||||
u32 wl_dbg_level = WL_DBG_ERR;
|
u32 wl_dbg_level = WL_DBG_ERR;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +14,7 @@ diff -ru work.orig/src/wl/sys/wl_cfg80211_hybrid.c work.patched/src/wl/sys/wl_cf
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
||||||
static s32
|
static s32
|
||||||
wl_cfg80211_scan(struct wiphy *wiphy,
|
wl_cfg80211_scan(struct wiphy *wiphy,
|
||||||
@@ -466,7 +471,11 @@
|
@@ -466,7 +471,11 @@ wl_dev_ioctl(struct net_device *dev, u32
|
||||||
|
|
||||||
static s32
|
static s32
|
||||||
wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
|
wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
|
@ -27,7 +26,7 @@ diff -ru work.orig/src/wl/sys/wl_cfg80211_hybrid.c work.patched/src/wl/sys/wl_cf
|
||||||
struct vif_params *params)
|
struct vif_params *params)
|
||||||
{
|
{
|
||||||
struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
|
struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
|
||||||
@@ -2361,12 +2370,26 @@
|
@@ -2361,12 +2370,26 @@ wl_bss_roaming_done(struct wl_cfg80211_p
|
||||||
const wl_event_msg_t *e, void *data)
|
const wl_event_msg_t *e, void *data)
|
||||||
{
|
{
|
||||||
struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
|
struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
|
||||||
|
@ -42,19 +41,19 @@ diff -ru work.orig/src/wl/sys/wl_cfg80211_hybrid.c work.patched/src/wl/sys/wl_cf
|
||||||
wl_update_bss_info(wl);
|
wl_update_bss_info(wl);
|
||||||
+
|
+
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
+ roam_info.channel = &wl->conf->channel,
|
+ roam_info.channel = &wl->conf->channel;
|
||||||
+ roam_info.bssid = (u8 *)&wl->bssid,
|
+ roam_info.bssid = (u8 *)&wl->bssid;
|
||||||
+ roam_info.req_ie = conn_info->req_ie,
|
+ roam_info.req_ie = conn_info->req_ie;
|
||||||
+ roam_info.req_ie_len = conn_info->req_ie_len,
|
+ roam_info.req_ie_len = conn_info->req_ie_len;
|
||||||
+ roam_info.resp_ie = conn_info->resp_ie,
|
+ roam_info.resp_ie = conn_info->resp_ie;
|
||||||
+ roam_info.resp_ie_len = conn_info->resp_ie_len,
|
+ roam_info.resp_ie_len = conn_info->resp_ie_len;
|
||||||
+
|
+
|
||||||
+ cfg80211_roamed(ndev, &roam_info, GFP_KERNEL);
|
+ cfg80211_roamed(ndev, &roam_info, GFP_KERNEL);
|
||||||
+#else
|
+#else
|
||||||
cfg80211_roamed(ndev,
|
cfg80211_roamed(ndev,
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
|
||||||
&wl->conf->channel,
|
&wl->conf->channel,
|
||||||
@@ -2374,6 +2397,7 @@
|
@@ -2374,6 +2397,7 @@ wl_bss_roaming_done(struct wl_cfg80211_p
|
||||||
(u8 *)&wl->bssid,
|
(u8 *)&wl->bssid,
|
||||||
conn_info->req_ie, conn_info->req_ie_len,
|
conn_info->req_ie, conn_info->req_ie_len,
|
||||||
conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
|
conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
|
35
srcpkgs/broadcom-wl-dkms/patches/008-linux-4.14.patch
Normal file
35
srcpkgs/broadcom-wl-dkms/patches/008-linux-4.14.patch
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
From: Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar>
|
||||||
|
Date: Fri, 29 Dec 2017 23:44:24 -0400
|
||||||
|
Subject: linux414
|
||||||
|
Origin: https://bugs.debian.org/885885
|
||||||
|
|
||||||
|
linux 4.14 changed the kernel_read function prototype.
|
||||||
|
---
|
||||||
|
src/shared/linux_osl.c | 12 +++++++++++-
|
||||||
|
1 files changed, 12 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/src/shared/linux_osl.c
|
||||||
|
+++ b/src/shared/linux_osl.c
|
||||||
|
@@ -1076,11 +1076,21 @@ osl_os_get_image_block(char *buf, int le
|
||||||
|
{
|
||||||
|
struct file *fp = (struct file *)image;
|
||||||
|
int rdlen;
|
||||||
|
+ loff_t pos;
|
||||||
|
|
||||||
|
if (!image)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
- rdlen = kernel_read(fp, fp->f_pos, buf, len);
|
||||||
|
+ pos = fp->f_pos;
|
||||||
|
+ rdlen = kernel_read(fp,
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||||
|
+ pos,
|
||||||
|
+#endif
|
||||||
|
+ buf, len
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
|
||||||
|
+ ,&pos
|
||||||
|
+#endif
|
||||||
|
+ );
|
||||||
|
if (rdlen > 0)
|
||||||
|
fp->f_pos += rdlen;
|
||||||
|
|
46
srcpkgs/broadcom-wl-dkms/patches/009-linux-4.15.patch
Normal file
46
srcpkgs/broadcom-wl-dkms/patches/009-linux-4.15.patch
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
--- a/src/wl/sys/wl_linux.c
|
||||||
|
+++ b/src/wl/sys/wl_linux.c
|
||||||
|
@@ -93,7 +93,11 @@ struct iw_statistics *wl_get_wireless_st
|
||||||
|
|
||||||
|
#include <wlc_wowl.h>
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||||
|
static void wl_timer(ulong data);
|
||||||
|
+#else
|
||||||
|
+static void wl_timer(struct timer_list *tl);
|
||||||
|
+#endif
|
||||||
|
static void _wl_timer(wl_timer_t *t);
|
||||||
|
static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
|
||||||
|
|
||||||
|
@@ -2301,9 +2305,17 @@ wl_timer_task(wl_task_t *task)
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||||
|
wl_timer(ulong data)
|
||||||
|
+#else
|
||||||
|
+wl_timer(struct timer_list *tl)
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||||
|
wl_timer_t *t = (wl_timer_t *)data;
|
||||||
|
+#else
|
||||||
|
+ wl_timer_t *t = from_timer(t, tl, timer);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if (!WL_ALL_PASSIVE_ENAB(t->wl))
|
||||||
|
_wl_timer(t);
|
||||||
|
@@ -2355,9 +2367,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(
|
||||||
|
|
||||||
|
bzero(t, sizeof(wl_timer_t));
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||||
|
init_timer(&t->timer);
|
||||||
|
t->timer.data = (ulong) t;
|
||||||
|
t->timer.function = wl_timer;
|
||||||
|
+#else
|
||||||
|
+ timer_setup(&t->timer, wl_timer, 0);
|
||||||
|
+#endif
|
||||||
|
t->wl = wl;
|
||||||
|
t->fn = fn;
|
||||||
|
t->arg = arg;
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
@@ -43,6 +43,9 @@
|
@@ -46,6 +46,9 @@
|
||||||
#define EVENT_FLAGS(e) dtoh16((e)->flags)
|
#define EVENT_FLAGS(e) dtoh16((e)->flags)
|
||||||
#define EVENT_STATUS(e) dtoh32((e)->status)
|
#define EVENT_STATUS(e) dtoh32((e)->status)
|
||||||
|
|
||||||
|
@ -22,4 +22,3 @@
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
|
||||||
#define WL_DEV_LINK(dev) (priv_link_t*)(dev->priv)
|
#define WL_DEV_LINK(dev) (priv_link_t*)(dev->priv)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
diff --git src/shared/linux_osl.c src/shared/linux_osl.c
|
|
||||||
index 6157d18..8237ec7 100644
|
|
||||||
--- a/src/shared/linux_osl.c
|
--- a/src/shared/linux_osl.c
|
||||||
+++ b/src/shared/linux_osl.c
|
+++ b/src/shared/linux_osl.c
|
||||||
@@ -942,7 +942,7 @@ osl_getcycles(void)
|
@@ -946,7 +946,7 @@ osl_getcycles(void)
|
||||||
void *
|
void *
|
||||||
osl_reg_map(uint32 pa, uint size)
|
osl_reg_map(uint32 pa, uint size)
|
||||||
{
|
{
|
||||||
|
@ -11,11 +9,9 @@ index 6157d18..8237ec7 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
diff --git src/wl/sys/wl_linux.c src/wl/sys/wl_linux.c
|
|
||||||
index 0d05100..2ed1f0d 100644
|
|
||||||
--- a/src/wl/sys/wl_linux.c
|
--- a/src/wl/sys/wl_linux.c
|
||||||
+++ b/src/wl/sys/wl_linux.c
|
+++ b/src/wl/sys/wl_linux.c
|
||||||
@@ -582,7 +582,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
|
@@ -589,7 +589,7 @@ wl_attach(uint16 vendor, uint16 device,
|
||||||
}
|
}
|
||||||
wl->bcm_bustype = bustype;
|
wl->bcm_bustype = bustype;
|
||||||
|
|
||||||
|
@ -24,7 +20,7 @@ index 0d05100..2ed1f0d 100644
|
||||||
WL_ERROR(("wl%d: ioremap() failed\n", unit));
|
WL_ERROR(("wl%d: ioremap() failed\n", unit));
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@@ -772,7 +772,7 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
@@ -779,7 +779,7 @@ wl_pci_probe(struct pci_dev *pdev, const
|
||||||
if ((val & 0x0000ff00) != 0)
|
if ((val & 0x0000ff00) != 0)
|
||||||
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
|
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
|
||||||
bar1_size = pci_resource_len(pdev, 2);
|
bar1_size = pci_resource_len(pdev, 2);
|
||||||
|
@ -33,7 +29,7 @@ index 0d05100..2ed1f0d 100644
|
||||||
bar1_size);
|
bar1_size);
|
||||||
wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
|
wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
|
||||||
pdev->irq, bar1_addr, bar1_size);
|
pdev->irq, bar1_addr, bar1_size);
|
||||||
@@ -3335,12 +3335,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
|
@@ -3363,12 +3363,19 @@ wl_proc_write(struct file *filp, const c
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
|
@ -25,9 +25,8 @@ Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
|
||||||
src/wl/sys/wlc_pub.h | 1 +
|
src/wl/sys/wlc_pub.h | 1 +
|
||||||
5 files changed, 42 insertions(+), 51 deletions(-)
|
5 files changed, 42 insertions(+), 51 deletions(-)
|
||||||
|
|
||||||
diff -u -r src/wl/sys/wl_cfg80211_hybrid.c src/wl/sys/wl_cfg80211_hybrid.c
|
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2021-01-25 08:55:05.625224400 -0800
|
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2021-01-25 08:58:30.000982902 -0800
|
|
||||||
@@ -41,6 +41,7 @@
|
@@ -41,6 +41,7 @@
|
||||||
#include <wlioctl.h>
|
#include <wlioctl.h>
|
||||||
#include <proto/802.11.h>
|
#include <proto/802.11.h>
|
||||||
|
@ -36,7 +35,7 @@ diff -u -r src/wl/sys/wl_cfg80211_hybrid.c src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
|
|
||||||
#define EVENT_TYPE(e) dtoh32((e)->event_type)
|
#define EVENT_TYPE(e) dtoh32((e)->event_type)
|
||||||
#define EVENT_FLAGS(e) dtoh16((e)->flags)
|
#define EVENT_FLAGS(e) dtoh16((e)->flags)
|
||||||
@@ -446,30 +447,8 @@
|
@@ -446,30 +447,8 @@ static void key_endian_to_host(struct wl
|
||||||
static s32
|
static s32
|
||||||
wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
|
wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
|
||||||
{
|
{
|
||||||
|
@ -68,10 +67,9 @@ diff -u -r src/wl/sys/wl_cfg80211_hybrid.c src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
}
|
}
|
||||||
|
|
||||||
static s32
|
static s32
|
||||||
diff -u -r src/wl/sys/wl_iw.c src/wl/sys/wl_iw.c
|
--- a/src/wl/sys/wl_iw.c
|
||||||
--- a/src/wl/sys/wl_iw.c 2021-01-25 09:00:13.163543809 -0800
|
+++ b/src/wl/sys/wl_iw.c
|
||||||
+++ b/src/wl/sys/wl_iw.c 2021-01-25 09:02:04.218646005 -0800
|
@@ -37,6 +37,7 @@ typedef const struct si_pub si_t;
|
||||||
@@ -37,6 +37,7 @@
|
|
||||||
|
|
||||||
#include <wl_dbg.h>
|
#include <wl_dbg.h>
|
||||||
#include <wl_iw.h>
|
#include <wl_iw.h>
|
||||||
|
@ -79,7 +77,7 @@ diff -u -r src/wl/sys/wl_iw.c src/wl/sys/wl_iw.c
|
||||||
|
|
||||||
extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
|
extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status,
|
||||||
uint32 reason, char* stringBuf, uint buflen);
|
uint32 reason, char* stringBuf, uint buflen);
|
||||||
@@ -106,29 +107,7 @@
|
@@ -106,29 +107,7 @@ dev_wlc_ioctl(
|
||||||
int len
|
int len
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -110,10 +108,9 @@ diff -u -r src/wl/sys/wl_iw.c src/wl/sys/wl_iw.c
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
diff -u -r src/wl/sys/wl_linux.c src/wl/sys/wl_linux.c
|
--- a/src/wl/sys/wl_linux.c
|
||||||
--- a/src/wl/sys/wl_linux.c 2021-01-25 09:02:08.055475147 -0800
|
+++ b/src/wl/sys/wl_linux.c
|
||||||
+++ b/src/wl/sys/wl_linux.c 2021-01-25 09:06:11.894764339 -0800
|
@@ -1650,10 +1650,7 @@ wl_ioctl(struct net_device *dev, struct
|
||||||
@@ -1650,10 +1650,7 @@
|
|
||||||
goto done2;
|
goto done2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +122,7 @@ diff -u -r src/wl/sys/wl_linux.c src/wl/sys/wl_linux.c
|
||||||
if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
|
if (!(buf = (void *) MALLOC(wl->osh, MAX(ioc.len, WLC_IOCTL_MAXLEN)))) {
|
||||||
bcmerror = BCME_NORESOURCE;
|
bcmerror = BCME_NORESOURCE;
|
||||||
goto done2;
|
goto done2;
|
||||||
@@ -1674,7 +1671,7 @@
|
@@ -1674,7 +1671,7 @@ wl_ioctl(struct net_device *dev, struct
|
||||||
WL_UNLOCK(wl);
|
WL_UNLOCK(wl);
|
||||||
|
|
||||||
done1:
|
done1:
|
||||||
|
@ -134,7 +131,7 @@ diff -u -r src/wl/sys/wl_linux.c src/wl/sys/wl_linux.c
|
||||||
if (copy_to_user(ioc.buf, buf, ioc.len))
|
if (copy_to_user(ioc.buf, buf, ioc.len))
|
||||||
bcmerror = BCME_BADADDR;
|
bcmerror = BCME_BADADDR;
|
||||||
MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
|
MFREE(wl->osh, buf, MAX(ioc.len, WLC_IOCTL_MAXLEN));
|
||||||
@@ -1684,6 +1681,39 @@
|
@@ -1684,6 +1681,39 @@ done2:
|
||||||
ASSERT(VALID_BCMERROR(bcmerror));
|
ASSERT(VALID_BCMERROR(bcmerror));
|
||||||
if (bcmerror != 0)
|
if (bcmerror != 0)
|
||||||
wl->pub->bcmerror = bcmerror;
|
wl->pub->bcmerror = bcmerror;
|
||||||
|
@ -174,9 +171,8 @@ diff -u -r src/wl/sys/wl_linux.c src/wl/sys/wl_linux.c
|
||||||
return (OSL_ERROR(bcmerror));
|
return (OSL_ERROR(bcmerror));
|
||||||
}
|
}
|
||||||
|
|
||||||
diff -u -r src/wl/sys/wl_linux.h src/wl/sys/wl_linux.h
|
--- a/src/wl/sys/wl_linux.h
|
||||||
--- a/src/wl/sys/wl_linux.h 2021-01-25 09:06:15.188672391 -0800
|
+++ b/src/wl/sys/wl_linux.h
|
||||||
+++ b/src/wl/sys/wl_linux.h 2021-01-25 09:07:49.457810535 -0800
|
|
||||||
@@ -29,6 +29,7 @@
|
@@ -29,6 +29,7 @@
|
||||||
#define _wl_linux_h_
|
#define _wl_linux_h_
|
||||||
|
|
||||||
|
@ -185,7 +181,7 @@ diff -u -r src/wl/sys/wl_linux.h src/wl/sys/wl_linux.h
|
||||||
|
|
||||||
typedef struct wl_timer {
|
typedef struct wl_timer {
|
||||||
struct timer_list timer;
|
struct timer_list timer;
|
||||||
@@ -194,6 +195,7 @@
|
@@ -194,6 +195,7 @@ extern irqreturn_t wl_isr(int irq, void
|
||||||
extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
|
extern int __devinit wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
|
||||||
extern void wl_free(wl_info_t *wl);
|
extern void wl_free(wl_info_t *wl);
|
||||||
extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
|
extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
|
||||||
|
@ -193,9 +189,8 @@ diff -u -r src/wl/sys/wl_linux.h src/wl/sys/wl_linux.h
|
||||||
extern struct net_device * wl_netdev_get(wl_info_t *wl);
|
extern struct net_device * wl_netdev_get(wl_info_t *wl);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
diff -u -r src/wl/sys/wlc_pub.h src/wl/sys/wlc_pub.h
|
--- a/src/wl/sys/wlc_pub.h
|
||||||
--- a/src/wl/sys/wlc_pub.h 2021-01-25 09:07:54.543645032 -0800
|
+++ b/src/wl/sys/wlc_pub.h
|
||||||
+++ b/src/wl/sys/wlc_pub.h 2021-01-25 09:08:10.772110464 -0800
|
|
||||||
@@ -24,6 +24,7 @@
|
@@ -24,6 +24,7 @@
|
||||||
|
|
||||||
#include <wlc_types.h>
|
#include <wlc_types.h>
|
54
srcpkgs/broadcom-wl-dkms/patches/013-linux-5.17.patch
Normal file
54
srcpkgs/broadcom-wl-dkms/patches/013-linux-5.17.patch
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
Source: Arch Linux
|
||||||
|
--- a/src/wl/sys/wl_linux.c
|
||||||
|
+++ b/src/wl/sys/wl_linux.c
|
||||||
|
@@ -93,6 +93,10 @@ struct iw_statistics *wl_get_wireless_st
|
||||||
|
|
||||||
|
#include <wlc_wowl.h>
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||||
|
+#define PDE_DATA pde_data
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||||
|
static void wl_timer(ulong data);
|
||||||
|
#else
|
||||||
|
@@ -493,6 +497,12 @@ wl_if_setup(struct net_device *dev)
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
|
||||||
|
+static inline void eth_hw_addr_set(struct net_device *dev, const void *addr) {
|
||||||
|
+ memcpy(dev->dev_addr, addr, ETHER_ADDR_LEN);
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
static wl_info_t *
|
||||||
|
wl_attach(uint16 vendor, uint16 device, ulong regs,
|
||||||
|
uint bustype, void *btparam, uint irq, uchar* bar1_addr, uint32 bar1_size)
|
||||||
|
@@ -637,7 +647,7 @@ wl_attach(uint16 vendor, uint16 device,
|
||||||
|
WL_ERROR(("wl%d: Error setting MAC ADDRESS\n", unit));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
- bcopy(&wl->pub->cur_etheraddr, dev->dev_addr, ETHER_ADDR_LEN);
|
||||||
|
+ eth_hw_addr_set(dev, wl->pub->cur_etheraddr.octet);
|
||||||
|
|
||||||
|
online_cpus = 1;
|
||||||
|
|
||||||
|
@@ -1838,7 +1848,7 @@ wl_set_mac_address(struct net_device *de
|
||||||
|
|
||||||
|
WL_LOCK(wl);
|
||||||
|
|
||||||
|
- bcopy(sa->sa_data, dev->dev_addr, ETHER_ADDR_LEN);
|
||||||
|
+ eth_hw_addr_set(dev, sa->sa_data);
|
||||||
|
err = wlc_iovar_op(wl->wlc, "cur_etheraddr", NULL, 0, sa->sa_data, ETHER_ADDR_LEN,
|
||||||
|
IOV_SET, (WL_DEV_IF(dev))->wlcif);
|
||||||
|
WL_UNLOCK(wl);
|
||||||
|
@@ -3021,7 +3031,7 @@ _wl_add_monitor_if(wl_task_t *task)
|
||||||
|
else
|
||||||
|
dev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||||
|
|
||||||
|
- bcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN);
|
||||||
|
+ eth_hw_addr_set(dev, wl->dev->dev_addr);
|
||||||
|
|
||||||
|
#if defined(WL_USE_NETDEV_OPS)
|
||||||
|
dev->netdev_ops = &wl_netdev_monitor_ops;
|
|
@ -1,7 +1,6 @@
|
||||||
diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
--- a/src/shared/linux_osl.c
|
||||||
--- a/src/shared/linux_osl.c 2022-05-24 20:51:15.662604980 +0000
|
+++ b/src/shared/linux_osl.c
|
||||||
+++ b/src/shared/linux_osl.c 2022-05-24 21:13:38.264472425 +0000
|
@@ -599,6 +599,8 @@ osl_dma_alloc_consistent(osl_t *osh, uin
|
||||||
@@ -599,6 +599,8 @@
|
|
||||||
va = kmalloc(size, GFP_ATOMIC | __GFP_ZERO);
|
va = kmalloc(size, GFP_ATOMIC | __GFP_ZERO);
|
||||||
if (va)
|
if (va)
|
||||||
*pap = (ulong)__virt_to_phys(va);
|
*pap = (ulong)__virt_to_phys(va);
|
||||||
|
@ -10,7 +9,7 @@ diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
||||||
#else
|
#else
|
||||||
va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap);
|
va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap);
|
||||||
#endif
|
#endif
|
||||||
@@ -612,6 +614,8 @@
|
@@ -612,6 +614,8 @@ osl_dma_free_consistent(osl_t *osh, void
|
||||||
|
|
||||||
#ifdef __ARM_ARCH_7A__
|
#ifdef __ARM_ARCH_7A__
|
||||||
kfree(va);
|
kfree(va);
|
||||||
|
@ -19,7 +18,7 @@ diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
||||||
#else
|
#else
|
||||||
pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa);
|
pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa);
|
||||||
#endif
|
#endif
|
||||||
@@ -623,7 +627,11 @@
|
@@ -623,7 +627,11 @@ osl_dma_map(osl_t *osh, void *va, uint s
|
||||||
int dir;
|
int dir;
|
||||||
|
|
||||||
ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
|
ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
|
||||||
|
@ -31,7 +30,7 @@ diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
||||||
|
|
||||||
#if defined(__ARM_ARCH_7A__) && defined(BCMDMASGLISTOSL)
|
#if defined(__ARM_ARCH_7A__) && defined(BCMDMASGLISTOSL)
|
||||||
if (dmah != NULL) {
|
if (dmah != NULL) {
|
||||||
@@ -641,7 +649,11 @@
|
@@ -641,7 +649,11 @@ osl_dma_map(osl_t *osh, void *va, uint s
|
||||||
ASSERT(totsegs + nsegs <= MAX_DMA_SEGS);
|
ASSERT(totsegs + nsegs <= MAX_DMA_SEGS);
|
||||||
sg->page_link = 0;
|
sg->page_link = 0;
|
||||||
sg_set_buf(sg, PKTDATA(osh, skb), PKTLEN(osh, skb));
|
sg_set_buf(sg, PKTDATA(osh, skb), PKTLEN(osh, skb));
|
||||||
|
@ -43,7 +42,7 @@ diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
||||||
}
|
}
|
||||||
totsegs += nsegs;
|
totsegs += nsegs;
|
||||||
totlen += PKTLEN(osh, skb);
|
totlen += PKTLEN(osh, skb);
|
||||||
@@ -656,7 +668,11 @@
|
@@ -656,7 +668,11 @@ osl_dma_map(osl_t *osh, void *va, uint s
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -55,7 +54,7 @@ diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
||||||
}
|
}
|
||||||
|
|
||||||
void BCMFASTPATH
|
void BCMFASTPATH
|
||||||
@@ -665,8 +681,13 @@
|
@@ -665,8 +681,13 @@ osl_dma_unmap(osl_t *osh, uint pa, uint
|
||||||
int dir;
|
int dir;
|
||||||
|
|
||||||
ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
|
ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));
|
31
srcpkgs/broadcom-wl-dkms/patches/015-linux-6.0.patch
Normal file
31
srcpkgs/broadcom-wl-dkms/patches/015-linux-6.0.patch
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
From 933540c63f33e6ac2825d65c4b681ef3387d9146 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Antoine Cotten <hello@acotten.com>
|
||||||
|
Date: Mon, 15 Aug 2022 17:53:51 +0200
|
||||||
|
Subject: [PATCH] cfg80211_roam_info compat for MLO APIs in Linux >= 6.0
|
||||||
|
|
||||||
|
The 'bssid' struct field is now under 'links.bssid'.
|
||||||
|
|
||||||
|
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=efbabc11650040c64884ff3019b88c7bcc0ceb1d
|
||||||
|
|
||||||
|
Original patch by Joan Bruguera:
|
||||||
|
https://gist.github.com/joanbm/207210d74637870c01ef5a3c262a597d
|
||||||
|
---
|
||||||
|
src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
--- a/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
|
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
||||||
|
@@ -2363,8 +2363,13 @@ wl_bss_roaming_done(struct wl_cfg80211_p
|
||||||
|
wl_update_bss_info(wl);
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||||
|
+ roam_info.links[0].channel = &wl->conf->channel;
|
||||||
|
+ roam_info.links[0].bssid = (u8 *)&wl->bssid;
|
||||||
|
+#else
|
||||||
|
roam_info.channel = &wl->conf->channel;
|
||||||
|
roam_info.bssid = (u8 *)&wl->bssid;
|
||||||
|
+#endif
|
||||||
|
roam_info.req_ie = conn_info->req_ie;
|
||||||
|
roam_info.req_ie_len = conn_info->req_ie_len;
|
||||||
|
roam_info.resp_ie = conn_info->resp_ie;
|
|
@ -1,13 +0,0 @@
|
||||||
https://github.com/voidlinux/xbps-packages/issues/412
|
|
||||||
|
|
||||||
--- a/Makefile 2014-05-21 12:47:46.915833131 +0200
|
|
||||||
+++ b/Makefile 2014-05-21 12:48:54.027409879 +0200
|
|
||||||
@@ -126,6 +126,8 @@ EXTRA_CFLAGS += -I$(src)/src/wl/sy
|
|
||||||
EXTRA_CFLAGS += -I$(src)/src/shared/bcmwifi/include
|
|
||||||
#EXTRA_CFLAGS += -DBCMDBG_ASSERT
|
|
||||||
|
|
||||||
+EXTRA_CFLAGS += -Wno-date-time
|
|
||||||
+
|
|
||||||
EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
|
|
||||||
|
|
||||||
KBASE ?= /lib/modules/`uname -r`
|
|
|
@ -1,44 +0,0 @@
|
||||||
--- a/src/wl/sys/wl_linux.c 2018-01-31 11:33:26.000000000 +0100
|
|
||||||
+++ b/src/wl/sys/wl_linux.c 2018-01-31 15:27:18.000000000 +0100
|
|
||||||
@@ -93,7 +93,11 @@
|
|
||||||
|
|
||||||
#include <wlc_wowl.h>
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
|
||||||
static void wl_timer(ulong data);
|
|
||||||
+#else
|
|
||||||
+static void wl_timer(struct timer_list *tl);
|
|
||||||
+#endif
|
|
||||||
static void _wl_timer(wl_timer_t *t);
|
|
||||||
static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
|
|
||||||
|
|
||||||
@@ -2301,9 +2305,17 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
|
||||||
wl_timer(ulong data)
|
|
||||||
+#else
|
|
||||||
+wl_timer(struct timer_list *tl)
|
|
||||||
+#endif
|
|
||||||
{
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
|
||||||
wl_timer_t *t = (wl_timer_t *)data;
|
|
||||||
+#else
|
|
||||||
+ wl_timer_t *t = from_timer(t, tl, timer);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
if (!WL_ALL_PASSIVE_ENAB(t->wl))
|
|
||||||
_wl_timer(t);
|
|
||||||
@@ -2355,7 +2367,11 @@
|
|
||||||
|
|
||||||
bzero(t, sizeof(wl_timer_t));
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
|
||||||
init_timer(&t->timer);
|
|
||||||
t->timer.data = (ulong) t;
|
|
||||||
t->timer.function = wl_timer;
|
|
||||||
+#else
|
|
||||||
+ timer_setup(&t->timer, wl_timer, 0);
|
|
||||||
+#endif
|
|
||||||
t->wl = wl;
|
|
|
@ -1,15 +0,0 @@
|
||||||
diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c
|
|
||||||
--- a/src/shared/linux_osl.c 2015-09-18 15:47:30.000000000 -0700
|
|
||||||
+++ b/src/shared/linux_osl.c 2015-11-14 15:38:10.484563014 -0800
|
|
||||||
@@ -932,7 +932,11 @@
|
|
||||||
uint cycles;
|
|
||||||
|
|
||||||
#if defined(__i386__)
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
|
|
||||||
+ cycles = rdtsc();
|
|
||||||
+#else
|
|
||||||
rdtscl(cycles);
|
|
||||||
+#endif
|
|
||||||
#else
|
|
||||||
cycles = 0;
|
|
||||||
#endif
|
|
|
@ -1,39 +0,0 @@
|
||||||
diff -u -r a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
|
|
||||||
--- a/src/wl/sys/wl_linux.c 2022-03-23 00:35:42.930416350 +0000
|
|
||||||
+++ b/src/wl/sys/wl_linux.c 2022-03-23 00:40:12.903771013 +0000
|
|
||||||
@@ -2980,7 +2980,11 @@
|
|
||||||
else
|
|
||||||
dev->type = ARPHRD_IEEE80211_RADIOTAP;
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
|
||||||
bcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN);
|
|
||||||
+#else
|
|
||||||
+ eth_hw_addr_set(wl->dev, dev->dev_addr);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#if defined(WL_USE_NETDEV_OPS)
|
|
||||||
dev->netdev_ops = &wl_netdev_monitor_ops;
|
|
||||||
@@ -3261,7 +3265,11 @@
|
|
||||||
static ssize_t
|
|
||||||
wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp)
|
|
||||||
{
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
|
||||||
wl_info_t * wl = PDE_DATA(file_inode(filp));
|
|
||||||
+#else
|
|
||||||
+ wl_info_t * wl = pde_data(file_inode(filp));
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
int bcmerror, len;
|
|
||||||
int to_user = 0;
|
|
||||||
@@ -3318,7 +3326,11 @@
|
|
||||||
static ssize_t
|
|
||||||
wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp)
|
|
||||||
{
|
|
||||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
|
||||||
wl_info_t * wl = PDE_DATA(file_inode(filp));
|
|
||||||
+#else
|
|
||||||
+ wl_info_t * wl = pde_data(file_inode(filp));
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
int from_user = 0;
|
|
||||||
int bcmerror;
|
|
Loading…
Add table
Reference in a new issue