Skip to content

Commit 70dea42

Browse files
committed
broadcom-wl-dkms: Add fix for 7.1 Kernel
Signed-off-by: Peter Jung <admin@ptr1337.dev>
1 parent 4097c47 commit 70dea42

28 files changed

Lines changed: 1725 additions & 0 deletions

broadcom-wl-dkms/.SRCINFO

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
pkgbase = broadcom-wl-dkms
2+
pkgdesc = Broadcom 802.11 Linux STA wireless driver
3+
pkgver = 6.30.223.271
4+
pkgrel = 48
5+
url = https://www.broadcom.com/site-search?filters[pages][content_type][values][]=Downloads&q=802.11%20linux%20sta%20wireless%20driver
6+
install = broadcom-wl-dkms.install
7+
arch = x86_64
8+
license = custom
9+
depends = dkms
10+
conflicts = broadcom-wl
11+
source = broadcom-wl-dkms.conf
12+
source = dkms.conf.in
13+
source = 001-null-pointer-fix.patch
14+
source = 002-rdtscl.patch
15+
source = 003-linux47.patch
16+
source = 004-linux48.patch
17+
source = 005-debian-fix-kernel-warnings.patch
18+
source = 006-linux411.patch
19+
source = 007-linux412.patch
20+
source = 008-linux415.patch
21+
source = 009-fix_mac_profile_discrepancy.patch
22+
source = 010-linux56.patch
23+
source = 011-linux59.patch
24+
source = 012-linux517.patch
25+
source = 013-linux518.patch
26+
source = 014-linux414.patch
27+
source = 015-linux600.patch
28+
source = 016-linux601.patch
29+
source = 017-linux612.patch
30+
source = 018-linux613.patch
31+
source = 019-linux614.patch
32+
source = 020-linux615.patch
33+
source = 021-linux617.patch
34+
source = 022-linux71.patch
35+
source = https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
36+
b2sums = 7c4eaa825a37358509a08e5105665eeabc9f097945b6fa163cd5722b00638da5889f5466bd2c5f1b01172f2d0c9fb195f6e18329f2880adb2774406684cbc4c0
37+
b2sums = 2d9d5cf410b74c9eb9238a469ff04cd3c4223716c51fa6431abb36c3d31e13ce2bea7179df392e92c23e615ee9d4f34ff156aefa2ea9bf6a2754b2079fcad5db
38+
b2sums = 038150b9a50025dbd3c81d09755956216b83c0b54db29dc4bfbc3b46bd67cf4640ad643d69ba7f8d486f52cedeb00929b97e02152e72404e6126a05855f97d6f
39+
b2sums = bbc80e1ac01683ccc2d940212347fc11c74bdc252d492ca79a292015ac25df6a153ac97cb6c0f0a8d51c1c33d5dc0de4fdd61b1958499b946dc817d29646b72f
40+
b2sums = ecf3eb75f8eb3331b0a36b39851536de43cffd3b303db9e9f4fe6fe55d463c3343aba17a99668448427764a719e15e3e862d6a3dc0bc61cb68da9934fb427c6f
41+
b2sums = 7e091ac44616ea4cfa80b3a5563f4c6a235d2431b911f6bc52074a76b2c1d609dc546430f048abf042f862907f573c6b1dfa24c8c424aeefe73ff13ae3f34900
42+
b2sums = 3b65cccde7ed80bd88bf945cca6b71fca9eccc4a910666dad4df56a24471535e1d6007e1ea24567002c927357b525683b02c6a7ad2986aca738fc81ab736219f
43+
b2sums = 28ef5e50fa11fc15b409f3b3ee42aaf329756354ba8b7923d1b27939a6b21bd64b72a4adfb2eeff3c48bb8c4c1bc4294e8fd7744b83768974bf5d0592e20c148
44+
b2sums = 06035b1bca121c72b5e6bf120df644d5496d6020cf8537ec83917bb0f5b5a0a25129730f46201da2cc61e48cbcf4e9d3ed7757f3223e1d3b6e29b531c4c8fabb
45+
b2sums = 091e1da266ebaa0d429663facf3e81c849fe900c446e1c270ba23b65c15a99efeb1ae6c20905dfcc21b5f4bc3f91b32eb3b7bc9841f2a23508c71312403af774
46+
b2sums = 7c8012fa51592a3fca6dfde7a7a9c6dd37eb6c406d3f8695927e32c9e714c3faa23295b116a6cd97ec0403b123747b9095883bd7e3abe6c1888c3c9a4630f9f4
47+
b2sums = 21f7fc163ffcf6857f3a21a8519a42600fd6b3658d14b32191ef1142c817c10c8dc691a3bc39228927ac29d7b7ac5c3a62eb786853046bacb9cc74efb51b6cb0
48+
b2sums = c1f522f6554a7bfe0f7b789b042ada14316ecc87bc196c83bec95f684152f323a4c31f60ff26843e36338b8c7949bf36719a5c8afa439ff71f7c74dae4c755b6
49+
b2sums = d84d08161530bb9f05f627ec798a0897643869ea9b80781ae9eee85b072922c52e5127e55f04265c53fcfedc4e9da166eb3bb9f9fc2e139d62517ec54c2f45bb
50+
b2sums = e5ae3570dc2f27105c50e6dec807c1f4f1a2824995e0951e7ff405114d519e4f33992d8d2ea2c2d4fc3f9271d57f89bfb5b6b5c79af2c89492209a86ad673456
51+
b2sums = 0b1075bd59e8046969052ceb9cbe305ac2373b5d1600701ffcffb5219d3765ef5d15465c3aff63bbc547ed4f663dc4816d1b4fa09176d6c78828e488a9a863c4
52+
b2sums = 7d4dfe48577456436d0932bd1eca78fc1f0a952e141f13641b93bb24161a9f6847152966631cc05a6d707f9cf8adbded55a19aeaa2c15c963fffb5db9eff9f63
53+
b2sums = ca3aa742339bbe767916c8e2b62ec0b96e0e3f9b74bde55737fb98b7d71e97ecf7bf772fa9c4e8a50a4e8d821eeb8638d8d060c8e01de1a6fc7df58167459c38
54+
b2sums = 89a234cfbe2ddf3c938fc33b846c29cbf67907919bc3b103405b4e020bbaeb615ad0fc884ec314b17ca9c3ac63256dea2387851383934b7483cfca67dccbed17
55+
b2sums = 03e42e33a1fa2a1b64f36cd38f83ca431aa9d3914d52015bac6e4717071938e05c69c53f644653823a4a2a2278243a4d8564477597e8cae28bdb017615b4b102
56+
b2sums = bf7b311155338d9bd2ea087aa24b5601f3ca291c2aaf6509ad6c196f956f8d8311487a30965eb1db562f6caa3fddb2537e4246519582ceb0ca4e8d07ac4027ee
57+
b2sums = 437331014f32b0359f9a2158bbc76f784a5c2ffa1a40896650208ceec59444d806a2b03e9b93b53647dd4898f1f50b3559b05ebda6d1812a2bf032f83d485718
58+
b2sums = baca8629fbe97fc784b1b79cd454a06fa1a30d246f9263be6296a12d277f688e712a5b74e7a2d1c3d0b283f380434bdbf90495d307537e04cf0cdea600e60c67
59+
b2sums = 20d3149bada3f08efd457d65246ce27206f75dae3bc801595769936dd3b63fa8714a2e696973d3a78d85a8e2f224db3122d11c176e4937f821f20115595f5449
60+
b2sums = e9d01c1a1a63c07f720e3ee53ee3ef634ab12694135300cb0ce47ade0e9e0084967a0b6df64d983e8184240eb3defb128f650bddb7727e901d50315307f3398a
61+
62+
pkgname = broadcom-wl-dkms

broadcom-wl-dkms/.nvchecker.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[broadcom-wl-dkms]
2+
source = "repology"
3+
repology = "broadcom-sta"
4+
repo = "debian_unstable"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Description: Fixing null pointer crash
2+
3+
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773713
4+
Bug-Ubuntu: https://launchpad.net/bugs/1415880
5+
Last-Update: 2015-08-18
6+
7+
---
8+
src/wl/sys/wl_linux.c | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
12+
index 860b935..295156f 100644
13+
--- a/src/wl/sys/wl_linux.c
14+
+++ b/src/wl/sys/wl_linux.c
15+
@@ -2157,8 +2157,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
16+
wlif = WL_DEV_IF(dev);
17+
wl = WL_INFO(dev);
18+
19+
+ skb->prev = NULL;
20+
if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
21+
- skb->prev = NULL;
22+
23+
TXQ_LOCK(wl);
24+
25+
--
26+
1.9.1
27+

broadcom-wl-dkms/002-rdtscl.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Since Linux 4.3, rdtscl() is no longer available and native_read_tsc()
2+
is renamed to rdtsc(). Move the macro contents in-line and call the
3+
new function. References:
4+
5+
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
6+
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
7+
8+
diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c
9+
--- a/src/shared/linux_osl.c 2015-09-19 01:47:15.000000000 +0300
10+
+++ b/src/shared/linux_osl.c 2015-11-21 15:20:30.585902518 +0200
11+
@@ -932,7 +932,11 @@
12+
uint cycles;
13+
14+
#if defined(__i386__)
15+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
16+
+ cycles = (u32)rdtsc();
17+
+#else
18+
rdtscl(cycles);
19+
+#endif
20+
#else
21+
cycles = 0;
22+
#endif

broadcom-wl-dkms/003-linux47.patch

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
Since Linux 4.7, the enum ieee80211_band is no longer used
2+
3+
This shall cause no problem's since both enums ieee80211_band
4+
and nl80211_band were added in the same commit:
5+
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
6+
7+
This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
8+
9+
Reference:
10+
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
11+
12+
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:57:36.159340297 -0500
13+
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:58:18.442323435 -0500
14+
@@ -236,7 +236,7 @@
15+
#endif
16+
17+
#define CHAN2G(_channel, _freq, _flags) { \
18+
- .band = IEEE80211_BAND_2GHZ, \
19+
+ .band = NL80211_BAND_2GHZ, \
20+
.center_freq = (_freq), \
21+
.hw_value = (_channel), \
22+
.flags = (_flags), \
23+
@@ -245,7 +245,7 @@
24+
}
25+
26+
#define CHAN5G(_channel, _flags) { \
27+
- .band = IEEE80211_BAND_5GHZ, \
28+
+ .band = NL80211_BAND_5GHZ, \
29+
.center_freq = 5000 + (5 * (_channel)), \
30+
.hw_value = (_channel), \
31+
.flags = (_flags), \
32+
@@ -379,7 +379,7 @@
33+
};
34+
35+
static struct ieee80211_supported_band __wl_band_2ghz = {
36+
- .band = IEEE80211_BAND_2GHZ,
37+
+ .band = NL80211_BAND_2GHZ,
38+
.channels = __wl_2ghz_channels,
39+
.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
40+
.bitrates = wl_g_rates,
41+
@@ -387,7 +387,7 @@
42+
};
43+
44+
static struct ieee80211_supported_band __wl_band_5ghz_a = {
45+
- .band = IEEE80211_BAND_5GHZ,
46+
+ .band = NL80211_BAND_5GHZ,
47+
.channels = __wl_5ghz_a_channels,
48+
.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
49+
.bitrates = wl_a_rates,
50+
@@ -395,7 +395,7 @@
51+
};
52+
53+
static struct ieee80211_supported_band __wl_band_5ghz_n = {
54+
- .band = IEEE80211_BAND_5GHZ,
55+
+ .band = NL80211_BAND_5GHZ,
56+
.channels = __wl_5ghz_n_channels,
57+
.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
58+
.bitrates = wl_a_rates,
59+
@@ -1876,8 +1876,8 @@
60+
wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
61+
#endif
62+
wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
63+
- wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
64+
- wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
65+
+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
66+
+ wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a;
67+
wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
68+
wdev->wiphy->cipher_suites = __wl_cipher_suites;
69+
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
70+
@@ -2000,7 +2000,7 @@
71+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
72+
freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
73+
(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
74+
- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
75+
+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
76+
#else
77+
freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
78+
#endif
79+
@@ -2116,7 +2116,7 @@
80+
return err;
81+
}
82+
chan = wf_chspec_ctlchan(chanspec);
83+
- band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
84+
+ band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
85+
freq = ieee80211_channel_to_frequency(chan, band);
86+
channel = ieee80211_get_channel(wiphy, freq);
87+
cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
88+
@@ -2250,10 +2250,10 @@
89+
join_params->params.chanspec_list[0] =
90+
ieee80211_frequency_to_channel(chan->center_freq);
91+
92+
- if (chan->band == IEEE80211_BAND_2GHZ) {
93+
+ if (chan->band == NL80211_BAND_2GHZ) {
94+
chanspec |= WL_CHANSPEC_BAND_2G;
95+
}
96+
- else if (chan->band == IEEE80211_BAND_5GHZ) {
97+
+ else if (chan->band == NL80211_BAND_5GHZ) {
98+
chanspec |= WL_CHANSPEC_BAND_5G;
99+
}
100+
else {
101+
@@ -2885,7 +2885,7 @@
102+
103+
if (phy == 'n' || phy == 'a' || phy == 'v') {
104+
wiphy = wl_to_wiphy(wl);
105+
- wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
106+
+ wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
107+
}
108+
109+
return err;

broadcom-wl-dkms/004-linux48.patch

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001
2+
From: Alberto Milone <alberto.milone@canonical.com>
3+
Date: Fri, 2 Sep 2016 17:35:34 +0200
4+
Subject: [PATCH 1/1] Add support for Linux 4.8
5+
6+
Orginal author: Krzysztof Kolasa
7+
---
8+
src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++
9+
1 file changed, 22 insertions(+)
10+
11+
diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
12+
index 2fc71fe..ec5e472 100644
13+
--- a/src/wl/sys/wl_cfg80211_hybrid.c
14+
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
15+
@@ -2388,8 +2388,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
16+
s32 err = 0;
17+
18+
if (wl->scan_request) {
19+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
20+
+ struct cfg80211_scan_info info = {
21+
+ .aborted = true,
22+
+ };
23+
+ WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
24+
+ cfg80211_scan_done(wl->scan_request, &info);
25+
+#else
26+
WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
27+
cfg80211_scan_done(wl->scan_request, true);
28+
+#endif
29+
wl->scan_request = NULL;
30+
}
31+
32+
@@ -2490,7 +2498,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
33+
34+
scan_done_out:
35+
if (wl->scan_request) {
36+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
37+
+ struct cfg80211_scan_info info = {
38+
+ .aborted = false,
39+
+ };
40+
+ cfg80211_scan_done(wl->scan_request, &info);
41+
+#else
42+
cfg80211_scan_done(wl->scan_request, false);
43+
+#endif
44+
wl->scan_request = NULL;
45+
}
46+
rtnl_unlock();
47+
@@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(struct net_device *ndev)
48+
s32 err = 0;
49+
50+
if (wl->scan_request) {
51+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
52+
+ struct cfg80211_scan_info info = {
53+
+ .aborted = true,
54+
+ };
55+
+ cfg80211_scan_done(wl->scan_request, &info);
56+
+#else
57+
cfg80211_scan_done(wl->scan_request, true);
58+
+#endif
59+
wl->scan_request = NULL;
60+
}
61+
62+
--
63+
2.7.4
64+

0 commit comments

Comments
 (0)