smartpqi: Avoid declaring extern inline functions
Each C file is compiled separately so these functions can't be inlined
except in the file where they are defined. Since these functions aren't
used outside smartpqi_request.c, just do the simple thing and make them
private to that file.
Reported by: gcc
Reviewed by: jrhall
Fixes: c558eca47970 ("smartpqi: update to version 4660.0.2002")
Differential Revision: https://reviews.freebsd.org/D54732
UPDATING: Bump __FreeBSD_version to 1403508 for various LinuxKPI changes
Precautiously bump __FreeBSD_version for various LinuxKPI changes
so they could be detected if needed (which they should not need to,
hopefully).
www/freenginx-devel: third-party module management
Update the stream-lua module to its recent release 0.0.17R4,
and enable it.
Remove ignore list.
Bump PORTREVISION.
Sponsored by: tipi.work
LinuxKPI: 802.11: add compat.linuxkpi.80211.IF.dump_stas_queues
Extend the normal compat.linuxkpi.80211.IF.dump_stas sysctl by
queue information. This was helpful for debugging various issues,
like selecting the outbound queue, stopping queues for BAR and helped
finding multiple bugs.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 32ea8209825af594cbfa1fc654d45eb9a6aab528)
(cherry picked from commit 6b9c0ac008a9c52b21b05c96ead6def41aa89ead)
LinuxKPI: 802.11: reset hdr after crypto in lkpi_80211_txq_tx_one()
When lkpi_80211_txq_tx_one() calls into the crypto offloading parts to
possibly make space in the headroom, the beginning of our frame moves.
We have to reset hdr after that call as otherwise later classifications
based on the hdr->frame_control will fail or cause wrong classificaiton
of packets.
This makes sure frames will either be directly sent using (*mo_tx)()
or use the correct tid for the correct queue. This helps to get
rtwx8 packets flowing after BA was negotiated.
Sponsored by: The FreeBSD Foundation
Fixes: 11db70b6057e4
(cherry picked from commit f0395993e1ea83705e0da6623843e7d5d03f7269)
(cherry picked from commit 4d255abe992fef69c97ce10991d815eda638c76d)
mt76: set appropriate CONFIG options for the module build
Always set CONFIG_ARCH_DMA_ADDR_T_64BIT as it is true for all
architectures we support. Add an option for CONFIG_NET_MEDIATEK_SOC_WED,
which we currently do not yet support.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 87aa494dfca73204516799033821ab1db184933f)
(cherry picked from commit e2ebe56c50e77f3302c85a8203f8fa4050ae0f54)
LinuxKPI: 802.11: lock down the "txq_scheduled" tailq
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
(cherry picked from commit 567a097c8ab60d9fcd68a87c3c5ad605fe8715cc)
(cherry picked from commit 2e1156f75836a0e5a4026e13d72b54f272e705cb)
LinuxKPI: 802.11: move ieee80211_offload_flags
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
(cherry picked from commit b10ff7ed37a9b891bec7e1093e44fa7abb2054b4)
(cherry picked from commit a714641fa5380cc320d23181d4b18f7f89ccd183)
LinuxKPI: device: add a pr_debug("TODO") call to device_release_driver()
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
(cherry picked from commit fc9666d0fc0c2541e44bfbcaa5bb1b670395687c)
(cherry picked from commit 0f496780deee49cfd86f4e02db775b706405fef9)
LinuxKPI: 802.11: make airtime fairness an IMPROVE
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
(cherry picked from commit 86bfe5b4d5a7b90d3746059dd1f87cdd5a0bf90c)
(cherry picked from commit c55874da4cf57800fc8a665ee221e4c2e1ac6601)
LinuxKPI: mt76: depend on CONFIG_NET_MEDIATEK_SOC_WED
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
(cherry picked from commit 51c73fc5f5dd95c6a0e3d232091a732a14c7ecc9)
(cherry picked from commit 7ed3a99f3563fce1f1088a376151e7ad68b738d6)
LinuxKPI: 802.11: additions for Linux v6.17 based wireless drivers
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.
(cherry picked from commit 0567484734ad9732978e189ebed042f6320e2471)
(cherry picked from commit f2b2d6c18a57abbedb14bf439ed5c69d648c47b6)
LinuxKPI: 802.11: initialize the passed in chandef in cfg80211_chandef_create
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)
Sponsonred by: The FreeBSD Foundation
(cherry picked from commit 640205bc22c8b2bd31c766f4d0c409c183a8b8dc)
(cherry picked from commit d389d1ac1699aea517a18cf73486e7077cfbda46)
LinuxKPI: soc/mediatek add pr_debug calls
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.
(cherry picked from commit 224ac9d2a030f85924e44a507ddc412797c3fe87)
(cherry picked from commit b9b571e6146a1b95ba18de065166a1a50eb88dfc)
LinuxKPI: page_pool headers moved; add netmem.h
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.
(cherry picked from commit 7c31cdfa408a4ebce7a3e10d29056a15c28bc092)
(cherry picked from commit d388ff8016adf0f24b9b846941f1f15f5463c49e)
LinuxKPI: add skeleton pci_enable_wake()
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.
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D53208
(cherry picked from commit 885e8f272f7515b0325974de72d18b73318eff07)
(cherry picked from commit be52a81be07997f84f454637372a056415f6a2eb)
LinuxKPI: platform_device return type change
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.
Reviewed by: dumbbell, emaste
Differential Revision: https://reviews.freebsd.org/D53205
(cherry picked from commit 0ae4998423e0d513fb88e404dfb1c2a285d11309)
(cherry picked from commit 5434a1635ed3fab8214f3fea8ada9772e4372372)
LinuxKPI: 802.11: avoid recursive wiphy lock
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
(cherry picked from commit 3c38dce87ecd2c87744e4b7ff1904ee841f88a47)
(cherry picked from commit b0469fa7f10f9fe5510a5445f38d1bf0b832c1e7)
pci: add quirk to disable Function-Level Reset (FLR)
MediaTek mt76 WiFi cards are advertising FLR support but after issuing
a FLR the chipset is gone. Add a quirk so we can disable FLR. The
current reset code will automatically fall back to a power reset.
This makes the card show up under bhyve where before it would just not
be discovered at all. That should make wifibox work for it and will help
development for a LinuxKPI based mt76 driver as found in framework laptops
as no dedicated machine and constant reboots are needed anymore.
We will likely need to add more PCI vendor/device IDs once we can test
the other device IDs.
After a lot of help from: jhb
Really implemented by: jhb (I just typed and tested)
GH issue: github.com/pgj/freebsd-wifibox/issues/73
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D52728
[2 lines not shown]