| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For consistency rename the "scheduled_txqs" tailq to
"txq_scheduled" and add a lock per txq ("txq_scheduled_lock[]").
We use the "_bh" locking as this called from the device driver.
This fixes panics due to concurrent access to the tailq, especially
in between "first" and "remove" on the out-direction and between
"insert" and "elem_init" on the in-direction.
This was easily reproducible just running iperf3 at basic rates for
a few seconds to minutes with multiple chipsets, not only rtw89.
Sponsored by: The FreeBSD Foundation
PR: 290636
Reported by: arved, and others before
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This removes an extraneous pctrie_iter_reset before returning.
This is not needed as it simply clears a local variable that
will get cleaned up anyway as we immediately return from the
function.
MFC after: 1 week
Sponsored by: NVIDIA
Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D54153
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53404
|
| |
|
|
|
|
|
|
| |
This is a preparation step for a future addition to this file. This is
also closer to what Linux does.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
| |
Add the conditional compile time option defaulting to off as we do
not support leds in LinuxKPI to ath10k for the new file.
Add empty struct gpio_led to LinuxKPI.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
| |
There are no consumers right now except the upcoming <linux/eventfd.h>.
This is meant to reproduce the same includes as Linux, in case consumers
of <linux/eventfd.h> implicitly rely on namespace pollution.
Reviewed by: bz, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50851
|
| |
|
|
|
|
|
|
|
| |
If CONFIG_NET_MEDIATEK_SOC_WED is not set then be silent; if
CONFIG_NET_MEDIATEK_SOC_WED is set we will enable logic or rather te
pr_debug("TODO") calls for now.
Spsonsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
| |
Move the enum and leave a comment on the struct member for the vif
about the type.
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Some of these are used by mt76 and while I was here and it only was
a handfull I figured I should just clean this all up.
There is one problem in that between 802.11az and 802.11-2024 action
frame formats have changed; I got compile errors from iwlwifi(4) given
I updated them to -2024 so we remain on older versions for the moment.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
The logic in device_release_driver() got disabled in 93b14194acaf2
and since left alone. Add a pr_debug() call so we have a chance to
notice if that code is actually still in need to be fixed and re-enabled.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
We are ways away from implementing "airtime fairness" in LinuxKPI
(or rather net80211). For now make it an 'improve' rather than a
'todo' to get the logging away. Everything will work without it.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
| |
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we sync the sta data, mask the rx_mcs with what the hardware is
able to do so that we do not leave, e.g., a 2nd stream enabled on a 1x1
chipset.
iwlwifi(4) has a further check for the smps_mode to limit to NSS=1 but
I believe that is historic and not actually in use anymore.
This fixes firmware crashes on TLC updates with nss=1 but the nss=2 array
index also being populated (with HT/VHT80/160 mcs information):
data being populated:
iwlwifi0: 0x20101A0D | ADVANCED_SYSASSERT
iwlwifi0: 0x00000006 | umac data1
iwlwifi0: 0x00000001 | umac data2
iwlwifi0: 0x000003FF | umac data3
iwlwifi0: 0x____050F | last host cmd
Reported by: Claudio Zumbo (claudiozumbo gmail.com), Erik Power
Tested by: Claudio Zumbo, Erik Power (eppower umich.edu)
PR: 290622
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Creating non-passthru SR-IOV interfaces on a mlx5en(4) failed.
The problem lies in the pci_resource_len() call but not that the BAR length
is tmeporary 0 but in that we call lkpi_pci_get_bar() with a true argument
which will create the BAR resource for us and report the approriate length
back. However, the later call to bus_alloc_resource_any() will then fail
given the resource already exists.
Restore the previous behaviour and let bus_alloc_resource_any() do the
work. Adjust the return values from -ENODEV to -EBUSY to match callers
expectations.
In linuxkpi_pcim_request_all_regions(), like in linuxkpi_pci_request_regions(),
filter out the -EBUSY errors as "not an error" and try the next bar.
This also seems to be consistent with the expectations of the callers.
PR: 290793
Reported by: David BOYER (jcduss13 gmail.com)
Tested on: mlx5en, iwlwifi, mt7921
Reviewed by: kib
Fixes: 7e21158d44cd "implement [linuxkpi_]pcim_request_all_regions()"
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53902
|
| |
|
|
|
|
|
|
|
| |
iwlwifi/mld uses the back pointer in iwl_mld_link_sta_from_mac80211().
Initialize it to make BE200 cards work again.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR; 290808
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Implement the lockdep_assert_wiphy call for
ieee80211_iterate_active_interfaces_mtx() to avoid a warning when
used and to make sure callers comply with assumptions.
Leave an "IMPROVE" note as we can likely switch another of the multiple
callers to RCU.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
Switch to link_sta_dereference_check rather than _protected to access
the value. The actual problem we hit was elsewhere though.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
cfg80211_chandef_create() gets passed a pointer to a cfg80211_chan_def.
It seems that several users are passing in an uninitialized variable
from the stack and expect cfg80211_chandef_create() to initialize it.
Run memset() on the struct, which for all callers currently seems to do
the right thing, to avoid later accesses to uninitialized struct members
like "punctured".
Reported by: CI (gcc build)
MFC after: 3 days
Sponsonred by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When starting to scan and ending a scan we clear/set the hardware to
idle. Similarly we set the hw to idle when we remove the channel
context but when starting we only set it to non-idle when we went from
assoc to run. This apparently was not a problem most of the time
as the switch from a failed hardware scan to a software scan was
racing against net80211. ad4ddc83ebf8 fixed that specifically for
rtw88 and while we were more consistently scanning, this broke
authentication as the setting of idle at the end of the scan was
now happening reliably. Move the unsetting of idle from assoc_to_run
to scan_to_auth for when we create the chanctx to keep it
symmetrical. This makes authentication work again for rtw88.
This likely also fixes the problems in the listed PRs.
iwlwifi(4) mvm and mld driver parts do not use this information at
all and were never affected.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reported by: Oleg Nauman (oleg.nauman gmail.com)
PR: 290850, 288186, 281979
PR: 272145 (the non skb-mem-limit parts)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lkpi_vmf_insert_pfn_prot_locked
Currently lkpi_vmf_insert_pfn_prot_locked will check the page iter to
find a usage of the page. If no page was found, it continues on to
try using PHYS_TO_VM_PAGE() to get a page. Currently it does not check
if a valid page was found before passing it to vm_page_busy_acquire,
which can cause a kernel page fault as vm_page_busy_acquire expects
a valid page pointer.
This can easily be triggered while starting KDE6 in wayland mode, which
many users have been reporting. With this change plasma6 starts properly
in wayland mode.
Sponsored by: NVIDIA
PR: 288565
Reviewed by: markj, kbowling (mentor)
Differential Revision: https://reviews.freebsd.org/D53412
|
| |
|
|
|
|
|
|
|
|
| |
This adds empty implementations of pm_vt_switch_(un)register which
are used by nvidia-drm. We do not need to specify anything here as
a VT switch always happens on suspend/resume.
Sponsored by: NVIDIA
Reviewed by: kbowling (mentor), emaste
Differential Revision: https://reviews.freebsd.org/D53400
|
| |
|
|
|
|
|
| |
This includes the conflicting changes from previous driver versions
(v6.11/v6.14), mostly being function pointer or function arguments.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
Don't use __LP64__ to decide the value, as it gives the wrong result on
CHERI platforms. Just define it in terms of __SIZEOF_LONG__. Make a
similar adjustment for BITS_PER_LONG_LONG while here.
Reviewed by: bz, dumbbell, emaste
MFC after: 1 week
Sponsored by: CHERI Research Centre (EPSRC grant UKRI3001)
Differential Revision: https://reviews.freebsd.org/D53135
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This includes some type cleanups as well as some shuffling of structs
and functions to sort dependencies out. Few new functions and defines
as well as new struct members. Minor fixes to style and debug logging.
This is the majority of changes. None of these should conflict with
current in-tree drivers. The final bit of changes will come along with
the driver updates adding an extra argument to function pointers.
MFC after: 3 days
|
| |
|
|
|
|
|
| |
For the moment add skeleton functions for netif_device_attach/detach()
needed by rtw8[89] v6.17.
MFC after; 3 days
|
| |
|
|
|
|
|
| |
This likely belongs in socket code which we do not have in LinuxKPI.
Needed by a wirless driver at v6.17.
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
We do not support Wireless Ethernet Dispatch (wed) on the mt76 (yet).
Add pr_debug calls with TODO in case we run into the calls anyway so
we could deal with them.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
page_pool headers were not used yet; they were created for mt76 but
are without functionality. Upstream has migrated them for v6.17 and
split them up into multiple files. Also add netmem.h which the little
needed is directly related to page pools.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Given we do not yet support "wake" bits in device there is little need
doing it in PCI if we cannot check if we are supposed to do the
operation in first place. Once we would implement this, we would need
to also do the appropriate PCI (pme) checks before enabling (disabling)
it.
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D53208
|
| |
|
|
|
|
|
|
|
| |
We do not currently aim to support crypto FIPS compliance in LinuxKPI
so keep this turned off.
MFC after: 3 days
Reviewed by: emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D53207
|
| |
|
|
|
|
|
|
|
| |
Needed by multiple wireless driver for the v6.17 update (likely earlier
versions already).
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D53206
|
| |
|
|
|
|
|
|
|
|
| |
The return type now is void; I believe no one ever used this
so we can just chnage it. The only active platform_driver_register()
calls seems to be in ath1[01]k and mt76 and there in unsupported code.
MFC after: 3 days
Reviewed by: dumbbell, emaste
Differential Revision: https://reviews.freebsd.org/D53205
|
| |
|
|
|
|
|
|
| |
We will see how much we will need them and how to fill them at that
point. They are left with a pr_debug("TODO") for now.
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D53204
|
| |
|
|
|
|
|
|
| |
The former is needed by a wireless driver at v6.17.
MFC after: 3 days
Reviewed by: dumbbell, emaste
Differential Revision: https://reviews.freebsd.org/D53203
|
| |
|
|
|
|
|
|
| |
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D52045
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When going to s2idle, set Linux' pm_suspend_target_state to
PM_SUSPEND_TO_IDLE instead of setting PM_SUSPEND_MEM (for S3) in all
cases.
This is necessary because more recent versions of the amdgpu DRM drivers
have different paths for when entering s2idle & S0ix is supported than
S3.
Reviewed by: bz
Approved by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51591
|
| |
|
|
|
|
|
|
|
|
| |
Add enum sleep_type stype parameter in power_suspend/resume event
handlers, as with the introduction of s2idle there are more than one
type of suspend.
Reviewed by: bz
Approved by: bz
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like lkpi_pci_get_domain_bus_and_slot() implement lkpi_pci_get_slot()
using pci_find_bsf() instead of pci_find_dbsf() (no domain).
This is needed for a wireless driver.
Unfortunately the name [pci_get_slot()] collides with the native PCI
function. Add a guard around it and disable the use when the native
version is required (in lkpifill_pci_dev() and in bnxt/bnxt_en; if the
latter gets fixed we can probably also fix work around it in the former;
further conflicts in drm-kmod 6.1-lts, 6.6-lts, and master were resolved).
Sponsored by: The FreeBSD Foundation (initially)
MFC aftre: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52065
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
This reverts commit 3860afe99ec39b9942967941181f28f27f3fc548.
Sponsored by: The FreeBSD Foundation (initially)
PR: 283027
PR: 289647
Suggested by: jhb [1]
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52069
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Chace Linux change fca76071bab2 ("lib/string_helpers: Split out
string_choices.h") from v6.5. Everything that we implemented from
string_helpers.h has moved, so rename the file, update the include
guards, and add a new dummy string_helpers.h that just #includes it.
This matches Linux for the functionality that we have.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52606
|
| |
|
|
|
|
|
|
|
|
|
| |
When freeing the last reference of the net80211 node the net80211
node_free() code may directly call into the crypto code to delete
the keys. While we still holding the wiphy lock this would lead to
a recursion on the non-recursive wiphy lock. Defer freeing the
reference until we are back under the net80211 com lock.
Reported by: Mark Phillips (mark freebsdfoundation.org) on 15.0-ALPHA1
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
attach"
It turns out this breaks the nvidia-drm drviers.
We'll try to rework things and put it back later.
This reverts commit bbeeb585315645db20118ef349a4e3dc83b148cc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Needed by a wifi driver update.
Sponsored by: The FreeBSD Foundation (initially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52080
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|