| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing the order of cleanup in lkpi_ic_vap_delete() will avoid
firmware crashes or a direct panic as observed as ieee80211_vap_detach()
will do most cleanup for us and get us into the correct state.
The solution is not fully developed yet and one may not be able
to create a new vap (lkpi_ic_vap_create may fail with error 17)
afterwards. It is supposed to be a step towards more stability
for now.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 269842
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the call to lkpi_disassoc() before the state change to
IEEE80211_STA_NOTEXIST which will remove the sta (from firmware).
Based on a comment it seems that originally we had to do it the
other way round.
iwlwifi(4) has a check and will silently not remove the sta from
the firmware when vif->cfg.assoc is still set (see iwl_mvm_sta_del()).
This leads to the LinuxKPI 802.11 code thinking the sta is gone as
downward state changes by the mac80211 op (*sta_state)() may not fail.
Once we try to assoc with a newly added station later, iwlwifi firmware
will run into an assert having two ap_sta set on the same vif.
We can observe that problem in iwlwifi(4) having __le32 sta_id = 1
instead of sta_id = 0 in iwl_mvm_sta_cfg_cmd{} on the HCMD.
This should fix one of the most seen problems with iwlwifi(4), e.g.,
when running service netif restart wlan0 or
service wpa_supplicant restart wlan0.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
Start implementing regulatory_hint() using a .c file based allocation
helper function so we could change structures in the future with
better chances to keep compatibility.
This sets wiphy->regd needed by various LinuxKPI based WiFi drivers.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
| |
Factor out ieee80211_chanctx_conf into struct lkpi_chanctx in order to
keep local state as well. In first instance that is added_to_drv
only. For now we stay single-chanctx only but this paves the path
to make it a list.
Use the new information to implement ieee80211_iter_chan_contexts_atomic().
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
| |
tid_to_mac80211_ac is an exported symbol in and likely based on iwlwifi,
which leads to a symbol clash in NetBSD. Rename our local LinuxKPI copy
to a better name and add a comment where to find a copy of the mapping
table.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reported by: Phil Nelson (phil netbsd org)
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setup more link_conf/deflink fields for vif/sta as are needed to allow
us to work with the KPI bits in a non-MLO configuration.
In lkpi_sta_scan_to_auth() set the bss_conf values before calling into
the driver for chanctx setup/updates as certain values (e.g., beacon_int)
need to be set before; we still call the MO function for the updates
after to keep the expected workflow.
Deal with the (to be dealt with otherwise later) net80211 ni swaps and
update the addresses on the deflink as well as otherwise firmware will
hit asserts or things will not work (e.g. indicating the peer is us).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
| |
When adding a VAP (vif) initialize its tx queue parameters calling
mo_conf_tx().
I could not spot net80211 providing some of the values needed before
having a node so currrently we use hard-coded values with a comment
with a reference on how to properly calculate the values in the future
(e.g., in case of 11b or other cases).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Driven by net80211 we may call mac80211 ops stop() and start() mostly
when toggling a first VAP. While this is FreeBSD behaviour the firmware
based LinuxKPI drivers seem to possibly clear state in the case of stop()
triggering further errors down the line.
We call mo_start() when starting the VAP and mo_stop() when destroying
it now only. In the future (e.g., in multi-VAP setups) we may need to
re-address some of this so keep the code under #ifdef.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
With past commits new structures were added. Now switch over some
bss_conf fields into vif->cfg where they got moved to and remove the
old fields. This allows drivers to find the expected values in the
now expected places and work better.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
| |
With MLO and multi-link setups if avail we want to call link_info_changed
whereas for legacy drivers we still need to call bss_info_changed.
While we currently do not (yet) support multi-link configurations
we still need to drive the correct commands to satisfy firmware
requirements.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In [1] we updated the KPI for various mac80211 ops functions to deal
with MLD code. Newer iwlwifi driver and firmware supports these
functions so we need to pass non-dummy (0, NULL) arguments to them.
Start extending the internel MO functions by these arguments and
pass down values from LinuxKPI 802.11 code.
It is assumed that further work will be needed to have all the
right fields available to at least work in the lgeacy way of a
single link.
Sponsored by: The FreeBSD Foundation
Improves: 549198b1ab95 (update mac80211 KPI) [1]
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
Unconditionally enable the changes for newer drivers, as needed by
iwlwifi (and others).
Sposnored by: The FreeBSD Foundation
MFC after: 3 days
X-Note: breaks build until iwlwifi update (next hash)
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
| |
It's not used outside of linux_signal.c
While here fix the indentation.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the main purpose was to assign an(y) early chandef with the
loop, later additions made use of it to also count supbands as well
as to initialise max_rates.
Due to the main goal we can exit the loop early and not properly
count and initialise supbands and max_rates.
Move the terminating condition into the loop and make it a continue
rather than ending the loop.
Fixes: d9945d7821b9b ("improve hw_scan")
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
| |
In b0f73768220e9 we added bssid[] to struct cfg80211_scan_request
likely while working on mt76 and did not need it (yet) back then.
iwlwifi started to use the field in Linux f1fec51cda70f (April 2023).
Without it set firmware crashes when trying to send probe requests
((empty) SSID also given to hw_scan).
For now always set the field to the wildcard BSSID.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
It seems the mac_header can be set to offset 0 for frames received.
Remove the warning splattering messages to the console for each packet.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
So we can use it in non-linuxkpi sources.
Reviewed by: emaste, mmel
Differential Revision: https://reviews.freebsd.org/D41767
Sponsored by: Beckhoff Automation GmbH & Co. KG
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 3f686532c9b4 tried to fix an issue with not properly starting
at the first page in the sg list to prevent a panic. This worked but
with the side effect of incrementing "s" during the final iteration
causing it to be NULL since the list had ended.
In cases non-DEBUG kernels this causes a panic with drm-5.15, since
"s" is NULL when we later pass it to sg_mark_end().
This change decouples the iteration sg from the return value so that
it is never incremented past the final page in the chain.
MFC after: 3 days
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D41574
|
|
|
|
|
|
|
|
|
|
|
| |
32-bit compatibility code is conventionally stored in
sys/compat/freebsd32. Move freebsd32_timerfd_gettime() and
freebsd32_timerfd_settime() from sys/kern/sys_timerfd.c to
sys/compat/freebsd32/freebsd32_misc.c.
MFC After: 3 days
Reviewed by: imp, markj
Differential Revision; https://reviews.freebsd.org/D41640
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update ieee80211_request_smps() to the new number of arguments in
LinuxKPI (which was already prepared) and update the one call in the
older iwlwifi driver version.
This will allow iwlwifi as-is now and rtw88 to compile in case someone
else wants to work on the latter in parallel to predominant efforts on
the former.
Sponsored by: The FreeBSD Foundation
MFC after: 20 days
|
|
|
|
|
|
|
| |
To help porting the Linux emulation layer to a new platforms start using
Linux names for conditional builds instead of architecture-specific ifdefs.
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
The timerfd is introduced in FreeBSD 14, and the Linux ABI timerfd is
also moved to FreeBSD native timerfd, but it can't work well as Linux
TFD_CLOEXEC and TFD_NONBLOCK haven't been converted to FreeBSD
TFD_CLOEXEC and TFD_NONBLOCK.
Reviewed by: dchagin, jfree
Differential revision: https://reviews.freebsd.org/D41708
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD does not permits manipulating extended attributes in the system
namespace by unprivileged accounts, even if account has appropriate
privileges to access filesystem object.
In Linux the system namespace is used to preserve posix acls. Some Gnu
coreutils binaries uses posix acls, eg, install, ls, cp. And fails if
we unexpectedly return EPERM error from xattr system calls.
In the other hands, in Linux read and write access to the system
namespace depend on the policy implemented for each filesystem, so we'll
mimics we're a filesystem that prohibits this for unpriveleged accounts.
Reported by: zirias
Tested by: zirias
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
If size is specified as zero, these calls return the current size
of the list of extended attribute names (and leave list unchanged).
Tested by: zirias
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD does not permits manipulating extended attributes in the system
namespace by unprivileged accounts, even if account has appropriate
privileges to access filesystem object.
In Linux the system namespace is used to preserve posix acls. Some Gnu
coreutils binaries uses posix acls, eg, install, ls. And fails if we
unexpectedly return EPERM error from xattr system calls.
In the other hands, in Linux read and write access to the system
namespace depend on the policy implemented for each filesystem, so we'll
mimics we're a filesystem that prohibits this for unpriveleged accounts.
Reported by: zirias
Tested by: zirias
MFC after: 1 week
|
|
|
|
|
| |
Tested by: zirias
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
On Linux ENODATA mean the named attribute does not exist, or the
process has no access to this attribute.
Reported by: zirias
Tested by: zirias
MFC after: 1 week
|
|
|
|
|
| |
Tested by: zirias
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
The mac_syscall system call works fine as long as any MAC module
that provides a mpo_syscall method handles compat32 appropriately.
Regenerate system call files for freebsd32.
Reviewed by: sjg
Obtained from: Juniper Networks, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41575
|
|
|
|
|
|
|
|
|
|
|
| |
Move the timerfd impelemntation from linux compat code to sys/kern. Use
it to implement the new system calls for timerfd. Add a hook to kern_tc
to allow timerfd to know when the system time has stepped. Add kqueue
support to timerfd. Adjust a few names to be less Linux centric.
RelNotes: YES
Reviewed by: markj (on irc), imp, kib (with reservations), jhb (slack)
Differential Revision: https://reviews.freebsd.org/D38459
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a set of updates of the mt76 driver based on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1),
This adds support for mt7996 as well.
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5),
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3),
(wt-2023-08-06) 2a220a15be657a24868368892e3e2caba2115283 (after v6.5-rc4).
The current version of LinuxKPI lacks support for "page pool" which
needs enhancing and updating a decade or so old shortcut mapping
struct page directly to struct vm_page.
MFC after: 20 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust and add structs, fields, functions to make more modern versions
of LinuxKPI based wireless drivers (based on wireless-testing (
wt-2023-06-09, wt-2023-07-24, and later)) compile.
Some of these changes can only be applied once all drivers get
updated to not break the old versions currently in the tree.
Mark those changes with __FOR_LATER_DRV_UPDATE for now and flip the
switch at a later point.
Sponsored by: The FreeBSD Foundation
MFC after: 20 days
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
|
|
|
|
| |
Adding a writev syscall wrapper is needed due to Linux family of write
syscalls doesn't distinguish between in kernel blocking operations
and always returns EAGAIN while FreeBSD can return ENOBUFS.
MFC after: 1 month
|
|
|
|
|
|
|
|
| |
Adding a write syscall wrapper is needed due to Linux family of write
syscalls doesn't distinguish between in kernel blocking operations
and always returns EAGAIN while FreeBSD can return ENOBUFS.
MFC after: 1 month
|
|
|
|
|
| |
Pointed out by: bz
MFC after: 3 days
|
|
|
|
| |
MFC after: 1 month
|
|
|
|
|
|
| |
In this case sendfile fallback is used.
MFC after: 1 month
|
|
|
|
|
|
|
| |
Add dummy implementation of skb_cow_head().
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
|
|
|
|
|
|
|
|
| |
Fix arguments to a trace line and remove another trace line until we
actually will have the skb to trace along with a future implementation.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
|
|
|
|
|
| |
Due to sys/param.h includes sys/types.h and the fact that the sys/param.h
is included everywhere where linux_vdso.h is needed.
|
| |
|
| |
|