Commit Graph

302622 Commits

Author SHA1 Message Date
null dfafdbdfc3 stand: Use calloc instead of malloc for initialization of filesystem devsw
This change is required for https://reviews.freebsd.org/D49355, so that
we can check if d_dev is uninitialized by checking if it's NULL.

Reviewed by:		imp
Differential Revision:	https://reviews.freebsd.org/D49705
2025-09-01 15:57:14 -06:00
Ed Maste 375527545c ng_parse: Add upper bound to avoid possible overflow
Also move num initialization for clarity.

We still need to check num in ng_unparse_composite (reported by des@ in
D52151) but this is another incremental improvement in netgraph input
validation.

Reviewed by:	des
PR:		267334
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52151
2025-09-01 17:12:45 -04:00
Michael Osipov 21628c79d5 date(1): Improve manpage around '-I'
* ISO 8601 defines two formats: basic and extended, clarify that we
  output the extended format only.
* Clarify that ISO 8601 is only aware of timezone /offsets/, not timezones,
  it has no relation to the Olson timezone database (TZ environment variable).

Reviewed by:	otis (mentor), des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D52314
2025-09-01 18:51:45 +02:00
Gleb Smirnoff b370fb00c8 openssl: link enough files for the legacy provider to actually load
Reviewed by:		khorben, ngie
Differential Revision:	https://reviews.freebsd.org/D52113
2025-09-01 09:39:14 -07:00
Gleb Smirnoff d0f4c558f9 udp: slightly refactor udp_append()
Make it bool.  Reword the comment, add note that mbuf is always consumed.
In case tunnel consumed the mbuf, don't INP_RUNLOCK(), behave just like
all the other normal exits from the function.

Reviewed by:		tuexen, kp, markj
Differential Revision:	https://reviews.freebsd.org/D52171
2025-09-01 09:33:34 -07:00
Gleb Smirnoff c8a5df48de udp: don't leak mbuf if tunnel didn't consume and inpcb is gone
Fixes:	e1751ef896

Reviewed by:		tuexen, kp, markj
Differential Revision:	https://reviews.freebsd.org/D52170
2025-09-01 09:33:24 -07:00
Zhenlei Huang 9764aa1cca bridge: Fix adding gif(4) interface assigned with IP addresses as bridge memeber
and fix assigning IP addresses to the gif(4) interface when it is a
member of a if_bridge(4) interface.

When setting the sysctl net.link.bridge.member_ifaddrs to 1, if_bridge(4)
can eliminate unnecessary walk of the member list to determine whether
the inbound unicast packets are for us or not.

Well when a gif(4) interface is member of a if_bridge(4) interface, it
acts as the tunnel endpoint to tunnel Ethernet frames over IP network,
aka the EtherIP protocol, so the IP addresses configured on it are
independent of the if_bridge(4) interface or other if_bridge(4) members,
hence the sysctl net.link.bridge.member_ifaddrs should not have any
influnce over gif(4) interfaces's behavior of assigning IP addresses.

PR:		227450
Reported by:	Siva Mahadevan <me@svmhdvn.name>
Reviewed by:	ivy, #bridge
MFC after:	1 week
Fixes:		0a1294f6c6 bridge: allow IP addresses on members to be disabled
Differential Revision:	https://reviews.freebsd.org/D52200
2025-09-01 18:14:22 +08:00
Zhenlei Huang b944c8ff17 tests: bridge: Add regression test for gif(4) interface as bridge member
if_bridge(4) should not prohibit adding a gif(4) interface which is
assigned with IP addresses as a bridge member regardless of the setting
of sysctl variable net.link.bridge.member_ifaddrs.

Assigning IP addresses on the gif(4) interface should not be affected
no matter whether it is member of a bridge interface or not.

PR:		227450
Reported by:	Siva Mahadevan <me@svmhdvn.name>
Reviewed by:	ivy (previous version)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D52200
2025-09-01 18:14:22 +08:00
Bjoern A. Zeeb 1d12658755 fwget: pci: video amd: correct glob matching entries
- one duplcate entry: 0x664*|0x664*) -> 0x664*|0x665*)
- one unneeded glob: 0x98e4*) -> 0x98e4)
- 0x15e7|0x1636|0x1638|0x164c) half of these are green-sardine; split
- a missing entry for skillfish2 : + 0x143f

MFC after:	3 days
Reviewed by:	imp, manu
Differential Revision: https://reviews.freebsd.org/D52312
2025-09-01 07:41:30 +00:00
Bjoern A. Zeeb 50cab1202d fwget: pci: hex strings use 0-9 and a-f not a-z
MFC after:	3 days
Reviewed by:	imp, manu
Differential Revision: https://reviews.freebsd.org/D52311
2025-09-01 07:38:59 +00:00
Bjoern A. Zeeb 78807c196c rc: bluetooth: startup improvements
Fix a redirect of stderr to stdout which is going to /dev/null.
A '&' got missing in the original rewrite from the review that
I took and committed.  Seems no one had noticed during testing
or review.  People may have ended up with a "/1" file in their
root file system.

Fixes:		40652f86b5
Reported by:	Vladyslav Movchan (vladislav.movchan gmail.com)
MFX after:	3 days
X-MFC:		squash
2025-09-01 07:26:47 +00:00
Dag-Erling Smørgrav 016d3ec239 tzcode: Add a test case for plain issetugid case
This catches a bug in tzcode which incorrectly considers TZDEFAULT as
unsafe as if it came from the environment.

Also deduplicate some repeated code, and fix a missing mode in an
open(2) call with O_CREAT set.

Event:		Oslo Hackathon 202508
Reviewed by:	philip
Differential Revision:	https://reviews.freebsd.org/D52241
2025-09-01 08:33:47 +02:00
Dag-Erling Smørgrav ca89e15355 tzcode: Don't treat TZDEFAULT as tainted
tzset() calls zoneinit() with the FROMENV flag set unconditionally, so
if TZ is unset and we use TZDEFAULT instead, we were still treating it
as if it came from the environment.  Unset the FROMENV flag if name is
null and we switch to TZDEFAULT, or if, after skipping the optional
leading colon, we find that name is identical to TZDEFAULT.

This incorporates upstream change d0e0b00f846c ("Avoid unnecessary
access, stat calls").

Fixes:		b6ea2513f7 ("tzcode: Limit TZ for setugid programs")
Event:		Oslo Hackathon 202508
Reviewed by:	philip
Differential Revision:	https://reviews.freebsd.org/D52240
2025-09-01 08:33:47 +02:00
Peter Eriksson 004ce88ad1 mpr: Add workaround for too few slots being automatically scanned
This patch adds a /boot/loader.conf setting that makes it possibly to
override the detected number of slots in storage enclosures. Some (yes
I'm looking at you HPE D6020!) reports less available slots that there
actually are (the D6020 seems to report 18 but actually has 35 per
drawer). This causes the mpr driver to have problems detecting/managing
all drives in a multienclosure setting. For the D6020 this occurs when
connecting two or more fully equipped (140 drives) enclosures to one
controller...

This problem can be "fixed" by adding the following to /boot/loader.conf
and rebooting:
    hw.mpr.encl_min_slots="35"

Note: I (Warner) don't have this hardware to see if there's some way to
fix the detection, so I'm committing this as a stop-gap. It's a no-op if
no tunable is set.

PR: 271238
Reivewed by: imp
2025-08-31 13:01:09 -06:00
Jaeyoon Choi 58ce49d185 ufshci: reserve one queue entry for an admin request
This patch reduces num_entries by 1 to reserve a admin slot. It
resolves the issue where admin requests cannot be executed
during QD32 because all queue entries are used.

It also resolve the issue of accessing the queue before it is
created by moving the queue construct point to before interrupt
enable.

Sponsored by:           Samsung Electronic
Reviewed by:		imp
Differential Revision:	https://reviews.freebsd.org/D51894
2025-08-31 12:36:36 -06:00
Jaeyoon Choi 7d748c594e ufshci: Add WriteBooster support
This patch enables WriteBooster to improve write performance. It
reserves SLC space from normal (TLC) storage to handle incoming
writes, reducing latency and handling bursty writes.

The buffer can be dedicated to a single LU or shared across
multiple LUs, depending on configuration. Data staged in SLC is
later flushed back to TLC automatically or on demand, without
changing data placement.

The following table shows WriteBooster performance as tested on a
Galaxy Book S + UFS 4.0(HS-GEAR 4) device.
```
----------------------------------------------------------------
|     Workload      |  BS  | QD | WriteBooster |   Bandwidth   |
----------------------------------------------------------------
| Sequential Write  |  1MB | 32 |    On        |    1568 MiB/s |
| Sequential Write  |  1MB | 32 |    Off       |     556 MiB/s |
----------------------------------------------------------------
```

Also, this function adds a power mode change quirk to the Intel
Lakefield UFS controller.

Sponsored by:           Samsung Electronics
Reviewed by:		imp
Differential Revision:	https://reviews.freebsd.org/D51893
2025-08-31 12:35:52 -06:00
Kyle Evans fb37e38fbe Revert "patch: fix pch_context() for unified diffs with no leading context"
This reverts commit f97b6a8f84, as it
turns out our fuzz implementation is just too naive.  We can have more
leading context than trailing context and vice-versa, so we can't really
assume they're the same.

Restore the previous bug and we can work on it post-branch.

Reported by:	cy
2025-08-30 17:02:35 -05:00
Zhenlei Huang ae7f8da8bf iflib: Set the get counter routine prior to attaching the interface
This ensures other threads, e.g. ioctl threads, see the correct counter
routine once after the interface has been attached.

This change partially reverts commit 23ac9029f9, which for unclear
reason moved setting the get counter routine after ether_ifattach().

Reviewed by:	kbowling, kgalazka, #iflib
Fixes:		23ac9029f9 Update iflib to support more NIC designs
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50712
2025-08-30 23:23:51 +08:00
Zhenlei Huang bb5135d0f2 iflib: Make iflib_register() return void
It never fails since change [1]. No functional change intended.

[1] aa3860851b net: Remove unneeded NULL check for the allocated ifnet

Reviewed by:	kbowling, #iflib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50713
2025-08-30 23:23:51 +08:00
Konstantin Belousov 8321d0da2c kern/kern_thread.c: improve assert in thread_single_end()
The process might be stopped, which is handled by the loop that
unsuspends threads.  But the condition is not tolerated in the assert,
which insists that all threads must be unsuspended always.

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D52293
2025-08-30 18:07:21 +03:00
Mark Johnston a7aac8c204 vnode: Assert that VOP_LOCK succeeds in freevnode()
Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D52245
2025-08-30 14:56:58 +00:00
Michael Tuexen bed2299823 syncache.4: add missing information
Add the description for one sysctl-variable and three counters provided
by netstat.

Reviewed by:		gbe, rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D52226
2025-08-30 16:53:08 +02:00
Michael Tuexen 7b57f25133 tcp: improve sending of SYN-cookies
Ensure that when the sysctl-variable net.inet.tcp.syncookies_only is
non zero, SYN-cookies are sent and no SYN-cache entry is added to the
SYN-cache. In particular, this behavior should not depend on the value
of the sysctl-variable net.inet.tcp.syncookies, which controls whether
SYN cookies are used in combination with the SYN-cache to deal with
bucket overflows.
Also ensure that tcps_sc_completed does not include TCP connections
established via a SYN-cookie.
While there, make V_tcp_syncookies and V_tcp_syncookiesonly bool
instead of int, since they are used as boolean variables.

Reviewed by:		rscheff, cc, Peter Lei, Nick Banks
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D52225
2025-08-30 16:47:10 +02:00
Bjoern A. Zeeb 06527b2818 net80211 / LinuxKPI: 802.11: revert / redo enum ieee80211_sta_rx_bw
The initial thought of migrating the LinuxKPI 802.11 enum into net80211
for shared use did not work out well.  Currently in the need for yet
another adjustment, I decided to undo/de-couple net80211 and
LinuxKPI 802.11 again.

The enum name now gets used in LinuxKPI based wifi drivers and it
turns out it is spelt differntly than what I used initially.
This creates a conflict.

net80211 still in the need to be able to express BW_320 in an uint8_t
will likely be fine with the current solution as well.  Rename the
enum and prefixes in net80211 to "net80211" instead of "ieee80211".
Apart from the names/prefix we leave the values the same.

In LinuxKPI add the enum with the expected name and use it there
throughout to make modern versions of LinuxKPI based wifi drivers
compile.

Sponsored by:	The FreeBSD Foundation
Fixes:		ca389486a9, 2c8b0d6205
MFC after:	3 days
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D52064
2025-08-30 07:38:22 +00:00
Gordon Bergling 0490757142 veriexec.8: Fix a typo in the manual page
- s/detatched/detached/

MFC after:	3 days
2025-08-30 07:47:22 +02:00
Navdeep Parhar 99f3c68452 cxgbe(4): Fix inverted test in sysctl_loadavg
Only internal debug firmwares report the μP load averages so this bug
did not affect regular users.

Fixes:	e19d84979a cxgbe(4): Block most access to the hardware as soon as the adapter stops.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2025-08-29 18:26:20 -07:00
Jamie Gritton 72d01e62b0 netgraph: teach ngctl to attach and run itself in a jail
Add -j <jail> flag to ngctl to allow ngctl to attach and run inside
a jail. This allow parent to manipulate netgraph nodes in the jail
even if ngctl is not available.

Submitted by:	David Marker <dave_freedave.net>
Reviewed by:	kevans, zlei, jamie
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D50241
2025-08-29 16:02:14 -07:00
John-Mark Gurney c4fed7d86d tarfs: add missing set of eofflag in early return, discovered on aarch64
Reviewed by:	stevek
Obtained from:	Juniper Networks, Inc.
2025-08-29 14:49:50 -07:00
Stephen Hurd 40652f86b5 rc: bluetooth: startup improvements
During startup hccontrol reset needs to be run multiple times
for iwbt to work more reliably.  Add a loop trying up to
three times.

Tested by:	various (original version; I changed test to -eq)
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D44861
2025-08-29 20:45:23 +00:00
Jens Schweikhardt 9e8c1ab097 Supercharge the most beautiful console font ever with +4300 glyphs.
I have increased the glyphs from 502 to 4885. Major additions:

 * Greek
 * Cyrillic
 * International Phonetic Association Extensions
 * Extended Latin characters
 * Zapf Dingbats
 * Tons of arrows
 * Tons of mathematical symbols
 * Letterlike symbols and enclosed alphanumerics
 * Pixel-perfect box drawing
 * Currency symbols
 * More punctuation
 * Just enough Katakana to say コンニチハ
 * Powerline glyphs in the Private Use Area at U+e0a0

I have tried hard to keep the look of the font for Greek and Cyrillic
glyphs, but not for symbols like arrows and mathematical operators where
it makes no sense. Please let me know where I messed up (I can only
barely read and write Greek, and hardly any Cyrillic and no Japanese at
all). I used the documents of The Unicode Standard, Version 16.0 as
guidance.

But since Unicode is huuuuge, even just the BMP, there's more to
come in the future, I hope.

Relnotes:	yes
2025-08-29 21:39:00 +02:00
Kyle Evans cc36624b2a patch: test for unified diffs with spaces in filenames
The older GNU patch that we had in base did not properly handle spaces
in filenames in unified diffs, but bsdpatch seems to have handled this
fine at least since the version we imported into base initially.  Add a
test with spaces in the filename specifically to be sure.

PR:		181272
2025-08-29 14:24:35 -05:00
Kyle Evans f97b6a8f84 patch: fix pch_context() for unified diffs with no leading context
When the first line of a file is a removal, we may not have any leading
context.  Only adjusting p_context if context > 0 means that we
incorrectly believe that we have 100 lines of context when the reality
is that we have none.

This fixes a bug with fuzz-checking, which ends up fuzzing away the line
we're trying to replace if it's the first line in the file.  We use
pch_context() to determine a reasonable max-fuzz.

PR:		250511
Reviewed by:	pfg
Differential Revision:	https://reviews.freebsd.org/D51837
2025-08-29 14:24:35 -05:00
Bjoern A. Zeeb 343f8f71af LinuxKPI: skbuff: checksum offloading flags
Given the checksum offloading flags are mutually exclusive and are
not a bit mask, we can compress them into 2 bit for the four possible
values.  Change the define but leave the type at uint8_t for now with
a comment.  We can possible combine them with another sub-octet field
in the future.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 18:55:53 +00:00
Amit Kumar Gupta e2f492a9ac TPM: Add hint check to skip TPM IRQ configuration
Added use_polling hint check in tpm tis driver attach routine
to skip TPM IRQ configuration and to use TPM poll method
to get TPM operation status

Reviewed by:	imp
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D52048
2025-08-29 13:56:25 -04:00
John-Mark Gurney 0b607a0d60 fix mispelling in panic msg
Obtained from:	Juniper Networks, Inc.
2025-08-29 09:48:03 -07:00
Muhammad Saheed 94ed4c1903 libifconfig: Add netlink based helper to bring the interface up/down
Adds `ifconfig_set_up()` to set and unset the `IFF_UP`
on a network interface using `RTM_NEWLINK`.

Sponsored by:	Google LLC (GSoC)
Reviewed by:	obiwac, mckusick (mentor), kp
Approved by:	obiwac, mckusick (mentor), kp
Differential Revision:	https://reviews.freebsd.org/D52128
2025-08-29 17:39:39 +02:00
Marius Halden 6e6febb54d w: Fix idle time in json output, add login/idle times to json output
Currently the idle time will show as `true` part of the time in the json
output and quoting depends on what is being printed. Make sure it's
always printed correctly and for consistency treated as a string in the
json output.

Login time delta and since times are currently exposed in the xml
output, expose these times in the json output as well.

In the json and xml outputs expose the number of seconds idle as a new
field or attribute respectively.

MFC after:	1 week
Sponsored by:	Modirum MDPay
Event:		Oslo Hackathon 202508
Differential Revision:	https://reviews.freebsd.org/D52237
2025-08-29 16:53:26 +02:00
Bjoern A. Zeeb 86a0941db7 LinuxKPI: 802.11: do not delete keys while still assoc
While we are still associated we cannot delete the keys as packets
may still go out and if the firmware has no more keys it will raise
and exception.

This can happen given net80211 has its own mind when to do this and
we, in various places, unlock and re-lock the com lock, so are open
to races.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:43 +00:00
Bjoern A. Zeeb a4c17ecf96 LinuxKPI: 802.11: introduce a debug flag for scan/beacon logging
Split the scan logging up into scan and scan/beacon in order to
not log every beacon if we are trying to debug the scan machinery
but not the actual results.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:43 +00:00
Bjoern A. Zeeb ad4ddc83eb LinuxKPI: 802.11: sort the fallback to software scan for rtw88
In the special case hardware scan fails to start, we cancel the
scan with net80211 and cleanup our part.  In that case we now
sleep and wait for a wakeup.  The wakeup was moved to a different
callback function to serve both cases (hw scan cancelled, and
hw scan failed).

In the very special case the hardware scan fails with a return code
of 1, we need to start a software scan.  I cannot fully imagine this
ever worked well (some rtw88 chipsets are using this).  The trouble
is that the cancael_scan runs in a taskq in net80211 and by the time
we tried to start the new scan, the old one was not fully cleaned up
and finished (or could have been restarted in case we enable bgscan).
So defer starting the software scan to the taskq as well and it will
run once the previous finished.  The RTW8821ce I tested with seemed
a lot more happy.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:43 +00:00
Bjoern A. Zeeb eb4722614a LinuxKPI: 802.11: improve scan/beacon tracing in RX path
In one of my setups I am sometimes seeing "ghost beacons" (beacons from a
BSSID on a 2nd channel where it is not sending beacons; also checked with
a monitor node to be sure).
In order to rule out later processing errors I added debugging early on
in the LinuxKPI 802.11 RX path.  This will at least help us (users) to
debug possible problems more easily by turning on scan debugging (either
here, or using wlandebug +scan to get the net80211 view on it, or both).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:42 +00:00
Bjoern A. Zeeb 075a75efa6 LinuxKPI: 802.11: improve scanning when not using the net80211 chanlist
With the option to not use the net80211 scan list but scan all channels
(if we can scan all bands at once, etc.) we possibly scanned more
channels than needed (or we should have).  Add a helper function to
sort out disabled channels and channels which are not on the net80211
ic_chan_active list (e.g. removed by regdomain).  This could potentially
also remove channels for a 2nd band for software scanning, but in the
offload cases it should not.

Add scan logging for the disabled channels and add scan logging to print
the finalized channel list we are using for this scan (as net80211 has a
similar logging).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:42 +00:00
Bjoern A. Zeeb be1ae08d0a LinuxKPI: 802.11: use ni_dtim_period instead of iv_dtim_period
Both iwm(4) and iwx(4) are using the iv_dtim_period from the vap.
This likely stems from the fact that ieee80211_sta_join() while setting
up the ni basics does set the dtim_period on the vap (we should revist
this in net80211) from the scan results.

The problem with that is that once we are associated and are receiving
beacons, sta_recv_mgmt() will handle the TIM IE and and save the
tim period and tim count in ni_dtim_period and ni_dtim_count on the node.

Given we need to inform the driver/firmware (at least for iwlwifi)
with values from beacons received after assoc, the ni is the better
place the take the value from (though the beacons hopefully stay
consistent).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:42 +00:00
Bjoern A. Zeeb 1d77e11f6c LinuxKPI: 802.11: scanning improvements and experiments
Introduce SCAN tracing by adding a dedicated debug category for it
and sprinkle some TRACE_SCAN() lines in hopefully helpful places.

Add an experimental sysctl to re-sort the scan channel list based on
"primary" channels first and 5Ghz before 2Ghz.
Also start scanning the higher bands first (5Ghz before 2.4 even without
the sysctl set).
These are largely a result of various reports of people not able to
see their BSSID on 5Ghz.  How much of a difference this will make
in real world and depending on driver/firmware is for the people to
experiment.  In my observations iwlwifi(4) independent on all this
presents scan results 2.4 band channels 1..14 first, and then the
5Ghz band channels 177..32.

Factor out re-enabling hardware scan.  This is used especially in case
of rtw88 to not be stuck on software scan forever if the rtw88 driver
decides that it currently cannot do a full hw offload scan.

Add compile time support for BGSCANs but keep it disabled by default
as during testing races with net80211 and some APs idle-disconnect
were found.  Still check in the code in case we do see a bgscan
despite it being disabled.  This stems from 32af70fae8.

Minor improvements like recording the scan_start time and making sure
we properly cancel/restart scans if hw offload scan fails.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:42 +00:00
Bjoern A. Zeeb fc36de571f LinuxKPI: 802.11: adjust lower wake_queue locking
In bc24342d96 we added lower wake_queue locking.  There are paths,
such as in rtw89 from a (*hw_scan_cancel)() that we can get to there and
then would recursively acquire the wiphy lock which is not allowed.
Adjust locking to a spin lock to match Linux driver expectations.

Sponsored by:	The FreeBSD Foundation
Fixes:		bc24342d96
MFC after:	3 days
2025-08-29 13:18:41 +00:00
Bjoern A. Zeeb d1df103190 LinuxKPI: 802.11: mark all structs in struct ieee80211_mgmt __packed
These structs as part of the union are used to handle raw packet data
so mark them all __packed.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:41 +00:00
Bjoern A. Zeeb a99462b0c9 rtw88: ensure channel definitions have band set
A Linux definition of a channel has freq, hw_value, band, and flags.
rtw88 so far only set the first two but never set the band on the
channel.
This sorted out channels from scanning (at least after updates) but
possibly also led to other unnoticed circumstances.

Use the macros from rtw89 and replicate the information properly
filling band on each channel definition as well.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-08-29 13:18:41 +00:00
Bjoern A. Zeeb a274435d0d LinuxKPI: implement str_disable_enable()
Implement str_disable_enable() needed by a wireless driver by using
the already existing str_enable_disable() with a toggled argument.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D52081
2025-08-29 13:18:41 +00:00
Bjoern A. Zeeb 7dce26eded usb: hub: uhub_root_intr() mark function arguments as __unused
No functional change.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	aokblast, imp
Differential Revision: https://reviews.freebsd.org/D52147
2025-08-29 13:18:40 +00:00
Alexander Ziaee b4a560d34f man4/Makefile: Add a reminder about architectures
MFC after:		3 days
Suggested by:		emaste
Reviewed by:		bcr
Differential Revision:	https://reviews.freebsd.org/D51464
2025-08-29 08:49:27 -04:00