snddev_info->devcount keeps track of the total number of channels for a
given device. However, it is redundant to have it, since it is only used
in sound_oss_sysinfo() to populate the "numaudios" field, and we also
keep track of the channel counts in the playcount, pvchancount, reccount
and rvchancount fields anyway. We can simply sum those fields together
instead of updating a separate variable upon every channel
addition/deletion.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44852
Michael Tuexen [Thu, 18 Apr 2024 19:50:31 +0000 (21:50 +0200)]
tcp: drop data received after a FIN has been processed
RFC 9293 describes the handling of data in the CLOSE-WAIT, CLOSING,
LAST-ACK, and TIME-WAIT states:
This should not occur since a FIN has been received from the remote
side. Ignore the segment text.
Therefore, implement this handling.
Reviewed by: rrs, rscheff
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D44746
Ed Maste [Thu, 18 Apr 2024 18:38:54 +0000 (14:38 -0400)]
CONTRIBUTING: request only one submission type per change
We have some instances of contributors opening a GitHub pull request and
a Phabricator review for the same change, which divides or duplicates
review effort.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44856
share/mk/bsd.cpu.mk: add F16C feature for i386 and amd64 architectures
As discussed in bug 278417, some ports require the F16C instruction set
to compile, but there is no way yet to detect whether the currently
chosen CPUTYPE supports this feature.
Add the feature to the MACHINE_CPU variable, for each processor that
supports it. The list of processors was extracted from clang 18's -dM
output, filtered on the __F16C__ define.
Add preliminary in-tree CI infrastructure for developers
The goal of this project is to integrate the relevant scripts from the
FreeBSD-CI project (https://github.com/freebsd/freebsd-ci) into the src
repository. This allows developers to run the test suite similar to how
it is executed on ci.freebsd.org, and eventually, have it directly used
by our CI system. This effort is also part of the workflow improvement
project, aiming to incorporate pre-merge testing.
Current Features:
* Does smoke tests using either bhyve(amd64 only) or qemu(Non x86_64 or
when defined USE_QEMU=1). Currently defined CITYPE=smoke. Once we have
added full tests we can also utilize something like CITYPE=full
* Most of the resources are dynamically allocated based on available
resources in the host
* If CPU supports POPCNT or vmm can be loaded then bhyve is used for
amd64 otherwise automatically installs and uses qemu@nox11
* When required third party applications or packages for booting non-x86
images are automatically installed
Current Limitation:
* Does not support full tests like the one in our Jenkins
* At this moment this is also not suitable to be used in our Jenkins
platform as the jobs are divided in multiple smaller tasks and
artifacts are moved here and there which are not exactly the scenario
for individual developers.
Future Works:
* Add full tests like the one in ci.freebsd.org
* Add different tests or options to disable some tests
* Add test profiles full
* Possibly add test through Cloud Providers like AWS/GCP/Azure or Cirrus
or Github Actions
* Update documentation
Test Plan:
cd /usr/src/tests/ci
make ci
make TARGET=amd64 TARGET_ARCH=amd64 ci
make TARGET=amd64 TARGET_ARCH=amd64 USE_QEMU=1 ci
make TARGET=arm64 TARGET_ARCH=aarch64 ci
make TARGET=powerpc TARGET_ARCH=powerpc64 ci
make TARGET=powerpc TARGET_ARCH=powerpc64le ci
make TARGET=riscv TARGET_ARCH=riscv64 ci
Reviewed by: lwhsu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43786
Alexander Ziaee [Wed, 20 Mar 2024 17:40:57 +0000 (13:40 -0400)]
hier.7: polish entry to system manual
Entries reworded to improve grammar or add keywords:
- document description: substitute layout for index for first-glance
- /etc/freebsd/update.conf
- /usr/share/vi/
Entries that have been wordshuffled for brevity or consistency:
- /{bin,libexec,nonexistent,sbin,tmp}/
- /boot/dtb/overlays/
- /boot/{defaults,efi,kernel,lua}/
- /usr/libexec/
- /var/{db,games,lib,log/{bsdisks.log,spool/,tmp/}}
- /usr/share/sysroot/VERSION/MACHINE.MACHINE_ARCH/ (unfold a little)
- /usr/local/share/doc/freebsd/ (unfold a little)
Entries that have macro or linking adjustments:
- /{boot,boot/efi,dev,etc,home,sbin,usr/bin}/ (overview or intro pages)
- /media/ (bsdisks is from ports, but afaik pulled by every desktop)
- /usr/share/{lib/,lib/dtrace/,libdata/games/,man/}/ (intro pages)
- /var/log/messages (syslog(3) -> syslogd(8))
Entries that have been added:
- /dev/{cuaU0,vmm,zvol}/
- /usr/share/{atf,bhyve}/
- /usr/share/libexec/hyperv/ (thanks @rtprio)
- /local/<subdirectories>/
- /var/log/debug.log (thanks @pauamma)
- /var/spool/{lock,lpd}
Please forgive my earlier mistakes fixed in this commit:
- /{dev,/usr/share/{calendar,misc}} : accidentally reverted description
- /etc/local-unbound.conf/ (wrong link)
- /usr/{freebsd-dist,lib32,libdata},/var/log/{dmesg.today,lpd-errs} (typos)
- /{usr/libdata/gcc/,var/log/bsdisks.log} (removed, unnecessary)
Brooks Davis [Tue, 16 Apr 2024 22:26:29 +0000 (23:26 +0100)]
lib{c,sys}: normalize export of openat, setcontext, and swapcontext
List them in the symbol map rather than using the __sym_default to
expose them. This will allow later improvements in the stub
implementations in libc.so.
Clang supports __bf16 for riscv from version 18.0 onwards, so update the
checks for it. While here, rewrite the checks so they are hopefully more
readable, and also handle gcc a little better.
In addition, define COMPILER_RT_HAS_FLOAT16 and COMPILER_RT_HAS_BFLOAT16
when these features should be available, since there are some parts in
compiler-rt that check for these defines.
Martin Tournoij [Wed, 17 Apr 2024 16:04:27 +0000 (10:04 -0600)]
crunchgen: add --list option
"bsdbox --list" will print all tools in the binary, one per line. The
main use case for this is to make it easier to create links:
for t in $(bsdbox --list); do
ln -s bsdbox $t
done
The name --list was taken from busybox.
This just adds a new "program" with the name "--list". I don't think we
need to do real argument parsing here, and this is also how busybox does
it.
An additional minor change is that just "bsdbox" will no longer print
the binary name itself ("bsdbox" in this case). Before it would do:
% bsdbox
usage: boxlike <prog> <args> ..., where <prog> is one of:
cp ls mv bsdbox
And now just:
% bsdbox
usage: boxlike <prog> <args> ..., where <prog> is one of:
cp ls mv
And just "bsdbox" will also exit with code 0 (and print to stdout)
rather than exit with 0 and print to stderr
Example output:
% ./bsdbox
usage: bsdbox program [args ...]
bsdbox --list
program [args ...]
bsdbox combines several programs in one executable. Create a link to this
executable with the program name to run that program, or give the program
name as the first argument.
Currently defined programs:
true false tail head uname
This should fix the following warnings, which for unknown reasons are
errors in CI:
/usr/src/crypto/heimdal/lib/hx509/ca.c:1020:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
1020 | ku.digitalSignature = 1;
| ^ ~
/usr/src/crypto/heimdal/lib/hx509/ca.c:1021:21: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
1021 | ku.keyEncipherment = 1;
| ^ ~
/usr/src/crypto/heimdal/lib/hx509/ca.c:1028:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
1028 | ku.keyCertSign = 1;
| ^ ~
/usr/src/crypto/heimdal/lib/hx509/ca.c:1029:13: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
1029 | ku.cRLSign = 1;
| ^ ~
ASN.1 INTEGERs will now compile to C int64_t or uint64_t, depending
on whether the constraint ranges include numbers that cannot be
represented in 32-bit ints and whether they include negative
numbers.
Template backend support included. check-template is now built with
--template, so we know we're testing it.
Tests included.
Also adjusts the generated files:
* asn1parse.c, asn1parse.h (not strictly necessary, but nice to have)
* der-protos.h, which needs a bunch of new prototypes. I copied these
from a der-protos.h generated by the upstream build system, which
uses a perl script for this.
* adjust printf format strings for int64_t. Upstream uses %lld for this,
but that is not portable, and leads to lots of -Werror warnings.
This should fix target-dependent differences between headers generated
by asn1_compile. For example, when cross compiling world from amd64 to
i386, the generated cms_asn1.h header has:
Alexander Ziaee [Wed, 17 Apr 2024 15:51:35 +0000 (09:51 -0600)]
networking.7 : create network quickstart guide
Now that the handbook has been moved to ports, I think it's very nice to
have a network quickstart guide in-band, in base, in the system manual.
If the user uses any of the following terms "man -k
{network,networking,wifi,quickstart}" this page will come up, which is I
think a very common use case for new users.
Currently, this document explains connecting to a basic Ethernet
network, a basic wifi network, scanning for wifi networks, and airplane
mode, as well as linking to other sections, including the handbook
Mark Johnston [Wed, 17 Apr 2024 14:36:58 +0000 (10:36 -0400)]
nfsserver: Rate-limit messages about requests from unprivileged ports
If access from unreserved ports is disabled, then a remote host can
cause an NFS server to log a message by sending a packet. This is
useful for diagnosing problems but bad for resiliency in the case where
the server is being spammed with a large number of rejected requests.
Warner Losh [Tue, 16 Apr 2024 22:36:47 +0000 (16:36 -0600)]
nvme: Eliminate intel_log_temp_stats_swapbytes
We can't post a AER for this page, so there's no need to be able to swap
it to host byte order. It's not one of the standard defined pages that
can post via AER, and the vendor's public docs for this temperature page
don't suggest it's possible to get over or under event changes. Since
nvmecontrol no longer needsd the swap routine, remove it since it's
now unused.
Warner Losh [Tue, 16 Apr 2024 22:35:53 +0000 (16:35 -0600)]
nvmecontrol: Have to truncate on all 32-bit architectures
armv7, powerpc, powerpcspe and i386 all lack 128-bit integer
types. Adjust the comment and #ifdef. I don't think we support nvme on
any of these other architectures at the moment, but it won't hurt to be
more precise.
Warner Losh [Tue, 16 Apr 2024 22:35:46 +0000 (16:35 -0600)]
nvmecontrol: Make the error log page work on native format
As the number of page types proliferates, it becomes untennable to
convert them in read_logpage (especailly since new UUID page types will
need to be supported). Convert the error page printing code to operate
on little endian data.
Warner Losh [Tue, 16 Apr 2024 22:35:33 +0000 (16:35 -0600)]
nvmecontrol: Create letoh to generically convert to host order
Using _Generic, create letoh which will generically convert uintXX_t
types from little endian to host, regardless of the size. This name has
been floated as a possible addition to endian.h.
Warner Losh [Mon, 15 Apr 2024 21:07:46 +0000 (15:07 -0600)]
arm_kernel_bothdr.awk: Update to latest ota
The latest ota is the first one in FreeBSD that treats 0 + "0xf" as
being '0' instead of '15'. Don't use this old trick anymore to convert
from hexidecimal to a number. Write a function to do that instead. This
fixes kernel.bin building on arm*. awk on 14 doesn't need this, but to
build FreeBSD stable/14's kernel.bin on 15 we'll need it, so fast MFC.
* Use `errc()` instead of manually setting `errno` before calling `err()`.
* Change one warning into a fatal error.
* Drop some unnecessary casts.
* `strlcat()` bounds checks were off-by-one. This does not matter in
practice because the subsequent code renders an overrun harmless.
* We were passing `SSIZE_MAX` to `copy_file_range()` instead of the
requested size. This only matters if we're asked to install a file
which is still being written to while we are copying it.
We already removed it from cp(1) over a year ago but never followed up
here. Do so now, for the same reasons: significant complexity for
little to no benefit.
acpi_battery: avoid divide-by-zero when no devices have capacity info
On laptops with builtin batteries, disconnecting the battery may show up
as a battery without any capacity information. (The theory is that one
is disconnecting the cells but the electronics identifying the battery
are still connected.) As a result, the loop over all batteries in
acpi_battery_get_battinfo results in total_lfcap == 0.
So, just check that total_lfcap is non-zero to avoid a division by zero
(triggerable by sysctl hw.acpi.battery).
Martin Matuska [Tue, 16 Apr 2024 21:39:31 +0000 (23:39 +0200)]
libarchive: merge from vendor branch
Libarchive 3.7.3
New features:
#1941 uudecode filter: support file name and file mode in raw mode
#1943 7-zip reader: translate Windows permissions into UNIX
permissions
#1962 zstd filter now supports the "long" write option
#2012 add trailing letter b to bsdtar(1) substitute pattern
#2031 PCRE2 support
#2054 add support for long options "--group" and "--owner" to tar(1)
Security fixes:
#2101 Fix possible vulnerability in tar error reporting introduced
in f27c173
Important bugfixes:
#1974 ISO9660: preserve the natural order of links
#2105 rar5: fix infinite loop if during rar5 decompression the last
block produced no data
#2027 xz filter: fix incorrect eof at the end of an lzip member
#2043 zip: fix end-of-data marker processing when decompressing zip
archives
Brooks Davis [Tue, 16 Apr 2024 17:04:16 +0000 (18:04 +0100)]
libcxxrt: don't export nonexistant symbols
Remove version entries that we don't build.
Add an arm specific Version.map and for other targets run the files
through sed to handle int vs long in new and delete.
Ideally we'd use the SYMBOL_MAPS functionality to preprocess with cpp,
but it doesn't currently handle C++ symbols so be annoyingly duplicative
for now.
Brooks Davis [Tue, 16 Apr 2024 17:03:21 +0000 (18:03 +0100)]
libgcc_s: only export 128-bit int APIs when available
These interfaces are only compiled when the platform supports 128-bit
ints. Use a CRT_HAS_128BIT guard similar to the one used in the
compiler_rt sources.
Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D44323
Brooks Davis [Tue, 16 Apr 2024 17:02:14 +0000 (18:02 +0100)]
librpcsec_gss: don't export non-existant symbols
rpc_gss_mesh_to_oid was never implemented.
This doesn't seem to be any reason why we would need to export the _stub
functions, but it's also a little unclear to me why the linker thinks
they aren't present. Perhaps they should be static.
Notable upstream pull request merges:
#15784 90ba19eb7b Do no use .cfi_negate_ra_state within the assembly
on Arm64
#15942 b6bbaa8372 Give a better message from 'zpool get' with invalid
pool name
#15943 ca678bc0bc Makefile.bsd: sort and cleanup source file list
#15953 fa480fe5ba zinject: show more device fault fields
#15983 30c4eba4ea Fix panics when truncating/deleting files
#15992 99741bde59 zvol: use multiple taskq
#16015 a100a195fa Add support for zfs mount -R <filesystem>
#16022 5e5fd0a178 Speculative prefetch for reordered requests
#16040 997f85b4d3 L2ARC: Relax locking during write
#16042 b12738182c Improve dbuf_read() error reporting
#16051 a9a4290173 xdr: header cleanup
#16052 eeca9a91d6 Fix read errors race after block cloning
#16057 aa5445c28b Remove db_state DB_NOFILL checks from syncing context
#16061 76d1dde94c zinject: inject device errors into ioctls
#16072 9e63631dea Small fix to prefetch ranges aggregation
#16077 44f337be30 Illumos#16463 zfs_ioc_recv leaks nvlist
#16085 4725e543be zinject: "no-op" error injection
#16086 c6da985e28 Add the BTI elf note to the AArch64 SHA2 assembly
Ed Maste [Tue, 16 Apr 2024 15:41:05 +0000 (11:41 -0400)]
mfc-candidates: fix output order with incorrect commit dates
Previously we obtained the list of MFC candidate hashes (i.e., those
commits only in the mfc-from branch), removed the already-merged
commits based on "cherry picked from" commit message entries, and then
printed the list sorted by commit time. This is usually the correct
order, but it is not when commits have non-monotonically-increasing
commit times. This is unfortunately the case for a number of commits in
our tree. This made it difficult to merge some groups of dependent
commits in the correct order.
Instead, leave the from-list in git rev-parse order, and move the
matching logic to a new lua script.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44808
Brooks Davis [Tue, 16 Apr 2024 16:48:07 +0000 (17:48 +0100)]
libsys: add a libsys.h
This declares an API for libsys which currently consists of
__sys_<foo>() declarations for system call stubs and function pointer
typedefs of the form __sys_<foo>_t. The vast majority of the
implementation resides in a generated _libsys.h which ensures that all
system call stub declarations match syscalls.master.
Brooks Davis [Tue, 16 Apr 2024 16:48:07 +0000 (17:48 +0100)]
makesyscalls: generate core libsys header
Create a header covering most of the "stable" libsys interfaces.
Specifically __sys_<foo> syscall stubs and __sys_<foo>_t typedefs for
those interfaces.
Ed Maste [Tue, 16 Apr 2024 14:19:14 +0000 (10:19 -0400)]
mergemaster: postpone removal to FreeBSD 15
Mergemaster has been deprecated for quite some time, but was not
removed prior to FreeBSD 14.0. Update the deprecation notice in the man
page to reflect this.
PR: 274967
Reported by: naddy
Sponsored by: The FreeBSD Foundation
Ed Maste [Mon, 25 Mar 2024 20:25:23 +0000 (16:25 -0400)]
tzsetup: be explicit about *timezone* abbreviation
During the install process tzsetup asks a question like
Does the abbreviation `EDT' look reasonable?
The installer asks lots of questions, some that relate to the previous
screen or topic and some that do not. A new user installed FreeBSD for
the first time and was confused by this question, not realizing that it
was asking whether the abbreviation is correct for the selected
timezone.
Reviewed by: bapt, brooks, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44500
The current addition to the interrupt nesting level in
xen_arch_intr_handle_upcall() needs to be compensated in
xen_intr_handle_upcall(), otherwise interrupts dispatched by the upcall handler
end up seeing a td_intr_nesting_level of 2 or more, which makes them assume
there's been an interrupt nesting.
Such extra interrupt nesting count lead to statclock() reporting idle time as
interrupt, as the call from interrupt context will always be seen as a nested
one (td->td_intr_nesting_level >= 2) due to the nesting count increase done by
both xen_arch_intr_handle_upcall() and intr_execute_handlers().
Fix this by adjusting the nested interrupt count before dispatching interrupts
from xen_intr_handle_upcall().
PR: 277231
Reported by: Matthew Grooms <mgrooms@shrew.net> Fixes: af610cabf1f4 ('xen/intr: adjust xen_intr_handle_upcall() to match driver filter')
Sponsored by: Cloud Software Group
Reviewed by: Elliott Mitchell <ehem+freebsd@m5p.com>
Do no use .cfi_negate_ra_state within the assembly on Arm64
Compiling openzfs on aarch64 with gcc-8 and gcc-9 is failing currently.
See issue #14965 for deeper context.
On platforms without pointer authentication, .cfi_negate_ra_state can be
defined to a no-op:
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/aarch64-tdep.c#l1413
I have tested this on Arm64 FreeBSD 13.2 and AlmaLinux-8.
Andrew Turner [Mon, 15 Apr 2024 20:53:39 +0000 (21:53 +0100)]
Add the BTI elf note to the AArch64 SHA2 assembly
On ELF platforms there is a note to specify when an application or
library supports BTI. When linking one of these the linker needs
all input object files to have the note. If not it will not include
it in the output file.
Normally the compiler would generate it, but for assembly files we
need to do it our selves.
Add the note to the aarch64 sha256 and sha512 assembly files.
Tested by building with BTI enabled and using the -zbti-report=error
flag to lld that makes it an error if the note is missing.
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Andrew Turner <andrew.turner4@arm.com>
Closes #16086
Rob N [Mon, 15 Apr 2024 20:52:20 +0000 (06:52 +1000)]
zinject: "no-op" error injection
When injected, this causes the matching IO to appear to succeed, but the
actual work is never submitted to the physical device. This can be used
to simulate a write-back cache servicing a write, but the backing device
has failed and the cache cannot complete the operation in the
background.
Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16085
Rob N [Mon, 15 Apr 2024 20:44:12 +0000 (06:44 +1000)]
zts: allow running a single test by name only
Specifying a single test is kind of a hassle, because the full relative
path under the test suite dir has to be included, but it's not always
clear what that path even is.
This change allows `-t` to take the name of a single test instead of a
full path. If the value has no `/` characters, we search for a file of
that name under the test root, and if found, use that as the full test
path instead.
Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Akash B <akash-b@hpe.com> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16088
Brooks Davis [Mon, 15 Apr 2024 16:55:07 +0000 (17:55 +0100)]
sys/acl.h: reduce header pollution
In commit d1dfd921774f0 the acl allocator was switched from malloc(9) to
uma(9) and done in a way required vm/uma.h and prerequisites. This added
considerable header pollution to sys/sysproto.h. The uma details were
hidden in commit b998d381f2868, but the header pollution remained. Add
less broad includes as required to keep the header self contained.
Brooks Davis [Mon, 15 Apr 2024 16:54:28 +0000 (17:54 +0100)]
sysproto.h: sys/acl.h -> sys/types.h
In sysproto.h, stop including sys/acl.h as syscall defintions now use
__acl* types from sys/_types.h. Add sys/types.h to provide types
previously provided by sys/param.h (via sys/acl.h).
Brooks Davis [Mon, 15 Apr 2024 16:53:05 +0000 (17:53 +0100)]
Reduce reliance on sys/sysproto.h pollution
Add sys/errno.h, sys/malloc.h, sys/queue.h, and vm/uma.h as needed.
sys/sysproto.h currently includes sys/acl.h which currently includes
sys/param.h, sys/queue.h, and vm/uma.h which in turn bring in
sys/errno.h sys/malloc.h.
Bjoern A. Zeeb [Tue, 28 Nov 2023 19:09:07 +0000 (19:09 +0000)]
git/mfc-candidates.sh: allow comments in exclude file
As branches ages, the list of unmerged or unmergable changes may grow
longer. In some cases it is helpful to group and or annotate them
in an exclude file. Filtering out lines starting with "#" allows adding
comment lines to aid tracking.
Bjoern A. Zeeb [Fri, 16 Feb 2024 21:14:02 +0000 (21:14 +0000)]
LinuxKPI: 802.11: disable early queue wakeup workaround; better classify
We used to call lkpi_wake_tx_queues() for all queues early on in order
to make sure they are ready. Turns out whatever logic in iwlwifi
startup is working correctly these days under LinuxKPI so this is no
longer needed. As the comment indicated the "workaround" did not
always work. Disable it for now.
The second part of the improvement is to properly classify Non-QOS
non-data frames (mgmt and ctl frames for now, unless we have to be
even more careful in the future about certain sub-types) as TID 7/VO.
Contrary to net80211 we must not promote PAE frames.
PR: 274382
MFC after: 3 day
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43944
Bjoern A. Zeeb [Mon, 5 Feb 2024 14:48:08 +0000 (14:48 +0000)]
net80211: amrr_init: change order of commands
First run the KASSERT before trying to do the free operation.
Better for reporting and debugging.
Add a guard setting the value to NULL afterwards. NULL pointers
are a lot easier to test for.
MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43751
Bjoern A. Zeeb [Sun, 18 Feb 2024 18:07:00 +0000 (18:07 +0000)]
LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one()
Given we are passed the lsta in as a function argument there is no
need to re-lookup the sta by ni and possibly not find it.
We know the sta and ni from the lsta and whether it is uploaded to
firmware or not we can check directly from the local lsta flag.
MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43965