diff options
author | PÁLI Gábor János <pali.gabor@gmail.com> | 2022-04-27 23:12:05 +0200 |
---|---|---|
committer | PÁLI Gábor János <pali.gabor@gmail.com> | 2022-04-27 23:12:05 +0200 |
commit | e4e108c834bb19a76bb9b4ae0c8c585785fb6675 (patch) | |
tree | ebf18c1e3727da6af051358f5d297d24fafba4db /aports/broadcom-wl/002-rdtscl.patch | |
parent | 1ecfff829f55162ba6414e34f3110517c3061b90 (diff) | |
download | freebsd-wifibox-alpine-e4e108c834bb19a76bb9b4ae0c8c585785fb6675.zip |
Add optional package for the Broadcom STA (`wl`) driver.
Ported from: Arch Linux
Diffstat (limited to 'aports/broadcom-wl/002-rdtscl.patch')
-rw-r--r-- | aports/broadcom-wl/002-rdtscl.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/aports/broadcom-wl/002-rdtscl.patch b/aports/broadcom-wl/002-rdtscl.patch new file mode 100644 index 0000000..1b9862c --- /dev/null +++ b/aports/broadcom-wl/002-rdtscl.patch @@ -0,0 +1,22 @@ +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 + +diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c +--- a/src/shared/linux_osl.c 2015-09-19 01:47:15.000000000 +0300 ++++ b/src/shared/linux_osl.c 2015-11-21 15:20:30.585902518 +0200 +@@ -932,7 +932,11 @@ + uint cycles; + + #if defined(__i386__) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) ++ cycles = (u32)rdtsc(); ++#else + rdtscl(cycles); ++#endif + #else + cycles = 0; + #endif |