thunderbolt: Remove PNP info
So it isn't matched by devmatch(8) and automatically loaded. The PNP
info will be readded once the USB4 driver is more complete.
PR: 290827
Reported by: fuz, Marco Siedentopf <siedentm at me.com>
Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code)
Sponsored by: The FreeBSD Foundation
ctfmerge: fix segfault when building on macOS
The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.
PR: 290958
Reported by: wosch
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D54018
(cherry picked from commit 732b4aa05d78ca6831d02e67a43f34ad104f4f01)
ctfmerge: fix segfault when building on macOS
The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.
PR: 290958
Reported by: wosch
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D54018
(cherry picked from commit 732b4aa05d78ca6831d02e67a43f34ad104f4f01)
ctfmerge: fix segfault when building on macOS
The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.
PR: 290958
Reported by: wosch
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D54018
(cherry picked from commit 732b4aa05d78ca6831d02e67a43f34ad104f4f01)
ipfw: create a bpf tap point for every log rule
Dynamically allocate bpf tap points for every rule that has "log".
The name is "ipfw%u", where %u is substituted to the rule number.
The default catch all "ipfw0" tap still exists for compatibility
and it will catch packets in case if there are no bpf listeners
on a per-rule tap.
Reviewed by: ae
Differential Revision: https://reviews.freebsd.org/D53877
ipfw: create "ipfw0" and "ipfwlog0" bpf tapping points without ifnet(9)
As a free bonus the tapping points are now able to match packet direction.
Reviewed by: ae
Differential Revision: https://reviews.freebsd.org/D53875
ifconfig: print warning and return success on ipfw0, ipfwlog0 cloning
This should provide people a chance to remove ipfw0 and ipfwlog0 from
cloned_interfaces in their rc.conf during FreeBSD 16.x lifetime.
Differential Revision: https://reviews.freebsd.org/D53876
bpf: modularize ifnet(9) part of bpf
Imagine that bpf(9) tapping can happen at any point in the network stack,
not necessarily at interface transmit or receive. To achieve that we need
a thin layer of abstraction defined by struct bif_methods, that defines
how generic bpf layer works with a tap point of this kind.
Implement ifnet(9) specific methods in a separate file bpf_ifnet.c. At
this point there is 100% compatibility for all existing interfaces, there
is no KPI change, yet. The legacy attaching KPI is layered over new ifnet
agnostic KPI. The new KPI may change though, as we can implement multiple
DLTs per single tap point in a prettier fashion.
The new abstraction layer allows us to move all the 802.11 radio injection
hacks out of bpf.c into ieee80211_radiotap.c, so do that immediately as a
good proof of concept.
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D53872
mips: Include CCLDFLAGS when linking kernel.tramp.bin
This ensures we pick up -fuse-ld/--ld-path for external toolchains
rather than trying to use the default system linker, which may not
exist (e.g. on macOS).
This is a direct commit to stable/13 as mips no longer exists in main.
mips: Drop unused TRAMP_LDFLAGS
This has always been empty since e8dce5b9b3a5 ("Complete the integration
of tbemd branch into head.").
This is a direct commit to stable/13 as mips no longer exists in main.
LinuxKPI: 802.11: rework MC/configure_filter
(*prepare_multicast)(), for the drivers we support, is iwlwifi(4)-specific.
If it is not available do not let us stop from calling (*configure_filter)()
at least as well.
In addition to the interface setting mc_all_multi, if we have no way to
prepare the multicast filter list this way, set FIF_ALLMULTI for now.
This seems to help some with rtw89 but does not help me with other drivers
yet to get IPv6 link-local (e.g., ff02::1%wlan0) going.
This should also help in case we are scanning and are setting
FIF_BCN_PRBRESP_PROMISC . We should go and review the full FIF_ list and
start adding conditional support for the other options too.
Sponsored by: The FreeBSD Foundation
PR: 281982
(cherry picked from commit f943454bfbd98ce49516c6ede8626b5f2602edc1)
LinuxKPI: 802.11: lock down the "txq_scheduled" tailq
For consistency rename the "scheduled_txqs" tailq to
"txq_scheduled" and add a lock per txq ("txq_scheduled_lock[]").
We use the "_bh" locking as this called from the device driver.
This fixes panics due to concurrent access to the tailq, especially
in between "first" and "remove" on the out-direction and between
"insert" and "elem_init" on the in-direction.
This was easily reproducible just running iperf3 at basic rates for
a few seconds to minutes with multiple chipsets, not only rtw89.
Sponsored by: The FreeBSD Foundation
PR: 290636
Reported by: arved, and others before
(cherry picked from commit 567a097c8ab60d9fcd68a87c3c5ad605fe8715cc)
ath11k: add new files to module Makefile
Add the new files to the module Makefile as well, so they do not get lost.
(cherry picked from commit c68126ec2594a80ac095e5ce9e6138709db75519)
ath11k: start making compile some more
There is more work to do to make this compile again but we will do that
when we get to the driver. For now just take the most noise out of it.
(cherry picked from commit 9c2f321630894b40c1ec51ece881c7c765d6d749)
iwmfw(4): fix spelling of the iwm8000C firmware.
When migrating the firmware to be installed as plain firmware files
to /boot/firmware the iwm8000C firmware lost its "fw" suffix that
iwm(4) expects.
The follow-up change to defaults/loader.conf is also consistently
missing the "fw".
Fix both places, and add the wrongly spelt version to ObsoleteFiles.inc
(entirely untested).
PR: 291403
Reported by: Augustin Hoffmann (avgwst tutanota.de)
Fixes: af0a81b6470aba4af4a24ae9804053722846ded4
Fixes: a0f06dfb0d188966bee7265ec7d9f20093186bb6
(cherry picked from commit f0ea859229843affe07ac94db915489756f87096)
LinuxKPI: ath10k: adjust for led changes to keep ath10k compiling
Add the conditional compile time option defaulting to off as we do
not support leds in LinuxKPI to ath10k for the new file.
Add empty struct gpio_led to LinuxKPI.
(cherry picked from commit fe7b6fc32455389d1b8452c67e1ddcfbc4e5f5cc)
freebsd-update: Mention upgrading packages, not just ports
These days most end users are likely using pre-built packages, not
locally-built ports. Thus be sure to mention this as an important case,
and put it ahead of ports.
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42968
(cherry picked from commit ced74610217ff0be071e4614c64a4ff66c40bc6b)
bsd.compat.mk: Honour XSTRIPBIN for lib32
Currently we only honour XNM and XOBJCOPY, but XSTRIPBIN is important
during install. Otherwise we end up using STRIPBIN for the host, not the
target, which is normally the same, but may not be, especially on
non-FreeBSD systems. In particular, cheribuild will build FreeBSD with
STRIPBIN=/usr/bin/strip XSTRIPBIN=strip (with the latter referring to
the bootstrap strip in PATH), which breaks for WITH_LIB32 when the
host's /usr/bin/strip is unable to process the lib32 binaries (e.g.
building arm64 FreeBSD's lib32 on an amd64 GNU/Linux system).
MFC after: 1 week
(cherry picked from commit ad13dc1ece2fe4a6192bceffea4a868ba6a2e0e2)
rtld-elf: Delete unused RELOC_ALIGNED_P copies
This was copied from arm to aarch64 to riscv, but only arm uses it.
MFC after: 1 week
(cherry picked from commit 02d06043ba88f931f9debd5aa519fc303ca70d11)
imgact_elf: Fix off-by-one in note size check
Prior to c86af2cc4cd1 ("imgact_elf: Check note body sizes"), this was
note_name + n_namesz >= note_end, which checks that there is at least
one byte after the unpadded name (which could be either padding or
data), and given our notes always have data with them this was fine.
However, once we started checking the padded name (note that "FreeBSD\0"
is already a multiple of 4 bytes, so has no padding) and data, this
turned into checking that there is at least one byte after the unpadded
data, and since our ELF notes already have a multiple of 4 bytes for
their data and therefore have no padding, this means that we are now
checking that there is at least one byte after the ELF note, which is
not going to be the case for the last ELF note. Instead, switch this to
a strict greater than, as should be used when comparing one-past-the-end
pointers, which both sides of the inequality are.
For executables, this was generally not a problem in reality, since the
last of our ELF notes is NT_FREEBSD_NOINIT_TAG, which isn't read by the
kernel. However, ld-elf.so.1 (and libcompat variants), like shared
[15 lines not shown]
cross-build: fix after the recent sqlite3 import
Stop adding contrib/sqlite3 into the include path for usr.bin/kyua, take
headers from the install sysroot env. sqilte3 now has the VERSION file,
which clashes with c++ include <version>.
Submitted by: jrtc27 (see https://reviews.freebsd.org/D51217)
Tested by: kib
Fixes: 17f0f75308f2 ("sqlite3: Vendor import of sqlite3 3.50.2")
(cherry picked from commit 09d28419c646650a77721e168ef43bc1bac96b67)