| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45358
|
|
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
MFC after: 3 days
PR: 274382
Tested by: emaste, lwhsu, thj, rkoberman at gmail.com
Accepted by: adrian
Differential Revision: https://reviews.freebsd.org/D45508
|
|
Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925,
QCA ath1xk, and add Intel iwlwifi IDs.
Rather than using a package per driver add fine(r) grained flavors
even though it is a lot more likely to break in certain cases.
For Intel we need a great level of detail to match PCI IDs so also pass
the full pciconf -l line to into the pci_* files as "$2" to have access
to these.
This lines up with ports commit 80f50c9eb66d.
Sponsored by: The FreeBSD Foundation
Reviewed by: manu (earlier version)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44918
|
|
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
MFC after: 3 days
PR: 275255
Tested with: AX210, 8265 (bz); 9260 (Bakul Shah)
Differential Revision: https://reviews.freebsd.org/D45293
|
|
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
MFC after: 3 day
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43944
|
|
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
MFC after: 3 days
Reviewed by: emaste (previous version)
Differential Revision: https://reviews.freebsd.org/D44591
|
|
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.
MFC after: 3 days
PR: 276083
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43968
|
|
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
|
|
iwlwifi(4) supports a superset of the devices supported by iwm(4). The
latter may be retired in the future (if there is no reason to prefer it
for the set of devices supported by both).
Sponsored by: The FreeBSD Foundation
|
|
In case we cannot identify the firmware monitor buf_location,
print the type (usually 0 = invalid) so we have an idea at least
of what was set (or not).
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
memset_after() is needed by iwlwifi d3.c.
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D43644
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the logic to conditionally enable PM for iwlwifi.
This should help suspend/resume in the future.
For now leave it disabled until other preconditional problems are
sorted.
Sponsored by: The FreeBSD Foundation (2023)
MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43647
|
|
|
|
|
|
|
|
|
|
|
|
| |
struct iwl_mvm_wep_key_cmd ends in a variable sized array but later
is included in another struct followed by the actual
struct iwl_mvm_wep_key in d3.c. Make the array[0] instead of []
to avoid the warning about it being a GNU-extension.
Also include string.h explicitly for memset_after().
MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43647
|
|
For iwlwifi(4) d3.c we need another struct in struct ieee80211_key_seq
and related WLAN_KEY_LEN_* defines in.
MFC after: 3 days
Reviewed by: cc, emaste
Differential Revision: https://reviews.freebsd.org/D43646
|
|
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 will revert b65f813c1ab99448278961c5ca80dc422b1eae29,
21c4082de9e2cf9a0fd81a9a981ab06022956847,
17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4,
af2441fbc7fa9e522e7f8697e5a181bdd4ff9e00,
and 6c3e93cb5a4aa4b8a2d8d4d326f2a7c34d3a4458 for ath.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Tested by: few (rtwn, ath, iwlwifi, ...)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D42427
|
|
The iwlwifi driver already supports the chipset as "Bz TBD"
(also in 14.0). Add the firmware for it. Successfully tested
for 0x8086/0x272b/0x8086/0x00f4 on arm64 thanks to donated
hardware [1].
Firmware was obtained from linux-firmware at
9552083a783e5e48b90de674d4e3bf23bb855ab0 .
Sponsored by: The FreeBSD Foundation
Sponsored by: Martin Hoehne / minipci.biz (B200 card) [1]
MFC after: 3 days
|
|
By default this warns about sizes larger than PTRDIFF_MAX passed to
malloc (rather than SIZE_MAX). This doesn't trigger
deterministically, but it does trigger for kmalloc() of struct_size()
in iwlwifi's iwl_configure_rxq even when struct_size() is changed to
use PTRDIFF_MAX. NB: struct_size() in Linux caps the size at
SIZE_MAX, not PTRDIFF_MAX via size_mul().
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D42587
|
|
|
|
|
|
|
|
|
|
|
| |
Various reports recently hit the "Invalid TXQ id" in iwlwifi again.
Unconditionally enable logging and add a note to report to a specific
PR in the log message for now.
Along with 018d93ece16b this will hopefully help us to understand what
is going on.
Sponsored by: The FreeBSD Foundation
PR: 274382
|
|
Multiple reports have shown missed state transitions in net80211 without
major cause obvious (or with a txq warning in iwlwifi).
In order to better track down potential problems add unconditional
ic_printf calls to any case in the lkpi state machine compat code which
would let us return with an error in the hope that it helps us to catch
the actual problems.
Also remove the debug conditions from ieee80211_{beacon,connection}_loss
which can also cause state transitions to have the ic_printf all the time
there too.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
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
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order for the FreeBSD-specific sysctl (which gives us a full list of
PCI device IDs/names/and firmware prefixes) to be in the proper namespace
add a LINUXKPI_PARAM_PREFIX definition to the file as well.
The sysctl can now be used as:
sysctl -n compat.linuxkpi.iwlwifi_pci_ids_name
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
Update the man pages for iwlwifi.4 and iwlwififw.4 to list the
current state of devices supported and which firmware they need.
The list is automatically generated based on a sysctl added to the
iwlwifi driver (so this is the driver's view). The reader should
not be surprised by the larger number of any/any/any/any entries
for PCI vendor and devices in the firmware table for which other
matching logic happens. The reader should also not be confused
about "TBD" (to be done) entries for chipsets which the driver
already supports but have no (public) product yet.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
While the build-breaking changes were only in the window of
the two commits, 3e1f5cc9a81a..9af1bba44e1c, further updates
restored some functionality as well. Now that we are done,
add iwlwifi back to the build.
This reverts commit b75d1ce6c10652fc4bfbf509deeae0e05c3d1356.
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
|
|
|
|
|
|
|
|
| |
Firmware was obtained from linux-firmware at
dfa11466cf000120d1551146fd5bf78c44941eda.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
|
|
|
|
|
|
|
|
|
|
|
| |
This is a combined versions of updates of the iwlwifi driver based
on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1).
(wt-2023-06-09) 7bd20e011626ccc3ad53e57873452b1716fcfaaa (after v6.4-rc5).
(wt-2023-07-24) 62e409149b62a285e89018e49b2e115757fb9022 (after v6.5-rc3).
Sponsored by: The FreeBSD Foundation
MFC after: 20 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)
|
|
Disconnect iwlwifi from the build for a few commits which, due to
incompatible LinuxKPI 802.11 changes would break the build for a
revision. It will be re-enabled "instantly".
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
|
|
Rather than always comparing a given SSID to the first SSID of the
IE list, compare it to the the iterator one. That way duplicates can
be found.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
This is a combined version of updates of the rtw88 driver based
on wireless-testing
(wt-2023-05-11) 711dca0ca3d77414f8f346e564e9c8640147f40d (after v6.4-rc1),
(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).
This update follows other currently disconnected LinuxKPI based wireless
drivers to lift them all to a same version in case someone else wants to
work on this driver in parallel to predominant iwlwifi efforts.
MFC after: 20 days
|
|
Implement mul_u64_u64_div_u64() for an updated iwlwifi driver (though
we do not yet use it there; it is used for in-kernel ptp on wifi).
Sponsored by: The FreeBSD Foundation
Submitted by: cperciva
MFC after: 10 days
Reviewed by: cperciva, dwmalone
Differential Revision: https://reviews.freebsd.org/D40120
|
|
An updated iwlwifi needs further radiotap updates for EHT.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
|
|
Add the new ptp_clock_kernel.h with structs and dummy functions for
kernel ptp support. This is needed for the next iwlwifi update.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
|
|
iwlwifi already uses suggested EHT and U-SIG bits as well as some
more TLV bits. Update radiotap to know of those even if they might
get updated again in the future in order to get newer versions of
the driver to compile.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
|
|
Address warnings (but one) from mandoc -T lint for these man pages.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
Quieten some more (valid) gcc warnings and disable dead code.
There are more warnings, some probably a compiler problem, the
other related to firmware structs which I do not want to adjust
just locally. Leave a comment to revisit after a next driver
update.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
Fix -Wno-format and unused variables warnings with gcc by adopting
(to|the) FreeBSD-specific code.
Reported by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D39673
|
|
Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D39352
|
|
This fixes an instapanic when restarting wpa_supplicant on my laptop's
iwlwifi device. After this change, iwlwifi enters a nonfunctional
state if wpa_supplicant is restarted, but "service netif restart wlan0"
is enough to get it working again.
releng/13.2 candidate.
Reviewed by: bz
MFC after: 3 days
|
|
Very basic implementations of ieee80211_{wake,stop}_queue[s],
as well as ieee80211_txq_schedule_start(), ieee80211_next_txq(),
and ieee80211_schedule_txq().
Various combinations of these are used by different wireless
drivers, incl. iwlwifi.
Sponsored by: The FreeBSD Foundation (parts of this work)
MFC after: 3 days
|
|
iwl_trans_pcie_send_hcmd() does not seem to exist (anymore). Mark it
as __linux__ so we can submit the cleanup with the next upstream run.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
While here:
- fix an argument of kstrtouint_from_user() to correct signedness.
- make kstrtou32() call kstrtouint() to avoid duplication (keep inline
function)
Add kstrtou32_from_user() based on other examples in the file
making it a copy of the now fixed kstrtouint_from_user().
Also add a rudimentarily hacked up version of mac_pton() which is
leanient accepting non-well-formed input but so far only with ':'
separators. It does not seem to obviously belong to any networking
header file so add it here.
Both new functions are needed for debugfs support for iwlwifi hence
coming together in one commit.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Commented on by: emaste
Differential Revision: https://reviews.freebsd.org/D37088
|
|
In preparation for future updates remove the budget argument from the
netif_napi_add() in drivers and update LinuxKPI to reflect that it is
gone and only set it internally. This required changes to the currently
committed wireless drivers based on LinuxKPI (iwlwifi, rtw88, rtw89).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
Add debugfs_create_u8() based on other already present implementations.
Add a read-only implementation for debugfs_create_blob().
Both are needed for iwlwifi debugfs support.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
OKed by: jfree (earlier version)
Differential Revision: https://reviews.freebsd.org/D37090
|
|
f808c43ad9234670770601ba32a7426b00bbf528 introduced a FreeBSD specific
behaviour to wait for firmware load completion before returning from
loading the driver. This does no longer allow iwl_drv_stop to detect
that startup has completed and it will wait indefinitely for a
completion event that will not happen.
We could change the complete() call to a complete_all() but to avoid
confusion, future side effects, and for simplicity daisy-chain two
complete events in FreeBSD.
PR: 267869
Reported by: Peter Much (pmc citylink.dinoex.sub.org)
Tested by: Peter Much (pmc citylink.dinoex.sub.org)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
Add __seq_open_private() and seq_release_private() needed by iwlwifi
debugfs support.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D37089
|
|
|
|
|
|
|
|
| |
Add new fields (also have to move a struct up, no changes there)
in order to make iwlwifi debugfs support compile.
Sposnored by: The FreeBSD Foundation
MFC after: 3 days
|