rtwn: enable seqno offload; migrate to use ieee80211_output_seqno_assign()
This should both enable the sequence number offloading and disable
the net80211 TX lock from being acquired/released/checked.
Locally tested:
* RTL8812AU, STA mode
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D52301
Differential Revision: https://reviews.freebsd.org/D50693
stand: Remove Spleen 32x64 fonts from INDEX
The Spleen 32x64 fonts cause some systems such as the AMD Framework 16
to boot extremely slowly. Adding screen.font="16x32" to
/boot/loader.conf is a partial workaround, but text displayed before the
boot menu still takes ~30 seconds to render on that laptop. With this
change, the same text renders immediately.
By leaving the font files in place but removing them from the INDEX,
users who want to use them can still load them manually. Once pending
work is committed to allow normal booting with these fonts, they can be
added back to the INDEX.
PR: 289007
Reviewed by: emaste, kevans, tsoome, ziaee
Fixes: 1ec2c8b2f364 (stand: Enable Spleen 32x64 font in the bootloader)
Sponsored by: The FreeBSD Foundation
LinuxKPI: devres: divorce dem_kfree from lkpi_devm_kmalloc_release
dem_kfree() is called from all over the place and should actually
do something; contrary to lkpi_devm_kmalloc_release() it can also
take a const void *. We have to __DECONST() that though as the
entire devres framework does otherwise not take a const argument.
This was discovered during the rtw89 upadte to 6.16.
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52082
LinuxKPI: kunit: add static_stub.h and more dummy headers
These came up during a wifi driver update.
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52079
LinuxKPI: sync overflow.h from Linux v6.16
It seems overflow.h wsa imported directly from Linux in 3208d4ad2b8320a.
Update the file to the newer version as needed for wireless driver updates.
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Obtained from: git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
038d61fd642278 (tag: v6.16)
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52078
LinuxKPI: add __struct_size
Use __builtin_object_size() by default.
If __builtin_dynamic_object_size() is available use that instead.
I would hope that in a future version we can remove the conditional
checks but in order to be able to MFC this without checking all
compiler versions simply keep it this way for now.
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52077
LinuxKPI: cleanup: implement __free() and DEFINE_FREE(); use for kfree()
A wifi driver update needs this.
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52075
LinuxKPI: rename from_timer() to timer_container_of()
With Linux 6.16 from_timer() got renamed to timer_container_of(); add
the LINUXKPI_VERSION check with a default to the current version.
Update all in-tree consumers (apart from wireless drivers managed
otherwise).
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52073
LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu
This adds guard support for non-real-types like rcu locking meaning
that we need to keep the lock state separately ourselves. _T is still
special and needs to be updated. Given it may not be used it needs
an __unused attribute (we are using the LinuxKPI __maybe_unused which
indeed is more expressive in this case).
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52076
LinuxKPI: timer KPI *_timer -> timer_*
del_timer() got renamed to timer_delete() approximately in Linux 6.2
(similar for *_sync and likely others).
Keep the old functions as compat; unclear when we can gc them.
We should also re-define them with a linuxkpi_ prefix to avoid possible
conflicts in the future if we do a full pass over this at some point.
Sponsored by: The FreeBSD Foundation (intiially)
MFC after: 3 days
X-MFC; preserve symbols, not inline
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52074
LinuxKPI: correct the LINUXKPI_VERSION check for abs_diff()
The code introduced abs_diff() as migrated from drm to standard
linux headers. The LINUXKPI_VERSION check did not allow this to
be visible by default in-tree. Make sure the v6.6 check is optional.
drm-kmod always defines LINUXKPI_VERSION so this should be fine.
Sponsored by: The FreeBSD Foundation (initially)
Fixes: afc450fac9f04
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52071
LinuxKPI: pci: allocate entire pci_dev hiereachy up to root port on attach
In linux_pci_attach_device() allocate a LinuxKPI pci_dev for each device in
the hierarchy up to the root port[1] as we cannot do that later on demand
as we may be in a context where we may not sleep.
Take special care of DRM as there is a non-PCI device in the chain which
needs to be skipped.
iwlwifi(4) can hit this case called from a callout.
While here leave a comment sa the cleanup order of
linux_pci_attach_device() needs correction seperately.
Sponsored by: The FreeBSD Foundation (initially)
PR: 283027
Suggested by: jhb [1]
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52069
LinuxKPI: acpi; fix type to acpi_get_handle()
The native AcpiGetHandle() and acpi_get_handle() take a
const char * argument for pathname and not an acpi_string (char *).
For that they spell it out fully as 'const char *', so should we.
Sponsored by: The FreeBSD Foundation (intially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52072
LinuxKPI: pci: allow children to be attached to a pci_dev
This will be used for hooking suspend/resume in for LinuxKPI 802.11
based drivers.
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52070
LinuxKPI: pci: implement for_each_pci_dev() and improve pci_get_device()
Implement for_each_pci_dev() needed by a wireless driver update.
For that also improve pci_get_device() and add the functionality to
support the odev argument to start searching from that.
Sponsored by: The FreeBSD Foundation (intially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52066
LinuxKPI: pci: implement [linuxkpi_]pcim_request_all_regions()
Factor out the pci_request_region() implementation into an internal
function and make pci_request_region() a simple wrapperaround it.
Likewise implement pcim_request_all_regions() as a loop calling
pci_request_region() for each entry.
In two cases which we returned an error before (bar index is valid but
bar is not (no len), and neither IO nor MEM) we now reutrn success
(nothing to do for us). Otherwise callers, especially
pcim_request_all_regions() would error out for the wrong reasons.
This seems to also match the expected behaviour of pci_request_region().
Sponsored by: The FreeBSD Foundation (intially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52068
LinuxKPI: pci: implement pcim_iomap()
Like pci_iomap() add the devres version pcim_iomap() using the former
to get the resource.
Add a helper function to validate that the bar is within a valid range
and sprinkle that check also to other related functions.
Sponsored by: The FreeBSD Foundation (intially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52067
15.0: Mark the tree as ALPHA1
Builds for 15.0-ALPHA1 will begin shortly; we're just waiting for the
latest amd64 package set to propagate out to mirrors.
Approved by: re (implicit)
Sponsored by: https://www.patreon.com/cperciva
vtnet: fix computation of sysctl variables
Fix the aggregation of the interface level counters
* dev.vtnet.X.tx_task_rescheduled,
* dev.vtnet.X.tx_tso_offloaded,
* dev.vtnet.X.tx_csum_offloaded,
* dev.vtnet.X.rx_task_rescheduled,
* dev.vtnet.X.rx_csum_offloaded, and
* dev.vtnet.X.rx_csum_failed.
Also ensure that dev.vtnet.X.tx_defrag_failed only counts the number
of times m_defrag() fails.
While there, mark sysctl-variables used for exporting statistics as
such (CTLFLAG_STATS).
Reviewed by: Timo Völker
Differential Revision: https://reviews.freebsd.org/D51999
(cherry picked from commit 03da4395158d374b5e38623f6744ce31302b530c)
netstat: improve statistic output for sctp
Provide counters for receive and transmit checksum offloading for
SCTP.
(cherry picked from commit 6d988ec3a76135409730313877b3eb0b8a7517fc)
Add -DEBUG kernel configurations
Also include these in GENERIC-K*SAN kernels (which previously depended on
GENERIC configurations which debug-enabled until the branch point).
Approved by: re (implicit)
Sponsored by: https://www.patreon.com/cperciva
sys/netinet6: Fix SLAAC for interfaces with no /64 LL address
in6_ifadd() asserts that an interface has an existing LL address with a /64
prefix from which to extract the ifid for SLAAC address selection (even though
the comments suggest that an ifid will be generated if one does not exist). This
is adequate for most generic cases, however to support PPP links with /128 LL
addresses we must be able to fall back on another source for the ifid since we
cannot assume the /128 LL has a unique ifid in the lower 64 bits.
To do this, the static function get_ifid() in in6_ifattach.c is renamed to
non-static in6_get_ifid(), and this is used in lieu of a proper /64 LL address
to attempt to obtain a valid ifid.
Reviewed by kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D51778
Turn off PTHREAD assertions in stable/15
Direct commit to stable/15; the assertions stay on in -CURRENT.
Reported by: Mark Millard
Discussed with: kib
Approved by: re (implicit)
Add description for WITH_PTHREADS_ASSERTIONS
This option is turned on by default in -CURRENT but will be turned off
in 15-STABLE; this description will land in the src.conf(5) man page
in that branch.
MFC after: 1 minute
(cherry picked from commit af60084978a43632c5ab2d6e3aca41be7a658d8c)