| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
Update threshold values once we are associated.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
When looking up the channel we may not get a result if no flags are
passed in as net80211 channel list setup and lookup coding requires a
matching flag (band). So pass in IEEE80211_CHAN_[AG] depending on band
to increase the chances of finding a base channel and from that derive
rates, etc.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
| |
When beginning key updates do stop and afterwards re-enable the tx queues
to avoid packets being passed to the driver. This is a theoretical
problem at this point but helps some cases. These functions will likely
need refinement in the future.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce an internal lkpi_ieee80211_wake_queues_locked() function
that can be used from context holding the wiphy lock.
Make linuxkpi_ieee80211_wake_queues() a wrapper with locking around
this.
Equally apply the wiphy lock to linuxkpi_ieee80211_wake_queue().
In lkpi_ieee80211_wake_queues() only wakeup the driver if the queue
is not empty; otherwise weird sideeffects can happen with some drivers.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
Since b8dfc3ecf7031 we hold the wiphy lock over any key updates.
Assert that on function entry.
Given this invariant there is no need to recheck a kay under lock now,
as the first lookup already is under the lock, so simplify the code.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
Given there are still problems observed (at least in the Lab) adjust
crypto key handling routines and enhance logging with td_tid, jiffies.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
| |
While we decided that we will not provide WEP support for the LinuxKPI
802.11 compat code, some of it is in there already (also because drivers
still support it). Put proper keylen checks in place as net80211 only
knows about WEP while LinuxKPI has WEP40 and WEP104.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For iwlwifi, rtw88, and rtw89 we can treat GCMP the same way as we
treat CCMP which allows us to re-use the CCMP code for now.
Add the missing case statements and factor out some common code.
Allow IEEE80211_CRYPTO_AES_GCM_128 through our filter of supported
cipher suites to announce it to net80211.
Sponsored by; The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During testing I hit a case where htcap->mcs.rx_mask[0,1] were zero.
This should not happen as that would mean we are not supporting HT.
After adding extra caution for debugging I could no longer reproduce
the case.
So just to deal with the eventuality make synching from HT more
resilient by checking that we have nss > 0 or otherwise disable
HT operations.
Move setting the bandwidth below this check to not alter it in
case of the now early return.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
Update strutures needed for 11ax (HE) to be correct. Add references
to the standard.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The message used to have a prefix of the function and line, followed by
`:_` and the supplied message. Commit 3206587a20de ("LinuxKPI: 802.11:
improve scan handling") changed the prefix to add the CPU, tid, and
ticks. `_` and the caller-supplied message were joined to the ticks
value, resulting in a somewhat odd message. Instead use `: ` to
separate them.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50667
|
| |
|
|
|
|
|
| |
Add ieee80211_purge_tx_queue() dummy function needed by rtw88 SDIO.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
There's one case which needs skb_copy_header(); add a dummy function
for now until we get to the code which uses it to test an implementation.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
Rather than using inline functions use macros so we know where we are
taking the lock in the code rather than only recording the inline
function location.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
We set rx_nss to at least 1 and the sync functions for HT and VHT are
careful not to set it to 0. Rather than relying on that and any
possible future call to lkpi_sta_sync_from_ni() migrate the MAX()
call into the sync function after each standard level went through
to make sure that at the end we at least have rx_nss set to 1.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Start to sort through the netdevice features to match them with
FreeBSD. Annotate them a bit more verbose though the names are
pretty telling already.
While here adjust style(9) as well.
Lastly add the bit definitions for use with printf(9) %b as names
read easier than bitmasks. We will use that in LinuxKPI 802.11.
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
Given the internal field now stores a __wsum csum (after we added
the type) also make sure csum_unfold() returns a __wsum.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: 59481c7db234
|
| |
|
|
|
|
|
|
|
| |
Start using m_get3() instead of m_get2() as we may get up to 11K
frames and m_get2() only gives us up to MJUMPAGESIZE (8K).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Discovered by: adrian with rtwn(4) [see D50049].
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we could select our own channel width and station bandwidth
indepedent of net80211 that is not a good idea and will lead to
trouble. Make sure the station bandwidth we select does not
exceed the bandwidth of the channel we are tuned into.
Now that VHT160 work we may locally disable it (-vht160) and the
AP may still support it but we would be on a 80Mhz channel.
Or we do support VHT160 but the AP does not. Again we would be
on a 80Mhz channel and not support 160Mhz.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dma_map_resource() and dma_unmap_resource() functions are used to map
and unmap of memory-mapped IO resources so they can be accessed by
the device.
Required by drm-kmod v5.5 to be built.
While for drm-kmod 6.6-lts only amdgpu uses these in one place and
the code apparently has not been exercised a lot it has been around
like this for years. With changing the underlying implementations
bring it into the tree; should we find errors with it they can also
be fixed here.
Bump __FreeBSD version to be able to detect this change.
Obtained from: D30933 (by wulf)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D49625
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename linux_dma_unmap() to lkpi_dma_unmap(), and linux_dma_map_phys()
to lkpi_dma_map_phys() so that we get the full set of function
arguments (direction and attributes were missing).
Leave the old functions as wrappers as they are called from drm-kmod
linuxkpi/bsd still, and leaving them also allows us to MFC this
change.
Add missing bus_dmamap_sync() calls. Rather than inlining them
in each inline function push them down to the actual implementation.
From there do not inline them either but call the appropriate
function dealing with the sync so that we do not have the same
code splattered in many places.
Adhere to the DMA_ATTR_SKIP_CPU_SYNC attribute and skip synching
when requested.
A previous, less complete version of this change already allowed
me to load firmware on arm64 for iwlwifi (again).
There are four more places which are not currently done as the
functions which came with an OFED sync a long time ago seem to be
unused these days. Leaving a pr_debug("TODO") call there.
Also dma_[un]map_resource() when brought in from drm-kmod/linuxkpi/bsd
(D30933) should be adjusted to pass the full arguments as the amdgpu
callers are requesting to skip synching.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45294
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Between 802.11ac-2013 and 802.11-2020 some fields were deprecated and the
way VHT160 and VHT80P80 are selected has changed.
In order to get onto VHT160 with modern APs adopt and support both the
deprecated as well as the new logic.
For simplicity of blocks we pull out the non-HT40 handling early on,
followed by the "use HT", followed by the deprectaed options and then
the 80Mhz channel width.
In all cases keep checking (a) what is locally supported, (b) what the
user has locally allowed (FVHT flags, [-]vht160 [-]vht80p80 [-]vht80
[-]vht40), as well as (c) what is announced. Provide possible fallbacks
to lower channel widths in all cases (but VHT20, which means VHT is
disabled).
With this enable VHT160 and VHT80P80 in the LinuxKPI 802.11 driver
compat code as well.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: thj
Differential Revision: https://reviews.freebsd.org/D49773
|
| |
|
|
|
|
|
|
|
|
|
| |
Restructure struct_group() into a wrapper around __struct_group().
Various callers have arguments annotated as /* no foo */ so try to
add all we can find.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D50157
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In lkpi_sta_sync_ht_from_ni() we are casting the information element (IE)
data to this struct as net80211 does not save the mcs/rx_mask.
Not marking the structs packed results in the mcs information not being
copied correctly and rx_nss calculations possibly being off. Even worse,
at a later stage iwlwifi mvm/rs.c would extract the mcs values from the
same field to pass to the firmware which will than crash in an assert
as we would want to do HT with an empty MCS set.
Sponsored by: The FreeBSD Foundation
MFC after: sunrise
Discovered: while testing other features on arm64.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iwlwifi keeps logging 'Invalid TXQ id' even after previous changes to
catch the BSS changed. The reason for this is that we do not error in
the SCAN -> AUTH path as otherwise we would not have the state machine
get us back to SCAN to clear up firmware state before auth/assoc to the
new BSS.
If we are not in synch as net80211 just swapped the iv_bss from under us,
disable the TX queue for the (old) lsta to prevent the AUTH frame sent
from sta_newstate() reaching the driver. After all we are not trying to
authenticate to that node (sta) anymore.
Sponsored by: The FreeBSD Foundation
PR: 274382
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are used by the i915 DRM driver in Linux 6.6 (although this change
was only backported with Linux 6.7 DRM drivers).
`struct folio` simply wraps `struct page` for now.
`struct folio_batch` is the same as `struct pagevec` but it works with
`struct folio` instead of `struct page` directly.
Reviewed by: bz, kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48743
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is basically one code path to free pages on Linux. In particular,
`free_pages()` is used for other pages than those returned by
`alloc_pages()`.
Also on Linux, `release_pages()` takes either `struct page` or `struct
folio`. `struct folio` support will be added in a followup commit.
Regardless, because pages come from several sources,
`linux_free_pages()` need to accept managed and unmanaged pages.
Reviewed by: bz, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49813
|
| |
|
|
|
|
| |
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49812
|
| |
|
|
|
|
|
|
|
| |
This is to prepare a future change to the implementation and make it
easier to review.
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49811
|
| |
|
|
|
|
|
|
|
| |
We want to avoid putting code managing memory in inline functions in the
future.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49810
|
| |
|
|
|
|
|
|
|
|
|
| |
They are used by the i915 DRM driver starting with Linux 6.7.
`(struct wait_queue)->flags` is no longer always zero. I wonder if some
code relied on this...
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48755
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few issues found by code inspection while hunting for bugzilla PR
286512:
- The "expires" field in struct delayed_work should be unsigned.
- In linux_timer_jiffies_until(), clamp the return value to INT_MAX:
this return value is used as a ticks count, not a jiffies count, so we
should avoid returning too large a value, lest it get truncated. It's
unlikely we are dealing with values that large, but we should be
careful anyway.
- In linux_add_to_sleepqueue(), truncate the timeout to INT_MAX, as this
value is passed to sleepq_set_timeout() as a ticks value. Typically
it's multiplied by ticks_sbt to get an sbintime, and we should make
sure the multiplication doesn't overflow. In drm-kmod, there is at
least one call mod_delayed_work(... MAX_SCHEDULE_TIMEOUT).
Fixes: 325aa4dbd10d ("linuxkpi: Introduce a properly typed jiffies")
Reviewed by: olce, bz, dumbbell, kib
Tested by: dumbbell, bz
Differential Revision: https://reviews.freebsd.org/D50192
|
| |
|
|
|
|
|
|
|
| |
ktime_get_boottime_seconds() is needed by an updated iwlwifi driver.
Sposored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D50005
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It may be that once we implement freeing of chained tables
_devcd_free_sgtable() will become our _lkpi_dev_coredumpsg_free()
but further investigations need to happen. For now make an
updated iwlwifi driver happy which should not need more.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D50006
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On any result we need to acquire a reference. pci_dev_get() deals with
a NULL argument so we can simply pass what we "found" at the end.
This will avoid reference count problems.
If the iteration on the linux list in lkpi_pci_get_device() does
not find a match pdev will still be defined at the end of the
loop but not pointing to a valid pdev.
Store the found entry in a 2nd variable which otherwise will be NULL.
This will avoid random panics, usually in sysfs_remove_dir() when
the reference gets released.
Found during mt76 bringup.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: 8f61992d7cc11
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D50153
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lkpifill_pci_dev() uses a sequene of kobject_init/set_name/add.
The problem is that kobject_add could fail.
Move the entire logic to the beginning of the function,
switch to kobject_init_and_add() and check the return code.
Make lkpifill_pci_dev() return the error and deal in the callers
with a possible error accordingly.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D50154
|
| |
|
|
|
|
|
|
|
| |
In places where vm_page_insert() is used after lookups, or for
consecutive pages, use vm_page_iter_insert instead, to exploit
locality.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D50248
|
| |
|
|
|
|
|
|
|
|
|
| |
Check results of non-bool to be != 0.
No functional changes intended.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50158
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Needed by mediatek/mt76 wireless driver.
While here adjust the way is_multicast_ether_addr() is implemented
to not look weird. [1]
Sponsored by: The FreeBSD Foundation
Suggested by: emaste [1]
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50152
|
| |
|
|
|
|
|
| |
Add more structs, fields, flags, defines.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
| |
These are needed for mt76.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
38fec10eb60d687e30c8c6b5420d86e8149f7557 ( tag: v6.14 ).
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
| |
Add a new flag needed by mt76.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
| |
The dev field in wiphy is a pointer already; no need for &.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: ac1d519c01ca8
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we have a long-sized tick counter, we can migrate to using
properly typed timeout parameters in various bits of the LinuxKPI. This
fixes a subtle incompatibility that is otherwise difficult to paper over
and leads to bugs when ticks values are sign-extended.
- Introduce a "jiffies" symbol in subr_ticks.S, declared only in the
LinuxKPI as an unsigned long.
- Remove all references to "ticks" from the LinuxKPI.
- Convert interfaces to match Linux's type signatures where it makes
sense.
Reviewed by: manu
Tested by: bz
Differential Revision: https://reviews.freebsd.org/D48523
|
| |
|
|
|
|
|
|
|
|
| |
Define time64_t to int64_t for all supported architectures
unconditionally.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: imp, markj, emaste
Differential Revision: https://reviews.freebsd.org/D50004
|
| |
|
|
|
|
|
|
|
| |
Long-term asm/unaligned.h is likely to migrate to this file?
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50003
|
| |
|
|
|
|
|
|
|
|
| |
rtw88 sets SW_MGMT_TX on (*mo_et_key) (MFP in software which we do
not yet support). Add it to the list of known reply values to avoid
constant logging.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reported by: Oleg Nauman (oleg.nauman gmail.com)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Move some structs into the appropriate header to be visible.
Add new fields to structs and enums.
Remove arguments from two functions (one function currently unused
by drivers in the tree, for the other the argument was unused).
Adjust the iwlwifi accordingly. This is in preparation for new
driver versions to allow a smooth transition.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
Driver updates introduce a new field "mlo" to the sta.
Add the field to the struct and initialize it in the 802.11 compat
code along with a IMPROVE so once we get to 11be we can deal with it.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|