Commit graph

277578 commits

Author SHA1 Message Date
Alan Somers 7a8bab3d94 ctladm: don't require the use of "-p" with "port -r"
When removing a port, the ioctl frontend requires the "-p" argument.
But other frontends, like cfiscsi, do not.  So don't require that
argument in the ctladm command.  The frontend driver will report an
error if any required argument is missing.

Sponsored by:	Axcient
Reviewed by:    mav
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1279

(cherry picked from commit edbd489d09)
2024-06-28 13:34:10 -06:00
Alan Somers 259f94f8ab ctladm: better documentation for adding and removing cfiscsi ports
Sponsored by:	Axcient
Reviewed by:    mav
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1279

(cherry picked from commit afecc74cd7)
2024-06-28 13:26:44 -06:00
Alan Somers 1dc90424b2 ctladm: print port number with a succesful "port -c" command
Make "ctladm port -c" print the port number of the newly successful
port.  This way it won't have to be guessed by a subsequent "ctladm
portlist" command.  That means it's safe to use it concurrently with
other ctladm processes.  In particular, this allows the tests to be run
in parallel.

Sponsored by:	Axcient
Reviewed by:    mav
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1279

(cherry picked from commit 591de7534f)
2024-06-28 13:25:54 -06:00
Alan Somers ab9e5b8659 Add some ATF tests for ctladm
So far only "ctladm port -c" and "ctladm port -r" are covered.

Sponsored by:	Axcient
Reviewed by:	mav
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1279

(cherry picked from commit 9747d11d91)

Fix mtree entry for ctladm tests

Sponsored by:	Axcient

(cherry picked from commit 81ef0a89fc)

ctladm: add a copyright header to the port test

[skip ci]

Reported by:	markj
Sponsored by:	Axcient

(cherry picked from commit a1608e8854)
2024-06-28 13:04:11 -06:00
Alan Somers 4451b1de21 ctladm.8: fix several errors in the "port" section
* Document the "-d" option.
* Add the "-c" and "-r" options to the summary.
* Correct the list of required options.
* Clarify that the "-t" option is only for use with "-o", "-w", and "-W"
* Replace references to the nonexistent "-n" with "-p".

Also, fix a few related error strings in the ctladm command.

Sponsored by:	Axcient
Reviewed by:	jhb
Differential Revision: https://reviews.freebsd.org/D45503

(cherry picked from commit 60107d23d8)
2024-06-28 13:00:41 -06:00
Alan Somers 1cc56f881f mdconfig: fix cleanup in the attach_size_rounddown test
Sponsored by:	Axcient

(cherry picked from commit d1bd097d52)
2024-06-28 12:56:38 -06:00
Alan Somers 43d29dceea vfs_getopt(9): fix typo
[skip ci]

Reported by:	Claudiu <mscotty@protomail.ch>

(cherry picked from commit 3cc1b35bc1)
2024-06-28 12:56:11 -06:00
Alan Somers af64741bba fusefs: make the tests more robust to changes to maxphys
Remove assumptions in two test cases that maxphys won't be huge.

Reported by:	kib
Sponsored by:	Axcient

(cherry picked from commit b2792a300d)
2024-06-28 12:54:00 -06:00
Gleb Smirnoff 4052c95280 tests/fusefs: fix all tests that depend on kern.maxphys
The tests try to read kern.maxphys sysctl into int value, while
unsigned long is required.  Not sure when this was broken, seems like
since cd85379104.

Reviewed by:		asomers
Differential Revision:	https://reviews.freebsd.org/D45053

(cherry picked from commit e9b411d273)
2024-06-28 12:52:07 -06:00
Alan Somers 51bee6ab65 geli.8: minor proofreading
Sponsored by:	Axcient
Reviewed by:	imp, pauamma (manpages)
Differential Revision: https://reviews.freebsd.org/D44907

(cherry picked from commit c0f02dcd4c)
2024-06-28 12:49:18 -06:00
Mariusz Zaborski c7bb7a2333 libcapsicum: cache more time zone information
The functions like gmtime(3) expect to cache a GMT time zone. Some
sandboxed programs (like last(1)) use the gmtime(3) function.
In case of last(1), this function fails to load a proper time zone
because it is called after entering the capability mode.

_open () at _open.S:4
0x00000008011bc5a8 in tzloadbody (name=0x8018b9580 "/usr/share/zoneinfo/Etc/UTC", sp=0x801870140,
tzload (name=<optimized out>, sp=0x801870140, doextend=true)
0x00000008011bb8ba in gmtload (sp=0x801870140) at /usr/src/contrib/tzcode/localtime.c:1456
gmtcheck () at /usr/src/contrib/tzcode/localtime.c:1581
0x000000080111f85a in _libc_once (once_control=0x80127c550, init_routine=0x0)
_once (once_control=0x80127c550, init_routine=0x0) at /usr/src/lib/libc/gen/_once_stub.c:63
0x00000008011bb9d0 in gmtime_r (timep=0x7fffffffe3a8, tmp=0x80127c568)
gmtime (timep=timep@entry=0x7fffffffe3a8) at /usr/src/contrib/tzcode/localtime.c:1865
0x0000000001024cd4 in printentry (bp=bp@entry=0x8018b4800, tt=tt@entry=0x80186a0a0)
0x00000000010245ae in doentry (bp=0x8018b4800)
0x00000000010243a7 in main (argc=1, argv=<optimized out>)

This time zone is not loaded by the tzset(3) function. Because of
that, extend the caph_cache_tzdata(3) function to also include the
GMT time zone. There is no other way to cache this data than
calling gmtime(3) once.

MFC after:	5 days
Reviewed by:	emaste, markj
Differential Revision:	https://reviews.freebsd.org/D45297

(cherry picked from commit e24ff5c99b)
2024-06-28 12:19:56 +02:00
Mariusz Zaborski 7fa105d91f isp: fix ISPCTL_ABORT_CMD switch case
Prevent kernel panic by not running ISPCTL_FCLINK_TEST after a
failed ISPCTL_ABORT_CMD.

Reviewed by:	mav
Tested by:	Arne Steinkamm <arne@steinkamm.com>
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45718

(cherry picked from commit 8aa9192ce9)
2024-06-28 12:19:14 +02:00
Baptiste Daroussin 1cac66d0db ee: fix wprintw usage (highlighted by ncurses 6.5)
Reported by: cy

(cherry picked from commit 0667538b88)
2024-06-27 11:01:57 +02:00
Baptiste Daroussin 53b4192956 systat: fix build with newer ncurses
(cherry picked from commit 35e941ce55)
2024-06-27 11:01:57 +02:00
Baptiste Daroussin 798c7248e7 libarchive: fix thread autodetermination for zstd compression format
The libarchive code uses sysconf(3) to determine the number of threads
when 0 has been given as the number of thread to use

MFC after:	3 days

(cherry picked from commit a25e0ba57e)
2024-06-27 10:54:04 +02:00
Colin Percival d6fecbebfc release: Publish non-uploaded cloudware bits
[MFC note: We don't have BASIC-CLOUDINIT or support for multiple disk
formats or filesystems in VMs on 13.x so this MFC only does BASIC-CI
and only for UFS on RAW.]

While most "cloudware" (AWS, Azure, GCP, Vagrant) images get uploaded
to their respective clouds, we have two images -- BASIC-CI and
BASIC-CLOUDINIT -- which are published via the FTP mirrors.  We have
been handling these using a manual and error-prone process of copying
them from the internal build directories into the FTP staging tree,
but they should be handled using the "make install ftp-stage"
mechanism which is used for all the other published images.

This commit 1. Adds a new 'make cloud-install' target which is run as
part of 'make install' and installs BASIC-CI and BASIC-CLOUDINIT images,
and 2. Extends 'make ftp-stage' in Makefile.mirrors to copy those bits
into the FTP staging area.

As a side benefit, this will also make BASIC-CI and BASIC-CLOUDINIT
images available for arm64; until now they have only been available
for amd64.

MFC after:	1 week

(cherry picked from commit 4771c2e9d1)
2024-06-25 17:52:55 -07:00
Zhenlei Huang 803bc0f91f net80211: Correct a comment
MFC after:	3 days

(cherry picked from commit 34c98f40f5)
(cherry picked from commit ae979c7644)
2024-06-25 12:27:06 +08:00
Eugene Grosbein 73d1f732ce rc.subr: improve description for ${name}_offcmd
Clarify that ${name}_offcmd is for method start.

(cherry picked from commit af1b0aa5b9)
2024-06-21 15:29:53 +07:00
Xin LI cbfeaa80e3 Update leap-seconds to leap-seconds.3676924800
Obtained from:  ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.3676924800

(cherry picked from commit 8a607939de)
2024-06-20 22:46:46 -07:00
Shailend Chand 14454f4172 gve: Make gve_free_qpls idempotent
This fixes a panic caused by double free.

PR:	kern/279410
Differential Revision: https://reviews.freebsd.org/D45489

(cherry picked from commit b81cbb1241)
2024-06-20 22:45:58 -07:00
Gordon Bergling 35dfbe1ec8 virtio(4): Fix two typos in KASSERT messages
- s/emtpy/empty/

(cherry picked from commit 018a361f89)
2024-06-21 05:47:22 +02:00
Gordon Bergling 0c1370e062 camcontrol.8: Fix a typo in the manual page
- s/emtpy/empty/

(cherry picked from commit d1e652bf04)
2024-06-19 06:18:10 +02:00
Kristof Provost 9748482d34 pf tests: test longer anchor names
PR:		279225
MFC after:	3 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 8b28ec3861)
2024-06-18 16:43:43 +02:00
Kristof Provost 70cd0b4b03 pfctl: fix recursive printing of nat anchors
Similar to the preceding fix for rules, ensure that we
recursively list wildcard anchors for nat rules.

MFC after:	3 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 8ddd0359bc)
2024-06-18 16:43:43 +02:00
Ed Maste 6e1a7ade21 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

(cherry picked from commit 73cce7d888)
(cherry picked from commit c0e5d8f9bd)
2024-06-18 10:20:41 -04:00
Eugene Grosbein 61d43332e6 rc.subr(8): MFC: introduce ${name}_offcmd
New variable ${name}_offcmd may be used to supply commands
executed if named service is not enabled. Previously start_precmd
could be used for such a task but now rc.subr(8) does not call it
if a service is not enabled.

Fix devd startup script to use it instead of start_precmd.

PR:		279198
Reported by:	Dmitry S. Lukhtionov
Tested by:	Dmitry S. Lukhtionov

(cherry picked from commit 32a579e4fc)
(cherry picked from commit c2db3a0c7d)
2024-06-17 12:06:59 +07:00
Zhenlei Huang 0dddcc6576 pfsync: Correctly check if bpf peers are present
On creating the pfsync(4) interface, pfsync_clone_create() does an
unconditional bpfattach(). Use bpf_peers_present() which was introduced
in commit 16d878cc99 [1] to check the presence of bpf peers.

This will save a little CPU cycles and memory usage when the
synchronisation interface is not configured and there is no bpf peers
present. There should be no functional change.

1. 16d878cc99 Fix the following bpf(4) race condition which can result in a panic

Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45533

(cherry picked from commit 2671bde992)
(cherry picked from commit f14b540dc4)
2024-06-17 12:16:38 +08:00
Zhenlei Huang cbea6b60da pflog: Correctly check if bpf peers are present
On creating the pflog(4) interface, pflog_clone_create() does an
unconditional bpfattach(). Use bpf_peers_present() which was introduced
in commit 16d878cc99 [1] to check the presence of bpf peers.

This will save a little CPU cycles when no bpf peers present. There
should be no functional change.

1. 16d878cc99 Fix the following bpf(4) race condition which can result in a panic

Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45532

(cherry picked from commit ebc2bab048)
(cherry picked from commit 954e548b7e)
2024-06-17 12:10:35 +08:00
Zhenlei Huang d27149888c bpf: Make bpf_peers_present a boolean inline function
This function was introduced in commit [1] and is actually used as a
boolean function although it was not defined as so.

No functional change intended.

1. 16d878cc99 Fix the following bpf(4) race condition which can result in a panic

Reviewed by:	markj, kp, #network
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45509

(cherry picked from commit 0dfd11abc4)
(cherry picked from commit 6ad2e347fc)
2024-06-17 12:10:23 +08:00
Zhenlei Huang 43bb3553f1 if_enc(4): Prefer the boolean form when calling bpf_peers_present()
No functional change intended.

MFC after:	1 week

(cherry picked from commit 215a18d502)
(cherry picked from commit a674f992a1)
2024-06-17 12:10:11 +08:00
Bjoern A. Zeeb 07da0ad63a LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames
The "Invalid TXQ" error from iwlwifi seems to be triggered by a
frame being sent for a sta which is no longer known to the driver/fw.

While we make sure to trigger the sending of the frame in net80211
early enough (by calling (*iv_newstate)() early on rather than at
the end), TX in LinuxKPI is run in a deferred task.  When we drop the
net80211 ic lock again and re-acquire the LHW lock the packet may not
yet have made it to the driver.
Work around this between the (ic and lhw) locks by making sure
(a) no new packets get queued after we return from (*iv_newstate)(),
and (b) the TX task has run or gets cancelled and we manually push
any remaining packets out (or let lsta_free() clean them up).
The disabled packet queuing now also needs to be re-enabled in
scan_to_auth() in case an lsta is staying in service or gets re-used.

Also make sure that any following lkpi_wake_tx_queues() calls no
longer ignore queues which have not seen a prior dequeue.
This former workaround "feature" (ltxq->seen_dequeue) should be
fully garbage collected in a later change on its own.

Sponsored by:	The FreeBSD Foundation
PR:		274382
Tested by:	emaste, lwhsu, thj, rkoberman at gmail.com
Accepted by:	adrian
Differential Revision: https://reviews.freebsd.org/D45508

(cherry picked from commit 8866534929)
2024-06-14 14:55:16 +00:00
Bjoern A. Zeeb cafefba481 LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)()
We have to unlock the net80211 ic lock in order to be able to call
sleepable downcalls to the driver/firmware; a 2nd thread may go through
net80211::join1() and (*iv_update_bss)() after we checked and unlocked.
Re-check status at the end of the function under the ic lock so that we
do not accidentally set lvif_bss_synched to true again despite it no
longer being true.

This should fix a race where we lost the (*iv_update_bss)() state
during startup where one SCAN->AUTH is followed by a (then) AUTH->AUTH
and lkpi_sta_a_to_a() did the wrong thing.

Once we re-consider net80211 state and allowing a second join
on a different node or iv_bss update without previously tearing down
the older node we can likely undo a lot of these extra checks and
workarounds.

Sponsored by:	The FreeBSD Foundation (updated version)
Tested by:	emaste (on and off)
Reviewd by:	cc
Differential Revision: https://reviews.freebsd.org/D43967

(cherry picked from commit 105b9df26e)
2024-06-14 14:55:16 +00:00
Bjoern A. Zeeb 66627e5c13 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls
Lock the two TX MO downcalls into driver/firmware in
lkpi_80211_txq_tx_one() to make sure they cannot happen in the
middle of other (net80211 triggered) updates calling down into
the driver/firmware.

Sponsored by:	The FreeBSD Foundation (commit)
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43966

(cherry picked from commit 45bce6fa30)
2024-06-14 14:55:16 +00:00
Bjoern A. Zeeb f70e21e70b LinuxKPI: 802.11: rename chanctx_conf for consistency
We used to call the struct ieee80211_chanctx_conf variable "conf"
in some places but that becomes confusing with bss_conf and other
"conf" bits.  On the vif it is already called chanctx_conf thus also
rename it on the internal struct lkpi_chanctx and for our variables
in the implementation.

This should not have any external visibility.
No functional changes intended.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45185

(cherry picked from commit d1af434d99)
2024-06-14 14:55:16 +00:00
Bjoern A. Zeeb def43d8a4a LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes
While the previous order worked well for iwlwifi 22000 and later chipsets
(AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes.
Change the teardown order to avoid these problems.  The inline comments
in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new
order and also the old problems we were seeing (too early sta removal or
silent non-removal) leading to follow-up problems.

There is a possible further problem still lingering but a lot harder to
trigger (see comment in review) and likely related to some other doings
so we'll track it separately.

Sponsored by:	The FreeBSD Foundation
PR:		275255
Tested with:	AX210, 8265 (bz); 9260 (Bakul Shah)
Differential Revision: https://reviews.freebsd.org/D45293

(cherry picked from commit 5a4d24610f)
2024-06-14 14:55:16 +00:00
Bjoern A. Zeeb b5e3a31ac0 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
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43944

(cherry picked from commit 1665ef979d)
2024-06-14 14:55:16 +00:00
Bjoern A. Zeeb 24cb6fe158 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.

Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43965

(cherry picked from commit ac867c20e6)
2024-06-14 14:55:16 +00:00
Bjoern A. Zeeb 2a12368e7c LinuxKPI: 802.11: implement a deferred RX path
Some calls, e.g., action frames cause us to call through all the
way down to firmware from the RX path without any deferral in
net80211.

For LinuxKPI and iwlwifi this goes (with omissions) like this:
lkpi_napi_task -> linuxkpi_ieee80211_rx -> ieee80211_input_mimo ->
sta_input -> ht_recv_action_ba_addba_request ->
lkpi_ic_ampdu_rx_start -> iwl_mvm_mac_ampdu_action ->
iwl_trans_txq_send_hcmd.  At that point we are waiting for an
interrupt from the firmware but given the lkpi_napi_task has not
finished (and may have more to dispatch based on budget and what
was received) we will not see the new interrupt/fw response.
With no answer from the firmware, the software timeout in the
driver kills the command and the firmware and issues a complete
restart.

Implement the deferred RX path in LinuxKPI for the moment.
At a later point we should carefully shift this into net80211.

This fixes the hangs for (*ic_ampdu_rx_start)() calls with iwlwifi.

PR:		276083
Reviewed by:	cc
Differential Revision: https://reviews.freebsd.org/D43968

(cherry picked from commit 759a996d61)
2024-06-14 14:55:15 +00:00
Alan Somers cb3c40b430 fusefs: correct a comment
[skip ci]

Sponsored by:	Axcient

(cherry picked from commit c1326c01df)
2024-06-13 13:51:08 -06:00
Emil Tsalapatis bd11dd6fb9 fusefs: only test for incoherency if FN_SIZECHANGE is set
FUSE emits spurious incoherency warnings in writethrough mode. The
warnings are triggered by setattr calls generated by vnode truncation
turning the cached va_size vattr stale, causing comparisons with the
fresh version provided by the server to fail. Only validate the vnode's
va_size vattr if the FN_SIZECHANGE flag is set.

This is a part of the research work at RCSLab, University of Waterloo.

Reviewed by:	asomers
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1110

(cherry picked from commit 8758bf0aae)
2024-06-13 13:46:01 -06:00
Alan Somers f5f1f1115f fusefs: fix some memory leaks in the tests
(cherry picked from commit 39f5d8dd1b)
2024-06-13 13:40:59 -06:00
Alan Somers c7fc7a4b9c fusefs: prefer new/delete over malloc/free
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D43464

(cherry picked from commit 8bae22bbbe)
2024-06-13 13:40:53 -06:00
Baptiste Daroussin 7e9f5bcdc4 find: fix build on 32bits 2024-06-13 13:00:40 -06:00
Goran Mekić 20ac2dc15f find: add SIGINFO handler
Print number of files processed and path currently being processed on
SIGINFO.

Reviewed by:	des, asomers
Sponsored by:	Axcient
Differential Revision: https://reviews.freebsd.org/D43380

(cherry picked from commit d06a00963b)
2024-06-13 12:29:45 -06:00
Kristof Provost 00a51ada6b pf: add sctp multihome probe points
Add probe points to allow us to probe when we add or remove multihome addresses.

Example use:
	pf:sctp:multihome:add
	{
		printf("Add tag %x address %x", arg0,
		    ((struct pf_sctp_source *)arg1)->addr.v4.s_addr);
	}

	pf:sctp:multihome:remove
	{
		printf("Remove tag %x address %x", arg0,
		    ((struct pf_sctp_source *)arg2)->addr.v4.s_addr);
	}

MFC after:	1 week
Sponsored by:	Orange Business Services

(cherry picked from commit f042e15154)
2024-06-13 14:18:19 +02:00
Bjoern A. Zeeb f9ac06af3b net80211: move net_epoch into net80211
Move the net_epoch into net80211 around the if_input calls and out of
the driver (in this first case LinuxKPI).  This reduces coverage but
also allows us to alloc in calls like (*ampdu_rx_start) which do not
actually pass data up the stack.

The follow-up commits (squashed) reverts:
b65f813c1a
  Revert "Widen EPOCH(9) usage in PCI WLAN drivers.",
21c4082de9
  Revert "Widen EPOCH(9) usage in USB WLAN drivers.",
17c328b6ae
  Revert "Enter the network epoch in USB WiFi drivers when processing input",
af2441fbc7
  Revert "[ath] Attempt to fix epoch handling.",
and 6c3e93cb5a for if_ath.c only
  ath: Revert "Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process".

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42427

(cherry picked from commit de607e3c23)
(cherry picked from commit 1c6dd33d26)
(cherry picked from commit 39b7027979)
(cherry picked from commit 75f298492a)
(cherry picked from commit eb3821e6d9)
(cherry picked from commit 82506f26c0)
2024-06-12 22:18:50 +00:00
Maxime Thiebaut 83549ee250 u3g: Add support for SIM7600G
Signed-off-by:	Maxime Thiebaut <maxime+freebsd@thiebaut.dev>
Reviewed by:	kp

(cherry picked from commit b5b90ff984)
2024-06-12 21:34:29 +02:00
Bjoern A. Zeeb 2f5608c9af LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions
Rather than using the values and leaving net80211 names in a comment
define the LinuxKPI IEEE80211_HT_CAP_* to the net80211 IEEE80211_HTCAP_*
names.  That way errors like the one fixed in 3e0915b7b6 are less
likely to happen.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 63a327b954)
2024-06-12 17:02:46 +00:00
Bjoern A. Zeeb 88de7a318d LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC
IEEE80211_HT_CAP_RX_STBC was set to 0x100 instead of 0x300.
Correct to get the expected behavior.

Sponsored by:	The FreeBSD Foundation
Fixes:		b0f7376822 LinuxKPI: 802.11 header updates
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D45506

(cherry picked from commit 3e0915b7b6)
2024-06-12 17:02:40 +00:00
Bjoern A. Zeeb ba0e9f5264 LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx()
The logic following this new assignment in some cases may not set lsta
but the later tracing is checking for it to be != NULL.
With lsta not initialized that check may not hold up and later we would
dereference lsta->state and possibly panic.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D45507

(cherry picked from commit 582469016a)
2024-06-12 17:02:05 +00:00