Debian Patches

Status for broadcom-sta/6.30.223.271-26

Patch Description Author Forwarded Bugs Origin Last update
01-shipped-module.patch Select wlc_hybrid.o based on the target kernel architecture Ben Hutchings <ben@decadent.org.uk> no http://bugs.debian.org/651787 2012-11-19
02-Parse-KERNELRELEASE-into-VERSION-PATCHLEVEL-and-SUBLEV.patch Parse KERNELRELEASE into VERSION, PATCHLEVEL, and SUBLEVEL
This fixes build error message:
====
/bin/sh: 1: [: Illegal number:
/bin/sh: 1: [: Illegal number:
Wireless Extension is the only possible API for this kernel version
Using Wireless Extension API
====
Roger Shimizu <rosh@debian.org> no 2020-04-17
03-rename-to-wlan0.patch rename-to-wlan0

renames the interface ethX that the driver automatically
generates to another called wlanX like all the wireless drivers.
Carlos Alberto Lopez Perez <clopez@igalia.com> no https://bugs.debian.org/648169 2011-11-08
04-user_ioctl.patch Allow normal users to send ioctl requests Cyril Lacoux <clacoux@easter-eggs.com> no https://bugs.debian.org/672677 2012-11-19
05-remove-time-and-date-macros.patch Remove __TIME__ and __DATE__ macros from code Cyril Lacoux <clacoux@easter-eggs.com> no https://bugs.debian.org/754434 2014-08-13
06-broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash

Downloaded from https://gist.github.com/hobarrera/ac0e6225210ac5bb13f6#file-broadcom-sta-6-30-223-248-linux-3-18-null-pointer-crash-patch
Hugo Osvaldo Barrera <hugo@barrera.io> no https://bugs.debian.org/773713 2015-05-06
07-rdtscl.patch rdtscl

Since Linux 4.3, rdtscl() is no longer available and native_read_tsc()
is renamed to rdtsc(). Move the macro contents in-line and call the
new function. References:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
Eduard Bloch <blade@debian.org> no https://bugs.debian.org/808954 2015-12-25
08-linux47.patch linux47

Since Linux 4.7, the enum ieee80211_band is no longer used

This shall cause no problem's since both enums ieee80211_band
and nl80211_band were added in the same commit:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c

This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*

Reference:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3

This patch is based on
https://github.com/archlinuxcn/repo/tree/f4d6cff1cacf8dad13006fade5f96bc2cf020a9b/broadcom-wl-dkms .
Felix Yan <felixonmars@archlinux.org> no https://github.com/archlinuxcn/repo/tree/f4d6cff1cacf8dad13006fade5f96bc2cf020a9b/broadcom-wl-dkms 2016-06-20
09-linux48.patch linux48

Looking at the patch for kernel 4.8, I came up with the attached patch
(and I send this mail while running it :)

Thanks,
Koos Vriezen
koos vriezen <koos.vriezen@gmail.com> no https://bugs.debian.org/839629 2016-10-03
10-fix-kernel-warnings.patch fix-kernel-warnings Luis Ortega <luiorpe1@gmail.com> no https://bugs.debian.org/843387 2016-11-06
11-linux411.patch Compile fix with kernel 4.11

I use the attached patch to get this module compiled with 4.11. Works
for me since last sunday.
Apparently https://aur.archlinux.org/cgit/aur.git/tree/linux411.patch?h=broadcom-wl
has come with a different patch for the removed last_rx field in
netdevice. But judging the commit log
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/include/linux/netdevice.h?id=4a7c972644c1151f6dd34ff4b5f7eacb239e22ee
and the fact that last_rx isn't used elsewhere I came up with just
ifdef it out.
koos vriezen <koos.vriezen@gmail.com> no http://bugs.debian.org/861807 2017-05-04
12-linux412.patch linux412 koos vriezen <koos.vriezen@gmail.com> no https://bugs.debian.org/867258 2017-07-03
13-linux414.patch linux414

linux 4.14 changed the kernel_read function prototype.
Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar> no https://bugs.debian.org/885885 2017-12-29
14-linux415.patch linux415

linux 4.15 deprecated the init_timer function.
Gerardo Esteban Malazdrewicz <gerardo@malazdrewicz.com.ar> no https://bugs.debian.org/885885 2017-12-30
15-linux51.patch Add Linux 5.1+ compat fix for deprecated get_ds call

This adds a compat fix for the deprecated get_ds helper function. For
Linux 5.1 onwards this was replaced with KERNEL_DS, see Linux
commit 736706bee3298208343a76096370e4f6a5c55915
("get rid of legacy 'get_ds()' function")
.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Colin Ian King <colin.king@canonical.com> no https://bugs.debian.org/928754 https://bugs.debian.org/934677 2019-06-06
16-linux56.patch [PATCH] Add fixes for 5.6 kernel

Use ioremap instead of ioremap_nocache and proc_ops instead of
file_operations on Linux kernel 5.6 and above.

<rosh> Patch amended to adapt i386 arch.
Herman van Hazendonk <github.com@herrie.org> no https://salsa.debian.org/Herrie82-guest/broadcom-sta/-/merge_requests/1 2020-03-31
17-Get-rid-of-get_fs-set_fs-calls.patch Get rid of get_fs/set_fs calls in Broadcom WL driver.

Fixes linux-next where get_fs/set_fs is already removed for some architectures.

but I'm not familiar enough with the driver to remove them with confidence.

See also: https://lwn.net/Articles/722267/
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/x86/include/asm/uaccess.h?h=next-20200911&id=47058bb54b57962b3958a936ddbc59355e4c5504
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/include/linux/uaccess.h?h=next-20200911&id=5e6e9852d6f76e01b2e6803c74258afa5b432bc5
Joan Bruguera <joanbrugueram@gmail.com> no https://gist.github.com/joanbm/5c640ac074d27fd1d82c74a5b67a1290 2020-09-13
18-wl-Make-sure-power_mgmt-settings-are-honored.patch wl: Make sure power_mgmt settings are honored
The driver does *not* respect calls to set_power_mgmt() to turn power
saving off, it sets "PM_OFF" when it is asked to turn off PM by
userspace. However, it seems that unidentified circumstances will turn
PM to PM_FAST automatically again and again, disregarding user input.

This patch uses PM_FORCE_OFF instead of PM_OFF which seems to reliably
keep PM off, no matter the circumstances.
Diego Escalante Urrelo <diegoe@gnome.org> no 2020-07-23
19-wl-Fix-get-set-values-for-tx_power.patch wl: Fix get/set values for tx_power
The wl driver seems to be using an internal "qdbm" unit for the
"qtxpower" registry, where hardware power is read, and naively using
that value around the get/set cfg80211 functions.

This 'qdBm' unit is simply (dBm * 4) and defaults to "23 *4" in
`wl_linux.c`. This equivalency is confirmed in the brcmfmac kernel
driver, which seems to be a cleaned up version of this one.

This commit fixes getting and setting the txpower using regular
utilities like `iwconfig` or `iw`.
Diego Escalante Urrelo <diegoe@gnome.org> no 2020-07-23
20-wl-Fix-mac-address-setting.patch wl: Fix mac address setting
The function was returning BCM_UNSUPPORTED (-23) when the device did not
allow for mac address changes. This however corresponds to "too many
files open" so userspace was getting conflicting info on what was
happening. Example:

$ ip link set wlp3s0 address 3c:15:c2:cf:29:dd
RTNETLINK answers: Too many open files in system

Now the function properly returns -EADDRNOTAVAIL instead.

This fixes the popular error where NetworkManager is unable to connect
to wifi networks when wifi.scan-rand-mac-addr=yes (the default) or other
mac-addr options are in use (see the work around supplied by
wpasupplicant in /usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf)

Also, the function was incorrectly changing the `net_device->dev_addr`
even when the hardware had not been able to change it.
Diego Escalante Urrelo <diegoe@gnome.org> no 2020-07-28
21-wl-Fix-misleading-indentation.patch wl: Fix misleading indentation
Mixed spaces and tabs caused a misleading indentation warning.
Tidy up to suppress the warning:

src/wl/sys/wl_linux.c:788:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
788 | if ((val & 0x0000ff00) != 0)
| ^~
src/wl/sys/wl_linux.c:790:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
790 | bar1_size = pci_resource_len(pdev, 2);
| ^~~~~~~~~
Diego Escalante Urrelo <diegoe@gnome.org> no 2020-07-23
22-wl-Fix-fall-through-warnings.patch wl: Fix fall through warnings
Add a gcc special comment to solve a -Wimplicit-fallthrough warning:

src/wl/sys/wl_cfg80211_hybrid.h:52:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
52 | if (wl_dbg_level & WL_DBG_DBG) { \
| ^
src/wl/sys/wl_cfg80211_hybrid.c:817:3: note: in expansion of macro ‘WL_DBG’
817 | WL_DBG(("network eap\n"));
| ^~~~~~
src/wl/sys/wl_cfg80211_hybrid.c:820:2: note: here
820 | default:
| ^~~~~~~
Diego Escalante Urrelo <diegoe@gnome.org> no 2020-07-23
23-wl-Avoid-disconnecting-invalid-interface.patch wl: Avoid disconnecting invalid interface
Mimic brcmfmac driver and don't try to call WLC_DISASSOC on an invalid
interface.
Diego Escalante Urrelo <diegoe@gnome.org> no 2020-07-28
24-wl-Use-the-right-enums-for-cfg80211_get_bss.patch wl: Use the right enums for cfg80211_get_bss Diego Escalante Urrelo <diegoe@gnome.org> no 2020-08-02
25-linux518.patch linux518 Eduard Bloch <blade@debian.org> no 2022-07-30
26-linux600.patch [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
Antoine Cotten <hello@acotten.com> no 2022-08-15
27-wl-Update-for-linux-5.17-deprecations.patch wl: Update for linux-5.17+ deprecations
Update for various deprecated APIs.

Original SVN information:
6.30.223.271-29: add patch for linux 5.17
git-svn-id: file:///srv/repos/svn-community/svn@1171161 9fca08f4-af9d-4005-b8df-a31f2cc04f65
heftig committed on 23 Mar
Eduard Bloch <blade@debian.org> no 2022-05-08
28-linux601.patch linux601 "Jan Alexander Steffens (heftig)" <heftig@archlinux.org> no 2025-01-30
29-fix-version-parsing.patch fix detection of LINUXVER_WEXT_ONLY

- fix version parsing if there are only two numeric components (e.g. 6.7-rc1)
- set SUBLEVEL to 0 if missing
- fix version comparison logic
- -a and -o don't have well defined precedence
Andreas Beckmann <anbe@debian.org> no debian 2025-01-30
30-6.12-unaligned-header-location.patch .12-unaligned-header-location Eduard Bloch <blade@debian.org> no 2025-01-30
31-build-Provide-local-lib80211.h-header.patch build: Provide local lib80211.h header
The `lib80211.h` header was moved into `libipw` in 6.13. This means
it's no longer available in standard kernel-headers.

Luckily it's a small file and the driver only uses a struct that has not
changed in ages.

This copies `lib80211.h` from the rename/remove commit below.
Diego Escalante Urrelo <diegoe@gnome.org> no 2025-01-30
32-Prepare-for-6.14.0-rc6.patch Prepare for 6.14.0-rc6 Eduard Bloch <blade@debian.org> no 2025-03-16
33-wl-Add-explanation-for-IBT-warnings-in-newer-kernels.patch wl: Add explanation for IBT warnings in newer kernels
Because of the binary blob the driver will trigger the kernel's
"Unpatched return thunk in use" warning. We can not fix without
recompiling the blob.

Considering that this driver handles wifi cards that are mostly
attached/locked to pre-2020 CPUs, this patch adds a non-critical warning
message explaining the scary kernel traces and suggesting `ibt=off`.

Based on Andreas Beckmann <anbe@debian.org> patch and suggestion.
Diego Escalante Urrelo <diegoe@gnome.org> no 2025-02-13
34-wl-Remove-redefinition-warning-for-isprint.patch wl: Remove redefinition warning for isprint
This seems unused anywhere in the source, or blob.
Diego Escalante Urrelo <diegoe@gnome.org> no 2025-02-13
35-wl-Use-kernel-keyword-for-fallthrough.patch wl: Use kernel keyword for fallthrough
The comment convention leads to false positives with the macro expansion.
Diego Escalante Urrelo <diegoe@gnome.org> no 2025-02-13
36-wl-Add-missing-braces-as-recommended-by-gcc.patch wl: Add missing braces as recommended by gcc Diego Escalante Urrelo <diegoe@gnome.org> no 2025-02-13
37-wl-Fix-memcpy-field-spanning-write-warning.patch wl: Fix memcpy() field-spanning write warning
Handle the following warning:
kernel: memcpy: detected field-spanning write (size 160) of single
field "dst" at .../src/wl/sys/wl_cfg80211_hybrid.c:3086 (size 0)
Diego Escalante Urrelo <diegoe@gnome.org> no 2025-02-14

All known versions for source package 'broadcom-sta'

Links