| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Reported by: Adam Crosser, Praetorian
Reviewed by: philip
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55812
(cherry picked from commit 9a9f93bcf1aa0059d759b2f3ea6faeb2760a11bd)
(cherry picked from commit 9f8db9cc67fb86eeb2b645ce7f8aa748e99241a9)
(cherry picked from commit a347e6e20e75ad6224afefcf650ef738c3de094d)
|
| |
|
|
|
|
|
|
|
|
|
| |
Reported by: Adam Crosser, Praetorian
Reviewed by: philip
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55811
(cherry picked from commit 097cb4e9f0432c543c704cec712ce1cd3302335c)
(cherry picked from commit 4551ea3b3f04650cd5300a9eae8994bdb080db91)
(cherry picked from commit 6a808cd7534802d30010fb0a7f46381ff9f6ef3f)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that
they remain under the directory referenced by the dirfd. This commit
introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored
in the file descriptor entry. When the flag is set, any lookup relative
to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore,
the flag is sticky, meaning that it cannot be cleared, and it is copied
by dup() and openat().
File descriptors with FD_RESOLVE_BENEATH set may not be passed to
fchdir(2) or fchroot(2). Various fd lookup routines are modified to
return fd flags to the caller.
This flag will be used to address a case where jails with different root
directories and the ability to pass SCM_RIGHTS messages across the jail
boundary can transfer directory fds in such as way as to allow a
filesystem escape.
PR: 262180
Reviewed by: kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D50371
(cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We copyout &l_oval but do the conversions into &l_val, leaving us with
stack garbage. A build with an LLVM21 cross-toolchain seems to catch
this.
Reported by: Florian Limberger <flo purplekraken com>
Reviewed by: markj
Fixes: a1fd2911ddb06 ("linux(4): Implement timer_settime64 syscall.")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D52985
(cherry picked from commit 541a98d7e28a8e4697ac2fa78dd4c4203c2c3a9c)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add __deprecated decorator. This is for a deprecated interface. copystr
is tagged with this today in copy(9), but don't actually provide it or
use it. copystr is a #define so adding it will have to wait.
LinuxKPI was defining this away completely in compiler.h. Since this is
shared between Linux KPI consumers and OpenZFS, if it's already defined,
use the FreeBSD sys/cdefs.h version, otherwise define it away. For
OpenZFS this will retain it, while for Linux KPI it will tend to drop it
(I think always, but I didn't look at everything).
Sponsored by: Netflix
Reviewed by: jhb, emaste
Differential Revision: https://reviews.freebsd.org/D46137
(cherry picked from commit 16672453f12586703f1c51d909bd1900691bf884)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 886653492945f we added checks for packets to only go out if the
station is known to the firmware (amongst others) as there are
implications in drivers.
Unfortunately rtw88 does not support the mac80211 (*sta_state)() KPI
but only the fallback (*sta_add/remove)() in which case the station is
only added to firmware when going from AUTH to ASSOC. That means we
had no chance to get authenticated anymore.
PR: 283142, 274382
Fixes: 886653492945f (make sure we can send DISASSOC or DEAUTH frames)
Tested by: imb protected-networks.net, oleg.nauman gmail.com
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48161
(cherry picked from commit 2372f8cc640c2f4ab82831e6ac0e27ab6c18321a)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Bump the vnode use count, not its hold count. This fixes a panic triggered
by fstatat(..., AT_EMPTY_PATH) on DRM device nodes, which happens to be
what glxinfo(1) from Ubuntu Jammy is doing.
PR: kern/274538
Reviewed By: kib (earlier version), olce
Differential Revision: https://reviews.freebsd.org/D47391
(cherry picked from commit fc595a6b76642dfdfdb8e6f9b9bbc734e95fb59c)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Both functions linprocfs_domtab() and linprocfs_doprocmountinfo() are
logically identical, but the former fails with ECANCELED because error
is not reset after the for loop.
Reviewed by: jrm, fluffy
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D47865
(cherry picked from commit 58c7db14cd71c41f59d80d26d921782c0c27d523)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
systrace.c fails to build if we're using a common compiler.h for both
openzfs and linuxkpi. The issue is easy enough to fix: don't redefined
lower_32_bits if it's already defined in linux.h, since it's the least
'standardized'. This will allow systrace.c to build using an equivalent
macro.
MFC After: 3 days
Sponsored by: Netflix
(cherry picked from commit 481d5a4891648f0a6979a48689cc16fca80d4ab6)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
THIS_MODULE is used to differentiate modules on Linux. We currently
completely stub out any Linux struct module usage, but THIS_MODULE
is still used to populate the "owner" fields of various drivers.
Even though we don't actually dereference these "owner" fields they
are still used by drivers to check if devices/dmabufs/etc come
from different modules. For example, during DRM GEM import some
drivers check if the dmabuf's owner matches the dev's owner. If
they match because they are both NULL drivers may incorrectly think
two resources come from the same module.
This adds a general purpose __this_linker_file which will point to
the linker file of the module that uses it. We can then use that
pointer to have a valid value for THIS_MODULE.
Reviewed by: bz, jhb
Differential Revision: https://reviews.freebsd.org/D44306
(cherry picked from commit 28a59100b54ff245a45fbd328266266f1c14eb8c)
|
| |
|
|
|
|
|
| |
MFC after: 1 week
(cherry picked from commit b4856b8e9d872ca6ee0c4ef43e7047693ef7645b)
(cherry picked from commit 5942658cf3573bc3df9c378b688beb7549754773)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow a user to change the "ether" address by ifconfig while a VAP is
not UP. Compared to net80211 (given we have no callback) we register
an eventhandler per-vif (a global one would force us to use hacks to
derive if a vap is indeed also a lkpi_80211 vif).
Sponsored by: The FreeBSD Foundation
PR: 277356
Tested by: lwhsu
Differential Revision: https://reviews.freebsd.org/D46121
(cherry picked from commit 4aff4048f5b1b6ab0b905726853ba6083e37cc37)
|
| |
|
|
|
|
|
|
|
|
|
| |
As a consequence lkpi_ieee80211_ifalloc() now does not fail. Remove
unneeded NULL check.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45852
(cherry picked from commit 7bcb1228558b4325fab39616e2e3b2573a9e7da6)
(cherry picked from commit 7bea79c1ab400fc223d730a89af97dcf4ba09911)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
They are functionally equivalent, but the updated form mirrors the tests
in sys/net/ethernet.h and avoids confusion.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21037
(cherry picked from commit a1295b24842d209e6bf93a4823193d56ad2db064)
(cherry picked from commit 6fb0634bc4ce5fe32312a53031e56fe866b0b24d)
|
| |
|
|
|
|
| |
This reverts commit 85da0abada244f90dc6e9ce36c75492f0aa9bf02.
It is based on other not MFC-ed commit.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This allows replace linux_pci_(un)register_drm_driver calls with driver
renaming to FreeBSD name.
Sponsored by: Serenity CyberSecurity, LLC
MFC after: 1 week
Reviewed by: manu, bz
Differential Revision: https://reviews.freebsd.org/D45906
(cherry picked from commit 5d20075f8b9f7107aa0a246e5165d9816e816a44)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 886653492945f7e945eb9bdaf5bc2ae26df96236)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 105b9df26ee0286f3a5a7d191075e068dee1c4a2)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 d1af434d99941d32a09c48fb3ef77ef83e203d29)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 1665ef979d3adab05d178480077674ab5978e4f0)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 ac867c20e67423e5019ab90148c387ea127eeffb)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 759a996d610d9354aac5c48a6bdc9cedcba2f48b)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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:
b65f813c1ab99448278961c5ca80dc422b1eae29
Revert "Widen EPOCH(9) usage in PCI WLAN drivers.",
21c4082de9e2cf9a0fd81a9a981ab06022956847
Revert "Widen EPOCH(9) usage in USB WLAN drivers.",
17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4
Revert "Enter the network epoch in USB WiFi drivers when processing input",
af2441fbc7fa9e522e7f8697e5a181bdd4ff9e00
Revert "[ath] Attempt to fix epoch handling.",
and 6c3e93cb5a4aa4b8a2d8d4d326f2a7c34d3a4458 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 de607e3c230be88f6232b9c9fd6c37199648dc8c)
(cherry picked from commit 1c6dd33d26eb02c6145383a49150965eeca61120)
(cherry picked from commit 39b702797994fbd62a21dd3af6d4cd7045fded23)
(cherry picked from commit 75f298492a12d53df97c26963ec9f2dc0b052878)
(cherry picked from commit eb3821e6d92fa45ece7ec08efde45e35be1bdc95)
(cherry picked from commit 82506f26c03aa312b91e01a797f31e061749a76d)
|
| |
|
|
|
|
|
|
|
|
|
| |
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 3e0915b7b685 are less
likely to happen.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 63a327b954a38ecd46934a2911321f3ea3d500b3)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
IEEE80211_HT_CAP_RX_STBC was set to 0x100 instead of 0x300.
Correct to get the expected behavior.
Sponsored by: The FreeBSD Foundation
Fixes: b0f73768220e9 LinuxKPI: 802.11 header updates
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D45506
(cherry picked from commit 3e0915b7b6857afdbd283f2d448906e6a032ee07)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 582469016aed4fac3a7ead24dc31000edbb7e823)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Likely a c&p error from for_each_vif_active_link() to
for_each_sta_active_link().
We are checking the nitems on the vif instead of the sta in this macro.
Function wise there is no difference as the arrays are the same size
but for correctness fix this.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites
to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP we
accidentally returned the bit number instead of the shifted value
which leads to ieee80211_crypto_newkey() setting IEEE80211_KEY_SWCRYPT,
which in turned lead to us trying to decode the frame again despite
HW had already done it. This was found out of a discussion in D43634.
Reviewed by: cc, adrian
Differential Revision: https://reviews.freebsd.org/D44208
(cherry picked from commit 906521f8176b13533556d742db4ab28e847b85c0)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code
out in order to set the suspend/resume functions when the struct is
already given. Such is the case in iwlwifi d3.
Also add an initial implementation of device_can_wakeup(). Though
this is likely all we need we have no way of setting the flag for it
yet so leave a pr_debug() and a comment there as well. Until we want
to support WoWLAN this is likely not needed for wireless.
Doing it the proper way checking a bool in 'struct dev_pm_info' would
change 'struct device' and with that 'struct pci_dev' and break the
KBI. In favour of mergeability this version does not implement the
full functionality yet.
Both help to make an updated iwlwifi d3 compile.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45358
(cherry picked from commit 3753988c5d22393fbdefb6aa16b5a5a699d05642)
|
| |
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste (earlier version, found another two)
Differential Revision: https://reviews.freebsd.org/D45386
(cherry picked from commit ecd1d1f1dac49c7ecbf1e7c5ffc64356c2851efd)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add FIELD_PREP_CONST() like FIELD_PREP() without any extra checks likely
expected on this version in Linux. This is called by an updated wireless
driver.
Sposnored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D45180
(cherry picked from commit bb025df257386c5d1087b652e8ed951bceb89862)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add kvmemdup() as a variant of kmemdup(). While currently it could
just call kmemdup() we duplicate the code and use kvmalloc() in case
someone will change the implementation of kvmalloc/kvfree in slab.h.
This is used by an updated wireless driver.
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D45181
(cherry picked from commit 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf)
|
| |
|
|
|
|
| |
Reported by: markj (2023-05-24; sorry took me a while)
(cherry picked from commit 563c72e2137cb8cb9eb0eabf78319e8fe9c8aedd)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add checks for __counted_by(_x) and __nonstring as and depending
on compiler support enable the attribute/feature.
This is needed to make mtk76 and ath1xk drivers compile.
Sposnored by: The FreeBSD Foundation
Reviewed by: emaste, dim
Differential Revision: https://reviews.freebsd.org/D44587
(cherry picked from commit 2a8c50592f7fce8bceedf004f674a5a9eae0fd46)
|
| |
|
|
|
|
|
|
|
|
| |
mt76 calls devm_kfree() directly, so alias it to our
lkpi_devm_kmalloc_release() function.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44589
(cherry picked from commit 170c2e0e2bb1b2d9a7661ba729f8264381c9d9d7)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A newer version of iwlwifi requires a return value from napi_schedule();
unclear if the function always should have been bool. Add the bool to test
based on the napi_schedule_prep() result.
Also add napi_is_scheduled() for rtw89.
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste (previous version)
Differential Revision: https://reviews.freebsd.org/D44591
(cherry picked from commit 21761f2ede4ebad13e78112b9409c1f20f946781)
|
| |
|
|
|
|
|
|
|
|
|
| |
Implement skb_queue_splice_tail_init() and SKB_DATA_ALIGN() as
needed by the mt76 wireless driver.
Sponsord by: The FreeBD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44590
(cherry picked from commit 3d3ec17825a124f0119d76c4d2523d73012fa226)
|
| |
|
|
|
|
|
|
|
|
|
| |
Add dev_alloc_pages() though it seems a weird KPI, not passing a dev
despite its name. Used by updated wireless driver.
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44588
(cherry picked from commit 738c02ba24c66391870067602f1c9c030d5c5e5d)
|
| |
|
|
|
|
|
|
|
|
| |
Just like BITS_TO_LONG() ... used in rtw89.
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44603
(cherry picked from commit f674f016c03d49e14f1c651ed088a6f2d01a62ee)
|
| |
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44586
(cherry picked from commit 218b2ccf8cc90698487515c681f3e3453b0dcead)
|
| |
|
|
|
|
|
|
|
|
| |
Updated wireless drivers require more knowledge about PCI (BAR) bits.
Sponsored by: The FreeBSD Foundation
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D44573
(cherry picked from commit a1cdddcf1596d258ce0b01b156dfd9921bd60e08)
|
| |
|
|
|
|
|
|
| |
Add PCI_VENDOR_ID_ITTIM as needed by mt76.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit ce707e674f7941c0743e72193c433fcf554a82b5)
|
| |
|
|
|
|
|
|
|
|
| |
The content that `value` point to is not going to be altered by function
handle_string().
MFC after: 1 week
(cherry picked from commit 68c890b4433d3655c7df91cc43f89f4d6a8b35e4)
(cherry picked from commit 1b3f88bc809526cc7cd22c88b4fdaadf1a2e5e75)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The variable fileid stores the result from kern_kldload() but never gets
used. Since the third parameter `*fileid` of kern_kldload() can be NULL,
this unused variable can be safely removed.
No functional change intended.
Reviewed by: emaste, bz, #linuxkpi
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44583
(cherry picked from commit 317cc829ee227cfdffe7b25125c070112ce0c2f1)
(cherry picked from commit d4d5aed66a3f4323cf23f1a849b98d8570b403bf)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct skb_queue_tail to queue the buffer at the tail of the skbuff.
The skbuff is a circular doubly-linked list, and we call with a pointer
to the head of the list. Thus queueing before the head gives us a
queueing at the tail.
As a motivating factor, the current behaviour (queueing at the head) was
causing frequent kernel panics from my RTL8822BE wireless card, which
uses the rtw88 driver. Interrupts can cause buffers to be added to the
rtwdev c2h_queue while the queue is being drained in rtw_c2h_work.
Queueing at the head would leave the nascent entry in the linked list
pointing to the old, now freed, memory for the buffer being processed.
When rtw_c2h_work is next called, we try reading this and so panic.
Reviewed by: emaste, bz
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44192
(cherry picked from commit d3befb534b9c8cd80f1b8d75ce6451e3f62b8ba9)
(cherry picked from commit 95a7c6f18a6a28cf866384ff60b587ec30be1cd1)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is used by netlink(9) only. The netlink(9) taskqueue thread
runs in the vnet of the socket whose request the thread is processing
right now. This is a correct vnet and resetting it to vnet0 is incorrect.
If the function is to be used by any other caller in addition to
netlink(9), it would be caller's responsiblity to provide correct vnet(9).
Reviewed by: melifaro, dchagin
Differential Revision: https://reviews.freebsd.org/D44191
PR: 277286
(cherry picked from commit 2f5a315b307447f91891c96fb23c7333fa406f2f)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename the LSTA lock to LSTA_TXQ lock as that is really what it is and
put down the full set of macros. Replace the init and destroy with the
macro invocation rather than direct code.
Put locking around the txq_ready unset and check. Move the taskq_enqueue
call under lock to be sure we do not call it anymore after txq_ready
got unset.
Leave a comment related to the node reference which is passed into the
TX path on the recvif mbuf pointer.
Fixes: 0936c648ad0ee
PR: 274382 (possibly)
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D43909
(cherry picked from commit fa4e4257943650c0b5f58c01bb0bdfadea61dfb2)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the ni/lsta reference cycle, add extra checks and assertions.
This is to accomodate problems we were seeing based on net80211
behaviour (join1() and (*iv_update_bss)() as well as state changes for
new iv_bss nodes during an active session).
This should hopefully help to stabilise behaviour until the underlying
problems gets properly addressed (for this and all other device drivers).
PR: 272607, 273985, 274003
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43753
(cherry picked from commit 0936c648ad0ee5152dc19f261e77fe9c1833fe05)
|