linux-block.git
2 months agowifi: iwlwifi: mld: avoid init-after-queue
Miri Korenblit [Tue, 6 May 2025 19:40:57 +0000 (22:40 +0300)]
wifi: iwlwifi: mld: avoid init-after-queue

rx_omi::finished_work is initialized when the containing link is.
If the worker was queued and then an error happened, we will get to
iwl_mld_init_link from the reconfig and initialize the work after it was
queued.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-11-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: use a radio/system specific power budget
Benjamin Berg [Tue, 6 May 2025 19:40:56 +0000 (22:40 +0300)]
wifi: iwlwifi: mld: use a radio/system specific power budget

Different hardware has a different maximum power consumption and the
BIOS can also define a power limit for the device. Add code to select
an appropriate maximum power budget for the device and configure that
instead of using a hardcoded table.

This removes the old table. It does not work with the variable upper
limit and the there should be no consumer that requires these exact step
values.

This considerably increases the power budget for some devices and can
prevent throttling in high traffic situations.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-10-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mvm: use a radio/system specific power budget
Benjamin Berg [Tue, 6 May 2025 19:40:55 +0000 (22:40 +0300)]
wifi: iwlwifi: mvm: use a radio/system specific power budget

Different hardware has a different maximum power consumption and the
BIOS can also define a power limit for the device. Add code to select
an appropriate maximum power budget for the device and configure that
instead of using a hardcoded table.

This removes the old table. It does not work with the variable upper
limit and the there should be no consumer that requires these exact step
values.

This considerably increases the power budget for some devices and can
prevent throttling in high traffic situations.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-9-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: fix thermal code compilation with -Werror=cast-qual
Benjamin Berg [Tue, 6 May 2025 19:40:54 +0000 (22:40 +0300)]
wifi: iwlwifi: fix thermal code compilation with -Werror=cast-qual

The compare_temps function in both mvm and mld dropped the const
qualifier in a cast in a way that makes -Werror=cast-qual unhappy. Add
the const to the cast to fix this.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-8-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: pcie: remove iwl_trans_pcie_gen2_send_hcmd
Miri Korenblit [Tue, 6 May 2025 19:40:53 +0000 (22:40 +0300)]
wifi: iwlwifi: pcie: remove iwl_trans_pcie_gen2_send_hcmd

This function is not implemented nor called. Remove its declaration.

Link: https://patch.msgid.link/20250506194102.3407967-7-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: Add support for a new version for link config command
Yedidya Benshimol [Tue, 6 May 2025 19:40:52 +0000 (22:40 +0300)]
wifi: iwlwifi: Add support for a new version for link config command

Add support for a new version of link configuration command
which includes NPCA and high priority TX traffic support for wifi8.

Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-6-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: Add a new version for mac config command
Yedidya Benshimol [Tue, 6 May 2025 19:40:51 +0000 (22:40 +0300)]
wifi: iwlwifi: Add a new version for mac config command

Add a new version of mac configuration command
which includes UHR support indication.

Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-5-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: Add a new version for sta config command
Yedidya Benshimol [Tue, 6 May 2025 19:40:50 +0000 (22:40 +0300)]
wifi: iwlwifi: Add a new version for sta config command

Add a new version of sta configuration command
which includes these wifi8 features:

1. LDPC X2 CW size support indication
2. Indication if ICF frame is needed instead of RTS
3. support for MIC padding delays for protected control frames

Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-4-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: add range response version 10 support
Avraham Stern [Tue, 6 May 2025 19:40:49 +0000 (22:40 +0300)]
wifi: iwlwifi: add range response version 10 support

Range response version 10 removes the rx and tx rates fields.
These fields aren't used by the driver anyway, so no change is
needed to support it.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-3-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: remove one more error in unallocated BAID
Miri Korenblit [Tue, 6 May 2025 19:40:48 +0000 (22:40 +0300)]
wifi: iwlwifi: mld: remove one more error in unallocated BAID

Since the FW is the one to assign an ID to a BA, it can happen that
the FW sends a bar_frame_release_notif before the driver had the chance to
allocate the BAID.

Convert the IWL_FW_CHECK into a regular debug print.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-2-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: handle v3 rates
Johannes Berg [Mon, 5 May 2025 18:56:54 +0000 (21:56 +0300)]
wifi: iwlwifi: handle v3 rates

For UHR, a version 3 of the rate API is being added, which
increases the number of bits used for MCSes by shifting the
NSS bit up. Handle that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215513.84cde65a603f.Ic3119ef77cbc6461abd2a6bda104c0d236adcc8d@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: add RFI_CONFIG_CMD to iwl_mld_system_names array
Pagadala Yesu Anjaneyulu [Mon, 5 May 2025 18:56:53 +0000 (21:56 +0300)]
wifi: iwlwifi: mld: add RFI_CONFIG_CMD to iwl_mld_system_names array

Add RFI_CONFIG_CMD into the names array to facilitate the
display of this command name when sending it to the firmware.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Link: https://patch.msgid.link/20250505215513.da89484cb838.I755709232f5e441ca159bdc5a151bac73d9744d3@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: fix 6005N/SFF match
Johannes Berg [Mon, 5 May 2025 18:56:52 +0000 (21:56 +0300)]
wifi: iwlwifi: fix 6005N/SFF match

That mask should never have been 0xFFFF (mask also doesn't
make sense in that case) but rather 0xF000 since I combined
a few entries with 0xC___.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215513.63bdbd67b72d.Id9b93b695c91117967dfd339c76bdfcd2872bee6@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: make iwl_uefi_get_uats_table() return void
Johannes Berg [Mon, 5 May 2025 18:56:51 +0000 (21:56 +0300)]
wifi: iwlwifi: make iwl_uefi_get_uats_table() return void

This sets both fwrt->uats_valid and returns 0, but in the
static inline it returns 0 without setting uats_valid,
which is confusing and the iwlmvm code misbehaves in this
case.

Since it already sets uats_valid, just remove the extra
return value.

Reported-by: Bjoern A. Zeeb <bz@FreeBSD.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215513.e981a7911228.Ic94b5e03e2053a08b84cabeb58ce3b6598fd9fc6@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: drop whtc RF
Emmanuel Grumbach [Mon, 5 May 2025 18:56:50 +0000 (21:56 +0300)]
wifi: iwlwifi: drop whtc RF

This RF module is now a product. No need to support the test chip
anymore.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215513.01fb866e7c38.I23611aa4abb8fd031a6d63a21f4b87b0d38a36a1@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: add support PE RF
Emmanuel Grumbach [Mon, 5 May 2025 18:56:49 +0000 (21:56 +0300)]
wifi: iwlwifi: add support PE RF

This is a new RF module and of course the firmware name for this new RF
module is different.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215513.c3481b1a4124.Id94c680636be2f59c9172919c79d80a48c7d1322@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: debug: set CDB indication from CSR
Miri Korenblit [Mon, 5 May 2025 18:56:48 +0000 (21:56 +0300)]
wifi: iwlwifi: debug: set CDB indication from CSR

In order to set the CDB indication in the dump meta data, we read it from
a specific prph register.
There is a known issue with that register in Xnj setups - in that case it
will always indicate CDB.
Instead of detecting the jacket case and then hardcode whether the CDB
indication should or shouldn't be set (according the CRF),
we can retrieve the CDB bit from the hw_rf_id (CSR_HW_RF_ID).
There is also no reason to do it conditionally only for ax210 / BnJ.
Cleanup the code a bit.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215513.ea542a6c189e.I3d8cf5103b3747dfdd89985b45b592e419f97b63@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mvm: fix beacon CCK flag
Johannes Berg [Mon, 5 May 2025 18:56:47 +0000 (21:56 +0300)]
wifi: iwlwifi: mvm: fix beacon CCK flag

The beacon CCK flag should be set for any CCK rate, not
just for 1 Mbps. Fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20250505215513.fe18b7d92d7d.I7bb40a92cea102677b695beb1e2a62a5ea72678b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: remove NVM C step override
Johannes Berg [Mon, 5 May 2025 18:56:46 +0000 (21:56 +0300)]
wifi: iwlwifi: remove NVM C step override

This was used for debug/bringup of 8000 devices, to be able to
unify between all 8000 devices with NVM override. However, this
is really no longer used, those are ancient devices by now, so
we can remove the logic.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215513.6210ac6cda09.I83cc3e68f0ed99a922d435c203fef840a28eb0de@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: dvm: init 'keep_alive_beacons' in power tables
Johannes Berg [Mon, 5 May 2025 18:56:45 +0000 (21:56 +0300)]
wifi: iwlwifi: dvm: init 'keep_alive_beacons' in power tables

These should be zero, but we might as well be explicit about it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215513.1e943bf696f4.Id2d7a413dc594c4525ac7ad0650ec8a50e1970ca@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: add debugfs for using ptp clock time for monitor interface
Avraham Stern [Mon, 5 May 2025 18:56:44 +0000 (21:56 +0300)]
wifi: iwlwifi: mld: add debugfs for using ptp clock time for monitor interface

Add a debugfs option to use the ptp clock time for Rx device
timestamps on a monitor interface. This can be useful for e.g.
synchronizing multiple NICs or reporting the timestamp in the
system clock instead of the GP2.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Link: https://patch.msgid.link/20250505215513.fffe6718fbca.I75f034005851a2d0c8ba5b015b9fdcad8a7c550d@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: pcie: log async commands
Johannes Berg [Mon, 5 May 2025 18:56:43 +0000 (21:56 +0300)]
wifi: iwlwifi: pcie: log async commands

Currently, there are two log messages at INFO level for
synchronous commands:

    Attempting to send sync command ...
    Setting HCMD_ACTIVE for command ...

and unfortunately none at all for async ones. Add one
for async commands as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215512.cc4457285889.I633fae8828e8a37bbebc578166f388dcf893f592@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: don't check the TPT counters when scanning
Miri Korenblit [Mon, 5 May 2025 18:56:42 +0000 (21:56 +0300)]
wifi: iwlwifi: mld: don't check the TPT counters when scanning

If there is an ongoing scan that lasts long, the MPDU counters may not
increase enough due the device being busy with scanning and not
because we are in a low throughput scenario.

In that case we don't want to block EMLSR.
Instead, stop checking the counters from the moment we started
scanning, and when the scan ends - clear the counters and schedule a
check in 5 seconds, as usual.

Note that this is only done for regular scan since MLO scan is too short
to affect the counters, and scheduled scan is mainly used when we are
not connected.

Also note that we only stop checking whether to block EMLSR, and not if to
unblock.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215512.330ea440d19c.Ib10dae0b7a0cb0e10c59a9edf5ff7af0f065ac60@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: print the DSM value when read from UEFI
Miri Korenblit [Mon, 5 May 2025 18:56:41 +0000 (21:56 +0300)]
wifi: iwlwifi: print the DSM value when read from UEFI

We have such a print for ACPI, add one for UEFI.
This is needed for testing

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250505215512.f419c18c064e.I870a4537a4bfa3c54b03ec7ec29bb246e6aa75cb@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: dvm: pair transport op-mode enter/leave
Johannes Berg [Sun, 4 May 2025 10:26:30 +0000 (13:26 +0300)]
wifi: iwlwifi: dvm: pair transport op-mode enter/leave

If there's a failure and the op-mode didn't actually fully
initialize, it should leave the transport again. Fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.714c3517548b.I49557e7ba8c03be2b558cc9fb5efa2a9fbab890e@changeid
2 months agowifi: iwlwifi: tests: simplify devinfo_no_trans_cfg_dups()
Johannes Berg [Sun, 4 May 2025 10:26:29 +0000 (13:26 +0300)]
wifi: iwlwifi: tests: simplify devinfo_no_trans_cfg_dups()

There's no need to build a list of individual configs
first and then compare them, we can just go through all
of them and compare if the pointers aren't the same.
The complexity (in terms of number of comparisons) is a
bit higher that way, but it's just a test and the code
complexity is much lower without that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.85911c59d96a.I540f464229da3566d1726dfb61b46002fbb73bde@changeid
2 months agowifi: iwlwifi: cfg: use minimum API version 97 for Sc/Dr
Johannes Berg [Sun, 4 May 2025 10:26:28 +0000 (13:26 +0300)]
wifi: iwlwifi: cfg: use minimum API version 97 for Sc/Dr

For Sc 97 might get used (at least for now) and for Dr
the older 96 won't get used. Change them both to 97.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.2ab49f2265ce.I45623943fdcac3462d96e54dbb7fdad68bdf3693@changeid
2 months agowifi: iwlwifi: tests: allow same config for different MACs
Johannes Berg [Sun, 4 May 2025 10:26:27 +0000 (13:26 +0300)]
wifi: iwlwifi: tests: allow same config for different MACs

For different MACs we maintain the configs in different
files, and while it's a small waste of space, this is a
worthwhile trade-off for maintenance and simplicity. So
allow different MAC types to have the same config. This
could allow the same config for two MACs in the same MAC
family, but that's not hugely important. Also simplify
the test to not build a config list, there's no good
reason to do that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.27f5d570eb32.I1649309a0e54a1d446a38c5b2124a582de9f6d61@changeid
2 months agowifi: iwlwifi: bump FW API to 99 for BZ/SC/DR devices
Miri Korenblit [Sun, 4 May 2025 10:26:26 +0000 (13:26 +0300)]
wifi: iwlwifi: bump FW API to 99 for BZ/SC/DR devices

Start supporting API version 99 for those devices.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.677db25ce2c7.Ie4a7a00ff3562bfed1e8ac1fb42c1382cd24a486@changeid
2 months agowifi: iwlwifi: mvm: remove HT greenfield support
Johannes Berg [Sun, 4 May 2025 10:26:25 +0000 (13:26 +0300)]
wifi: iwlwifi: mvm: remove HT greenfield support

No hardware that uses iwlmvm actually supports HT greenfield.
Remove the support and then clean up the v1 rate API by doing
a conversion to v2 rate API, the only thing v1 covered that
couldn't be done in v2 was HT greenfield.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.805ec090c61f.Iafd87f62ceb463b72f861a5348078999dcaace92@changeid
2 months agowifi: iwlwifi: mvm: don't report bad EHT rate to mac80211
Johannes Berg [Sun, 4 May 2025 10:26:24 +0000 (13:26 +0300)]
wifi: iwlwifi: mvm: don't report bad EHT rate to mac80211

In EHT, we shouldn't report a legacy rate to mac80211, that
might just be confusing. Set it to zero, since it's only
really relevant for radiotap.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.325d7ba6905f.I3bdd8854e1a784856a4973ff4d532c74f992af00@changeid
2 months agowifi: iwlwifi: mld: don't report bad EHT rate to mac80211
Johannes Berg [Sun, 4 May 2025 10:26:23 +0000 (13:26 +0300)]
wifi: iwlwifi: mld: don't report bad EHT rate to mac80211

In EHT, we shouldn't report a legacy rate to mac80211, that
might just be confusing. Set it to zero, since it's only
really relevant for radiotap.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.8baf4efec182.Idc0cabf1919c05b35dc2341c08ea88a7157614c4@changeid
2 months agowifi: iwlwifi: mld: build HT/VHT injected rate in v2
Johannes Berg [Sun, 4 May 2025 10:26:22 +0000 (13:26 +0300)]
wifi: iwlwifi: mld: build HT/VHT injected rate in v2

Instead of building the injected rate in version 1 of the
format and then converting, build it in version 2 directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.0e6e4ae4469f.Ib49eda9a3083b2e0f0bcaff08ad784e151978307@changeid
2 months agowifi: iwlwifi: rename modulation type values
Johannes Berg [Sun, 4 May 2025 10:26:21 +0000 (13:26 +0300)]
wifi: iwlwifi: rename modulation type values

The modulation type values aren't masks, they're just values.
Rename them from RATE_MCS_CCK_* to RATE_MCS_MOD_TYPE_*.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.aa79635dd4e6.Ie97a01fee1ef4aedf8a2e5447489793ce8c15ca0@changeid
2 months agowifi: iwlwifi: fw: remove RATE_MCS_NSS_POS
Johannes Berg [Sun, 4 May 2025 10:26:20 +0000 (13:26 +0300)]
wifi: iwlwifi: fw: remove RATE_MCS_NSS_POS

We can use u32_{get,encode}_bits() instead of manual shifts
and remove RATE_MCS_NSS_POS.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.b6da6048f8b8.Ib6d78ed6ffb7e99c42c2dd2ca4706a6bf73d3066@changeid
2 months agowifi: iwlwifi: remove sku_id from trans
Johannes Berg [Sun, 4 May 2025 10:26:19 +0000 (13:26 +0300)]
wifi: iwlwifi: remove sku_id from trans

This is ephemeral data that's passed from the alive
response to the PNVM loading, so it doesn't need to
be stored. Pass it around instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.fe8be4454007.I24824f35620b21fe49e9243818c7188e431af48e@changeid
2 months agowifi: iwlwifi: trans: move ext_32khz_clock_valid to config
Johannes Berg [Sun, 4 May 2025 10:26:18 +0000 (13:26 +0300)]
wifi: iwlwifi: trans: move ext_32khz_clock_valid to config

This value is used for the device start, so it's really
part of the configuration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.637ed7514587.I6c8fdeb3e2078a5fe9b755391e3ef7258ef2b279@changeid
2 months agowifi: iwlwifi: move STEP config into trans->conf
Johannes Berg [Sun, 4 May 2025 10:26:17 +0000 (13:26 +0300)]
wifi: iwlwifi: move STEP config into trans->conf

This really belongs there, it's needed early, so move it. Remove
the related but dead iwl_trans_pcie_ctx_info_gen3_set_step() while
at it. In iwlmld move the calls since they do part of the trans
configuration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.a4681ee11dd7.I6434a13d51932e984bb07695bc1cb931ebdcd27c@changeid
2 months agowifi: iwlwifi: rework transport configuration
Johannes Berg [Sun, 4 May 2025 10:26:16 +0000 (13:26 +0300)]
wifi: iwlwifi: rework transport configuration

Instead of having a trans_configure method that copies all
the data, just have the users set up the configuration in
the transport directly. This simplifies the code on both
sides. While doing so also move some value from the trans
struct into the conf struct because they are configuration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250504132447.e2a2535ecfd0.I21653103ff02afc5a4d97a41b68021f053985e37@changeid
2 months agowifi: iwlwifi: trans: collect device information
Johannes Berg [Sat, 3 May 2025 19:44:34 +0000 (22:44 +0300)]
wifi: iwlwifi: trans: collect device information

Add a new device information 'info' substruct to the transport
that's const and can only be set by a special helper, and move
some information there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224232.cd80cb55403c.Ic18524b66d655fad734bf97192a54d9cfa9fdf1f@changeid
2 months agowifi: iwlwifi: trans: remove SCD base address validation
Johannes Berg [Sat, 3 May 2025 19:44:33 +0000 (22:44 +0300)]
wifi: iwlwifi: trans: remove SCD base address validation

We pass this parameter around a lot of places just to
validate what the firmware told us against the hardware
with a warning, which seems to never trigger. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224232.5405014d7f88.I3b74a1fd51a39c6df5674f2994189092d1635e7f@changeid
2 months agowifi: iwlfiwi: mvm: Fix the rate reporting
Ilan Peer [Sat, 3 May 2025 19:44:32 +0000 (22:44 +0300)]
wifi: iwlfiwi: mvm: Fix the rate reporting

The rate validation in mac80211 considers a rate to be valid iff both
the rate index and the count are positive. When the rate scaling is
managed in the driver and not enough traffic passed to set the actual
rate, the driver set the rate to be the optimal rate. However, the rate
count is not set and thus the rate is considered not valid. Fix it by
setting the count to 1.

Fixes: 3e99b4d28219 ("wifi: mac80211: Sanity check tx bitrate if not provided by driver")
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224232.0d1d1e022d63.I76833c14ba1d66f9bea5c32b25a54d8b36f229ba@changeid
2 months agowifi: iwlwifi: remove bc_table_dword transport config
Johannes Berg [Sat, 3 May 2025 19:44:31 +0000 (22:44 +0300)]
wifi: iwlwifi: remove bc_table_dword transport config

There's really no point in configuring this, it's just
a question of hardware capability. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224232.6af4ea001226.I693f72a7c3a76e44f9ef2cefd62d606ad100a734@changeid
2 months agowifi: iwlwifi: pcie: remove constant wdg_timeout
Johannes Berg [Sat, 3 May 2025 19:44:30 +0000 (22:44 +0300)]
wifi: iwlwifi: pcie: remove constant wdg_timeout

This value is only ever initialized and read, so just
replace the usage with the constant and remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224232.48333e80a74d.I6c1aaa23fac5ff7400aa59a3093b53774261cb0e@changeid
2 months agowifi: iwlwifi: trans: remove hw_wfpm_id
Johannes Berg [Sat, 3 May 2025 19:44:29 +0000 (22:44 +0300)]
wifi: iwlwifi: trans: remove hw_wfpm_id

We only need to have this during init in PCIe, so can
just re-read the value. Do that and don't store it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224232.4dfa2ae2a844.I46466f2523d8760e93228cd9a93c112d371e002d@changeid
2 months agowifi: iwlwifi: trans: remove hw_id_str
Johannes Berg [Sat, 3 May 2025 19:44:28 +0000 (22:44 +0300)]
wifi: iwlwifi: trans: remove hw_id_str

This has never been used, so remove it now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.4623574bdbe1.I8b09dd25702e7d7e2f0b4c61390baf73878f681d@changeid
2 months agowifi: iwlwifi: pass full FW info to transport
Johannes Berg [Sat, 3 May 2025 19:44:27 +0000 (22:44 +0300)]
wifi: iwlwifi: pass full FW info to transport

The code currently passes only the specific image that should
be loaded, but then has to pass the IML (image loader) out of
band, which is confusing. Pass the full FW data together with
desired image type, and use the IML from that.

This also cleans up the code in the various sub-drivers a bit
as they no longer have to look up and check for the image.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.eac4006e81c5.Iebadc56bb2762e5f4d71f66bb2609d74b33daf11@changeid
2 months agowifi: iwlwifi: handle reasons recommended by FW for leaving EMLSR
Somashekhar Puttagangaiah [Sat, 3 May 2025 19:44:26 +0000 (22:44 +0300)]
wifi: iwlwifi: handle reasons recommended by FW for leaving EMLSR

FW sends new notification version 2 indicating whether activating EMLSR
mode is recommended or not. If recommendation is to leave EMLSR or force
leave then FW sends the reason. Add debug log for the reason sent by FW.

Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.0582726248a4.I9d1d00eb98d10a3a742cb3e06665ce10e5ec93f0@changeid
2 months agowifi: iwlwifi: remove PM mode and send-in-D3
Johannes Berg [Sat, 3 May 2025 19:44:25 +0000 (22:44 +0300)]
wifi: iwlwifi: remove PM mode and send-in-D3

Simplify the logic here by tracking only suspended as a
status bit, and remove CMD_SEND_IN_D3 completely. There
is no value, since the op-mode sets the state and also
sends the commands.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.cc3360761f1e.I72261afc42cee8983198b4660b7d38b7df7963da@changeid
2 months agowifi: iwlwifi: unexport iwl_trans_pcie_send_hcmd()
Johannes Berg [Sat, 3 May 2025 19:44:24 +0000 (22:44 +0300)]
wifi: iwlwifi: unexport iwl_trans_pcie_send_hcmd()

It doesn't need to be exported since the code calling it
is in the same module.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.f457a737c663.I8d49b2955a4f2ca47deb664e5fd58e39d612bb63@changeid
2 months agowifi: iwlwifi: pcie: move wait_command_queue into PCIe
Johannes Berg [Sat, 3 May 2025 19:44:23 +0000 (22:44 +0300)]
wifi: iwlwifi: pcie: move wait_command_queue into PCIe

There's no reason for this to be declared in the transport
struct, so move the item to the PCIe struct.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.793f625c5c2d.I64ebb402255d84c2ad045a65e5a4e4891ead5b26@changeid
2 months agowifi: iwlwifi: pcie: move invalid TX CMD into PCIe
Johannes Berg [Sat, 3 May 2025 19:44:22 +0000 (22:44 +0300)]
wifi: iwlwifi: pcie: move invalid TX CMD into PCIe

There's no reason for this to be in the generic transport
struct, move it into the PCIe code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.d4916769a25b.Ife9b0283e50023efb6b3f44e81a6ff3885fe5a8d@changeid
2 months agowifi: iwlwifi: pcie: move ME check data to pcie
Johannes Berg [Sat, 3 May 2025 19:44:21 +0000 (22:44 +0300)]
wifi: iwlwifi: pcie: move ME check data to pcie

There's no reason for this data to be in the generic transport
struct, so move it to pcie.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.0b74726b2651.I2c6bff6945b9288eadf242895906ab1c2cb76389@changeid
2 months agowifi: iwlwifi: pcie: rename "continuous" memory
Johannes Berg [Sat, 3 May 2025 19:44:20 +0000 (22:44 +0300)]
wifi: iwlwifi: pcie: rename "continuous" memory

What's really meant here is "contiguous", appreviate it
as "contig".

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250503224231.8c2ccc0a7469.I6ef88a48c2a2e5c0baa881382017d34eb07f9316@changeid
2 months agowifi: iwlwifi: remove iwl_cmd_groups_verify_sorted()
Johannes Berg [Fri, 2 May 2025 12:56:31 +0000 (15:56 +0300)]
wifi: iwlwifi: remove iwl_cmd_groups_verify_sorted()

We now have unit tests for the mvm and mld, and dvm isn't
going to change anyway. Remove the runtime checks.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.e3f01789575d.I4380dcbf3e0ecabc2a8a42c84f448b7dd854bf50@changeid
2 months agowifi: iwlwifi: mvm: add command order checks to kunit
Johannes Berg [Fri, 2 May 2025 12:56:30 +0000 (15:56 +0300)]
wifi: iwlwifi: mvm: add command order checks to kunit

We can test this with kunit instead of having the runtime
checks, add a test here to remove the runtime check next.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.581b60b0833f.I624fb3efc3fa0b155a5da69d7efc39207f133331@changeid
2 months agowifi: iwlwifi: pcie: don't call itself indirectly
Johannes Berg [Fri, 2 May 2025 12:56:29 +0000 (15:56 +0300)]
wifi: iwlwifi: pcie: don't call itself indirectly

There's no reason for pcie code to call itself indirectly,
directly use the pcie functions instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Yedidya Ben Shimol <yedidya.ben.shimol@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.52db0b9fba15.I062e766ded86f61ec86104c28b84767f1c29ea78@changeid
2 months agowifi: iwlwifi: cfg: remove unnecessary configs
Johannes Berg [Fri, 2 May 2025 12:56:28 +0000 (15:56 +0300)]
wifi: iwlwifi: cfg: remove unnecessary configs

Since there are two bytes hole in struct iwl_dev_info, add
a subdev_mask to match with. Also, since the PCI IDs list
needs to match first, and the dev-info list is matched from
the bottom up, remove unnecessary entries.

With this, even though there are new entries from previous
changes, the overall size is slightly reduced.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.689f9b335cbe.I66f1344b6ac7aa3665696637c97fa843c2307423@changeid
2 months agowifi: iwlwifi: cfg: reduce mac_type to u8
Johannes Berg [Fri, 2 May 2025 12:56:27 +0000 (15:56 +0300)]
wifi: iwlwifi: cfg: reduce mac_type to u8

In theory, this should be 12 bits, but in practice all the
values we use now fit into 8 bits, so change the mac_type to
make room in struct iwl_dev_info.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.c17d56f4ae0f.I487c8df18aa33c46aa6813bf5aebb5a23da67600@changeid
2 months agowifi: iwlwifi: tests: check for duplicate name strings
Johannes Berg [Fri, 2 May 2025 12:56:26 +0000 (15:56 +0300)]
wifi: iwlwifi: tests: check for duplicate name strings

We don't need the same name multiple times in the binary,
add a check for that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.9adf2790122e.Ia85152c072c7944f0b80e819cf59a51d6adeb49a@changeid
2 months agowifi: iwlwifi: cfg: move all names out of configs
Johannes Berg [Fri, 2 May 2025 12:56:25 +0000 (15:56 +0300)]
wifi: iwlwifi: cfg: move all names out of configs

Move all the names into dev info structs and remove
the pointer from the configs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.1538369bffde.Id430ff71f57cbb37c19ecc5b41c831e5ba9b0695@changeid
2 months agowifi: iwlwifi: cfg: finish config split
Johannes Berg [Fri, 2 May 2025 12:56:24 +0000 (15:56 +0300)]
wifi: iwlwifi: cfg: finish config split

A long time ago, when transport vs. device configs were
introduced, we wanted to eventually have a list of PCI
IDs and a separate list of devices, but for simplicity
embedded the transport config in the whole config, and
it all got confusing.

Finish splitting that out. Doing so requires having more
IWL_DEV_INFO() entries, but the whole trans/cfg aliasing
goes away and the code becomes a lot simpler.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.e03f65c0f693.I076a997f800db455b575008f9488b151738ad7ec@changeid
2 months agowifi: iwlwifi: cfg: minor fixes for Sc
Johannes Berg [Fri, 2 May 2025 12:56:23 +0000 (15:56 +0300)]
wifi: iwlwifi: cfg: minor fixes for Sc

Remove the erroneously named IWL_DEVICE_BZ_COMMON macro
from the Sc file and fix some indentation. Also bump the
minimum FW version since it's not released yet anyway,
right now this is mostly to make the config different
from iwl_bz_cfg which would otherwise be the same with
the upcoming transport config cleanups.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.b313d54b8809.Ia975b6d5460996f2a2761dd3d0fef4a56f1f3e24@changeid
2 months agowifi: iwlwifi: pcie: remove 'ent' argument from alloc
Johannes Berg [Fri, 2 May 2025 12:56:22 +0000 (15:56 +0300)]
wifi: iwlwifi: pcie: remove 'ent' argument from alloc

The alloc function iwl_trans_pcie_alloc() doesn't use the
'ent' argument, so remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.0351805072bc.Id309b38817edc116bf9a921608a93b7734f21b05@changeid
2 months agowifi: iwlwifi: cfg: rename BW_NO_LIMIT to BW_NOT_LIMITED
Johannes Berg [Fri, 2 May 2025 12:56:21 +0000 (15:56 +0300)]
wifi: iwlwifi: cfg: rename BW_NO_LIMIT to BW_NOT_LIMITED

It's not clear that it makes sense to have any matches
for IWL_CFG_ANY for this bit, but let's assume for now
that this makes sense. Then, it's clearer to call this
BW_NOT_LIMITED rather than BW_NO_LIMIT, since the last
change.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.9b39693b505c.Ib47aa6a072a0e61bbba28383ce54764cd859f19c@changeid
2 months agowifi: iwlwifi: cfg: clean up BW limit and subdev matching
Johannes Berg [Fri, 2 May 2025 12:56:20 +0000 (15:56 +0300)]
wifi: iwlwifi: cfg: clean up BW limit and subdev matching

The BW limit, cores and RF ID are matched in the subdevice ID,
so it doesn't really make sense to have both SUBDEV() match and
a match on any of those three. In particular, for Killer devices
the subdevice ID doesn't even follow the layout, so no matching
should be on those three values at all, only with SUBDEV().

Change the logic around the BW limit to have it more like all
the other things: only a bw_limit match in the dev_info, and
put the actual bandwidth into struct iwl_cfg. This duplicates a
number of those values, but that way the logic is clearer.

Add a test that checks that the three matches mentioned above
are not used in conjunction with SUBDEV(), and check that if
the bw_limit is matched, a BW limit is provided in the config.
Also check that the "Killer" devices have a SUBDEV() match.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.a185eac2736c.I87ee87300c92518a1d3296d3eda9fd4163e9085e@changeid
2 months agowifi: iwlwifi: tests: check transport configs are not duplicated
Johannes Berg [Fri, 2 May 2025 12:56:19 +0000 (15:56 +0300)]
wifi: iwlwifi: tests: check transport configs are not duplicated

Add a kunit test to check that all (used) transport config structs
are not duplicated, since there's no value in having the same info
in two places in memory.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.a151af19aaba.Id57f099a899e09318c6218ed1859151f00232b41@changeid
2 months agowifi: iwlwifi: tests: check configs are not duplicated
Johannes Berg [Fri, 2 May 2025 12:56:18 +0000 (15:56 +0300)]
wifi: iwlwifi: tests: check configs are not duplicated

Add a kunit test to check that all (used) config structs
are not duplicated, ignoring the name since that can be
handled differently via the dev-info list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.0cfd9fb8322e.I9567b839405be8d1e4be0bfca7a17b5d222b0158@changeid
2 months agowifi: iwlwifi: cfg: remove iwl_cfg_br
Johannes Berg [Fri, 2 May 2025 12:56:17 +0000 (15:56 +0300)]
wifi: iwlwifi: cfg: remove iwl_cfg_br

This is the same as iwl_cfg_dr, just different by the MAC,
so no need to keep a separate config; remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.83b86e8a182b.Iec7f3027e7058005a98ff6d05cc224ab61b7c44a@changeid
2 months agowifi: iwlwifi: cfg: remove duplicated Sc device configs
Johannes Berg [Fri, 2 May 2025 12:20:30 +0000 (15:20 +0300)]
wifi: iwlwifi: cfg: remove duplicated Sc device configs

The configurations for Sc, Sc2 and Sc2f are all the same,
so keep just a single config struct.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.2bab15a21306.I079987bc4a1679789bacc1078952aa90c805ffe0@changeid
2 months agowifi: iwlwifi: cfg: remove duplicated iwl_cfg_gl
Johannes Berg [Fri, 2 May 2025 12:20:29 +0000 (15:20 +0300)]
wifi: iwlwifi: cfg: remove duplicated iwl_cfg_gl

This really is the same device as covered by iwl_cfg_bz,
just the discrete version. Since discrete vs integrated
is handled in the transport config, there's no need to
have both. Remove iwl_cfg_gl.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.fbb78183dc85.Ic5429009677ae1023cf1f43a655e90409a30c493@changeid
2 months agowifi: iwlwifi: cfg: remove iwl_ax201_cfg_qu_hr
Johannes Berg [Fri, 2 May 2025 12:20:28 +0000 (15:20 +0300)]
wifi: iwlwifi: cfg: remove iwl_ax201_cfg_qu_hr

We can handle the name differently, so do that and remove
the extra config entry.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.17fc47c72232.I2cb4476b9bca6e770bd375ad6ce650553dbde0f1@changeid
2 months agowifi: iwlwifi: cfg: remove max_tx_agg_size
Johannes Berg [Fri, 2 May 2025 12:20:27 +0000 (15:20 +0300)]
wifi: iwlwifi: cfg: remove max_tx_agg_size

This was used in some really old devices, and then got
carried forward to Qu devices, even though on those we
don't need it at all since the TX aggregation start is
offloaded to the firmware. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.9c2689e2ca8e.I8274b29ca64d9ef9d1e357bbe34ca3a4b97aeb7a@changeid
2 months agowifi: iwlwifi: cfg: remove unused config externs
Johannes Berg [Fri, 2 May 2025 12:20:26 +0000 (15:20 +0300)]
wifi: iwlwifi: cfg: remove unused config externs

There are two killer configs that no longer exist,
remove the externs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.64977630101f.I9997a72027d37249620a78091759fa44f9d32c87@changeid
2 months agowifi: iwlwifi: cfg: unify Killer 1650s/i with Qu/Hr
Johannes Berg [Fri, 2 May 2025 12:20:25 +0000 (15:20 +0300)]
wifi: iwlwifi: cfg: unify Killer 1650s/i with Qu/Hr

These configs are the same except for the name, but we
can use a separate per-device name to override the name.
So do that, and remove the separate configs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.a0a8ebbd473a.Iad8bff04138538a8bc9f7920077ea24a699b1ed4@changeid
2 months agowifi: iwlwifi: cfg: unify Qu/QuZ configs
Johannes Berg [Fri, 2 May 2025 12:20:24 +0000 (15:20 +0300)]
wifi: iwlwifi: cfg: unify Qu/QuZ configs

Now that the fw_name_mac is no longer around and derived
from the MAC type automatically, we no longer need to have
different configurations for Qu/QuZ. Combine them. For the
killer AX1650s/i, also fix the names, there was a mixup.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.957fbb5437ce.If51ad0b2c8afaaa131208125af3bc292793613bb@changeid
2 months agowifi: iwlwifi: cfg: remove fw_name_mac
Johannes Berg [Fri, 2 May 2025 12:20:23 +0000 (15:20 +0300)]
wifi: iwlwifi: cfg: remove fw_name_mac

Instead of having fw_name_mac in the config, derive it
from the MAC type instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.8dba9a2d3546.I41fa594d6a0be163444b90c1ed4b441a949d3899@changeid
2 months agowifi: iwlwifi: tests: check for device names
Johannes Berg [Fri, 2 May 2025 12:20:22 +0000 (15:20 +0300)]
wifi: iwlwifi: tests: check for device names

Add a unit test that checks that each device has a name,
either via the specific name entry or the config's name.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.c04287134280.Iedc7c05a41dc8bfe04dc8b95fea38543513eac2d@changeid
2 months agowifi: iwlwifi: pcie: add entry for Killer AX1650i on AdL-P
Johannes Berg [Fri, 2 May 2025 12:20:21 +0000 (15:20 +0300)]
wifi: iwlwifi: pcie: add entry for Killer AX1650i on AdL-P

On AdL-P, we're missing an entry for the Killer(R) Wi-Fi 6
AX1650i 160 MHz adapter. Add an entry to fix that.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219114
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.483214386aa4.Iad4d2041bfe544875fe9f5c051e23a765f862786@changeid
2 months agowifi: iwlwifi: unify some configurations
Johannes Berg [Fri, 2 May 2025 12:20:20 +0000 (15:20 +0300)]
wifi: iwlwifi: unify some configurations

Rather than having individual entries for different MAC
and RF steps, unify the entries by using fw_name_mac and
remove the now duplicated ones.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.b93f34a65822.I57b8235acb675cb6b4e97df2f4a7365f3d9bff18@changeid
2 months agowifi: iwlwifi: remove duplicated line
Miri Korenblit [Fri, 2 May 2025 12:20:19 +0000 (15:20 +0300)]
wifi: iwlwifi: remove duplicated line

This line was duplicated by mistake, remove one occurrence.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.a2601e0a08e0.Ie72fadec40e41b8197bfdae16eaa430c64a3e62d@changeid
2 months agowifi: iwlwifi: pcie: Add support for new device ids
Somashekhar Puttagangaiah [Fri, 2 May 2025 12:20:18 +0000 (15:20 +0300)]
wifi: iwlwifi: pcie: Add support for new device ids

Add device support for PeP on ScP

Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.a66928fcc82a.Icbbc7c28855f8de232cb3916901a4da3ac286117@changeid
2 months agowifi: iwlwifi: remove TH/TH1 RF types
Johannes Berg [Fri, 2 May 2025 12:20:17 +0000 (15:20 +0300)]
wifi: iwlwifi: remove TH/TH1 RF types

There are the same values as JF2/JF1 respectively, and
that really matches the code names. Remove TH/TH1.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.7677cffdfae2.Idd76734c310cf5f27de43d24e71b27467ab5905a@changeid
2 months agowifi: iwlwifi: clean up config macro
Johannes Berg [Fri, 2 May 2025 12:20:16 +0000 (15:20 +0300)]
wifi: iwlwifi: clean up config macro

The IWL_DEV_INFO() macro has far too many arguments, and most
of the time they're just "ANY". Use C99 initializers in the
macro to clean that up.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502151751.42318bb31f0e.Ic3a40afcd182b6e1802bb8f8a1a845b20608e328@changeid
2 months agowifi: iwlwifi: mvm: remove nl80211 testmode
Johannes Berg [Wed, 30 Apr 2025 12:57:29 +0000 (15:57 +0300)]
wifi: iwlwifi: mvm: remove nl80211 testmode

This was used in the past for NoA and/or beacon filter
testing, but these days everything is tested via debugfs
or special FW commands, so remove the testmode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.751018e0ed8e.I21557a9a3d57234187f1b0b2182a1714ecc66b9a@changeid
2 months agowifi: iwlwifi: mld: set rx_mpdu_cmd_hdr_size
Johannes Berg [Wed, 30 Apr 2025 12:57:28 +0000 (15:57 +0300)]
wifi: iwlwifi: mld: set rx_mpdu_cmd_hdr_size

Set rx_mpdu_cmd_hdr_size so that tracing will correctly include
the frame header.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.caf1d8e2bae3.I82d89bc8d128f78159a8a11b1573574dacdeb99e@changeid
2 months agowifi: iwlwifi: dvm: fix various W=1 warnings
Johannes Berg [Wed, 30 Apr 2025 12:57:27 +0000 (15:57 +0300)]
wifi: iwlwifi: dvm: fix various W=1 warnings

Fix warnings occurring with W=1, mostly const and one about
pointer arithmetic.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.3ef1e4f1cccb.Ic41d3f3721e8bd9df9cd50242232110c4a93e873@changeid
2 months agowifi: iwlwifi: mld: force the responder to use the full bandwidth
Avraham Stern [Wed, 30 Apr 2025 12:57:25 +0000 (15:57 +0300)]
wifi: iwlwifi: mld: force the responder to use the full bandwidth

When a soft AP is started, it may not use the full configured
bandwidth (e.g. if no station is connected). As a result, the
responder will not support the configured bandwidth. Since the
responder supports ranging with unassociated stations, there is
no indication to the driver when the full bandwidth should be enabled.
Fix it by configuring the AP to always use the full bandwidth when a
responder is supported.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.620fe8099fff.Id50675f4d4c524b0a7ee602c48af538a327010e0@changeid
2 months agowifi: iwlwifi: mld: start AP with the correct bandwidth
Avraham Stern [Wed, 30 Apr 2025 12:57:24 +0000 (15:57 +0300)]
wifi: iwlwifi: mld: start AP with the correct bandwidth

When a channel context is added, it is still not assigned to the link
and the link is not yet active. As a result, the channel context
min_def is used when the AP is started, even when the full bandwidth
should be used.
Fix it by updating the PHY channel context when the link is already
active so the full bandwidth is used when needed.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.30b043b10fb1.I62c2aa58687e4796b759fa68132122119a337b49@changeid
2 months agowifi: iwlwifi: mld: add monitor internal station
Daniel Gabay [Wed, 30 Apr 2025 12:57:23 +0000 (15:57 +0300)]
wifi: iwlwifi: mld: add monitor internal station

This is needed for TX injection over monitor interface.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.5ec460d3f1c2.Ic8456efb4cdd722dcd9c4910a1569ef9d3e4e066@changeid
2 months agowifi: iwlwifi: mld: support for COMPRESSED_BA_RES_API_S_VER_7
Emmanuel Grumbach [Wed, 30 Apr 2025 12:57:22 +0000 (15:57 +0300)]
wifi: iwlwifi: mld: support for COMPRESSED_BA_RES_API_S_VER_7

The rate format changed but since we don't use the rate, just claim
support for this new API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.c4be90e242ff.Ie8a0f0d6320613bd8c5cb6c82a063069fffa3b67@changeid
2 months agowifi: iwlwifi: mvm: support iwl_mac_power_cmd version 2
Miri Korenblit [Wed, 30 Apr 2025 12:57:21 +0000 (15:57 +0300)]
wifi: iwlwifi: mvm: support iwl_mac_power_cmd version 2

This version fixes the issue that was worked around by
iwl_mvm_smps_workaround. So for FWs with the new version don't do the
workaround, and set new bit added in this version when appropriate.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20250430155443.5c9a0181a84b.I9a03bc07a7b3f6e37cc1c0c1af5719e765a05897@changeid
2 months agowifi: iwlwifi: implement TOP reset
Johannes Berg [Wed, 30 Apr 2025 12:57:20 +0000 (15:57 +0300)]
wifi: iwlwifi: implement TOP reset

Implement TOP reset (new in the SC family), which resets much
of the (shared) hardware without resetting the bus interfaces.
Use it to recover from TOP fatal error, or if manually used;
we'll need to add using it for FSEQ updates later.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.12f38024a3b4.I9c22f6c4f6de64f3b34ccd898370ec1859ab7dbf@changeid
2 months agowifi: iwlwifi: mld: handle SW reset w/o NIC error
Johannes Berg [Wed, 30 Apr 2025 12:57:19 +0000 (15:57 +0300)]
wifi: iwlwifi: mld: handle SW reset w/o NIC error

For the upcoming TOP reset, the sw_reset() method may be
called without nic_error() before it. In this case, also
abort any still pending scans and set in_hw_restart.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.b732ff4e9f31.I3948c2d892f1ee82b3a6bf9f123be02a1eaa82e5@changeid
2 months agowifi: iwlwifi: mvm: support ROC command version 6
Miri Korenblit [Wed, 30 Apr 2025 12:57:18 +0000 (15:57 +0300)]
wifi: iwlwifi: mvm: support ROC command version 6

This was suppsed to be supported only in iwlmld, but turns out that it
will be needed also in iwlmvm. Add support for it.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20250430155443.d118ee63aca4.I12ea349ca6587d8ea606f6ece4a9f3c0c2bb1494@changeid
2 months agowifi: iwlwifi: mld: support iwl_mac_power_cmd version 2
Miri Korenblit [Wed, 30 Apr 2025 12:57:17 +0000 (15:57 +0300)]
wifi: iwlwifi: mld: support iwl_mac_power_cmd version 2

This version fixes the issue that was worked around by
iwl_mld_smps_wa. So for FWs with the new version don't do the
workaround, and set new bit added in this version when appropriate.
While at it, rename iwl_mld_smps_wa to iwl_mld_smps_workaround.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20250430155443.77fdb18d1ee0.I93688612ac4f6ec99da9bc54bee16554ef40a40b@changeid
2 months agowifi: iwlwifi: add support for ALIVE v8
Emmanuel Grumbach [Wed, 30 Apr 2025 12:57:16 +0000 (15:57 +0300)]
wifi: iwlwifi: add support for ALIVE v8

The firmware added a field to describe the platform Id.
Just print it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.dc387ae36e0f.Iafd364c6b23749597b658015be97295ad0c1730d@changeid
2 months agowifi: iwlwifi: mld: add kunit test for emlsr with bt on
Somashekhar Puttagangaiah [Wed, 30 Apr 2025 12:57:15 +0000 (15:57 +0300)]
wifi: iwlwifi: mld: add kunit test for emlsr with bt on

add kunit test to validate entering and exiting
emlsr scenarios when the bt is on with certain
penalty on wifi.

Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430155443.6621494fa412.If89b4b2dab308d825ca02284dd8e0030675d7af5@changeid
2 months agowifi: iwlwifi: fw: support PPAG command version 7
Pagadala Yesu Anjaneyulu [Wed, 30 Apr 2025 12:23:20 +0000 (15:23 +0300)]
wifi: iwlwifi: fw: support PPAG command version 7

PPAG command version 7 will send exact data read from BIOS to
firmware without filtering/altering BIOS data. This enables the
driver to become purely a pipe for this feature.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.88ed7b2cadef.Iad78f6cec617d1f111b704352795dde81af71a99@changeid
2 months agowifi: iwlwifi: fw: support reading PPAG BIOS table revision 4
Pagadala Yesu Anjaneyulu [Wed, 30 Apr 2025 12:23:19 +0000 (15:23 +0300)]
wifi: iwlwifi: fw: support reading PPAG BIOS table revision 4

PPAG revision 4 data has more supported bits than supported in
version 6 of PPAG command. So, adjust by masking accordingly to
firmware acceptance.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.f1cb31f9f6ab.I56d6887866f76fd02b2cd298e3de1189c6d3890e@changeid