linux-block.git
2 months agowifi: iwlwifi: cfg: fix some device names
Johannes Berg [Sat, 10 May 2025 18:48:16 +0000 (21:48 +0300)]
wifi: iwlwifi: cfg: fix some device names

Officially, the device names have dashes ("Wireless-N"),
so add them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250510214621.4f7bbd57680f.Ida19b5e696723db5839c13341d6ca7085e8c2568@changeid
2 months agowifi: iwlwifi: cfg: remove some unused names
Johannes Berg [Sat, 10 May 2025 18:48:15 +0000 (21:48 +0300)]
wifi: iwlwifi: cfg: remove some unused names

There are a couple of old names that don't actually get used.
Remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250510214621.1ed5fc197ba0.I52d7bb49db24523ad93ad83a89c8e846d9a43241@changeid
2 months agowifi: iwlwifi: mld: add debug log instead of warning
Somashekhar Puttagangaiah [Sat, 10 May 2025 18:48:14 +0000 (21:48 +0300)]
wifi: iwlwifi: mld: add debug log instead of warning

During link selection if the links does not meet the valid grade
criteria then add debug log instead of warning.

Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250510214621.2593268ca988.I9786126cd1078caec8587b166a7f8735300c951d@changeid
2 months agowifi: iwlwifi: dbg: fix dump trigger split check
Johannes Berg [Sat, 10 May 2025 18:48:13 +0000 (21:48 +0300)]
wifi: iwlwifi: dbg: fix dump trigger split check

Evidently, I confused the fields here, apply_policy should
be checked for IWL_FW_INI_APPLY_POLICY_SPLIT_DUMP_RESET.
Fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Eilon Rinat <eilon.rinat@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250510214621.c802d5cc1312.I0cf5d74f91349499ab35eef0ebdc604961e492ef@changeid
2 months agowifi: iwlwifi: mvm/mld: allow puncturing use in 5 GHz
Johannes Berg [Fri, 9 May 2025 10:44:53 +0000 (13:44 +0300)]
wifi: iwlwifi: mvm/mld: allow puncturing use in 5 GHz

It was decided this was supported after all, so remove
the restriction.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-15-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: add support for ROC on BSS
Pagadala Yesu Anjaneyulu [Fri, 9 May 2025 10:44:52 +0000 (13:44 +0300)]
wifi: iwlwifi: mld: add support for ROC on BSS

add support for remain on channel on BSS vif for iwlmld.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-14-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: Block EMLSR only when ready to enter ROC
Pagadala Yesu Anjaneyulu [Fri, 9 May 2025 10:44:51 +0000 (13:44 +0300)]
wifi: iwlwifi: mld: Block EMLSR only when ready to enter ROC

If one of the stages in starting a ROC failed,
the ROC will not start nor end so EMLSR will stay blocked forever.

Block EMLSR once all ROC conditions are validated and
clear EMLSR blocked reasons in mld_vif cleanup.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-13-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: move aux_sta member from iwl_mld_link to iwl_mld_vif
Pagadala Yesu Anjaneyulu [Fri, 9 May 2025 10:44:50 +0000 (13:44 +0300)]
wifi: iwlwifi: mld: move aux_sta member from iwl_mld_link to iwl_mld_vif

This change reflects the correct ownership of aux_sta,
as it is not a property of the link but rather of the virtual interface.
Updated the initialization, cleanup and access logic for the aux_sta member
to align with its new location within iwl_mld_vif.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-12-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: Fix ROC activity cleanup in iwl_mld_vif
Pagadala Yesu Anjaneyulu [Fri, 9 May 2025 10:44:49 +0000 (13:44 +0300)]
wifi: iwlwifi: mld: Fix ROC activity cleanup in iwl_mld_vif

The roc_activity member in the iwl_mld_vif structure was previously
set to zero during cleanup as was present in struct_group, which
incorrectly indicated ROC_ACTIVITY_HOTSPOT.
To fix this issue, remove roc_activity member from struct_group.
Notify mac80211 of ROC expiration during vif cleanup to maintain
synchronization between the driver and mac80211.
While on it, update it's type to enum iwl_roc_activity.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-11-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: Correct comments for cleanup functions
Pagadala Yesu Anjaneyulu [Fri, 9 May 2025 10:44:48 +0000 (13:44 +0300)]
wifi: iwlwifi: mld: Correct comments for cleanup functions

Update comments to accurately reflect the purpose of the
iwl_mld_cleanup_link and iwl_cleanup_mld functions.

Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-10-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: rename iwl_cfg to iwl_rf_cfg
Johannes Berg [Fri, 9 May 2025 10:44:47 +0000 (13:44 +0300)]
wifi: iwlwifi: rename iwl_cfg to iwl_rf_cfg

With all the cleanups now, we can rename the structure to
better indicate the functionality. For older devices this
isn't quite accurate, of course, but it's better to have a
name that reflects future use for maintenance.

Add some kernel-doc while at it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-9-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: clean up Sc/Dr/Br configs
Johannes Berg [Fri, 9 May 2025 10:44:46 +0000 (13:44 +0300)]
wifi: iwlwifi: cfg: clean up Sc/Dr/Br configs

For now, the WH and PE radios require the same config as
FM, so just add a #define for those instead of copying
the data. Since this is true, Sc/Dr/Br all used the same
configs for all RF types, but that's confusing, so now
use the defined WH/PE names for the correct combinations.

We can also now enable the unit test that ensures we have
no duplicate RF configs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-8-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: add FM RF config
Johannes Berg [Fri, 9 May 2025 10:44:45 +0000 (13:44 +0300)]
wifi: iwlwifi: cfg: add FM RF config

The Bz configs really should be FM for the RF, so
move that around.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-7-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: add GF RF config
Johannes Berg [Fri, 9 May 2025 10:44:44 +0000 (13:44 +0300)]
wifi: iwlwifi: cfg: add GF RF config

This is equivalent to just the previous iwl_cfg_ma, but
really should also be used for Bz/Gf and Sc/Gf, instead
of those using EHT sizes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-6-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: unify HR configs
Johannes Berg [Fri, 9 May 2025 10:44:43 +0000 (13:44 +0300)]
wifi: iwlwifi: cfg: unify HR configs

Unify the HR configs to just one HR RF config. All the fields
were the same already, so this doesn't do anything.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-5-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: unify JF configs
Johannes Berg [Fri, 9 May 2025 10:44:42 +0000 (13:44 +0300)]
wifi: iwlwifi: cfg: unify JF configs

Unify the JF configs to just one JF RF config. This can be
done because the differing fields (thermal and DCCM offsets)
won't be used for Qu MACs (and up) due to firmware support.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-4-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: unify num_rbds config
Johannes Berg [Fri, 9 May 2025 10:44:41 +0000 (13:44 +0300)]
wifi: iwlwifi: cfg: unify num_rbds config

This should depend on both the RF (VHT/HE/EHT support) and
the MAC (<=22000 can put multiple frames into one buffer),
so unify the config in the struct iwl_cfg to just have it
sized according to the RF, and then double it for all the
MACs starting from AX210 (So/Ty).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-3-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: add ucode API min/max to MAC config
Johannes Berg [Fri, 9 May 2025 10:44:40 +0000 (13:44 +0300)]
wifi: iwlwifi: cfg: add ucode API min/max to MAC config

In some older devices, the min/max firmware API supported by
the driver depends on the specific device, when sharing the
the same MAC (config). For most newer devices, it really is
dependent on the MAC instead, since the firmware was frozen
for certain MAC types. However, in the future we expect also
freezes for RF types there.

To handle this most generally, add an API min/max to the MAC
config and then use the narrowest range prescribed by both,
if set.

For the newer MACs since 9000, move the configuration, there
was only a freeze on MAC+RF lines so far.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-2-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: remove unused high_temp from iwl_cfg
Johannes Berg [Thu, 8 May 2025 12:13:06 +0000 (15:13 +0300)]
wifi: iwlwifi: remove unused high_temp from iwl_cfg

This value is never read, so it's not needed. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-16-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: move MAC parameters to MAC data
Johannes Berg [Thu, 8 May 2025 12:13:05 +0000 (15:13 +0300)]
wifi: iwlwifi: cfg: move MAC parameters to MAC data

There are a number of MAC parameters that are in the iwl_cfg
(which is the last config matched to the MAC/RF combination).
This isn't necessary, there are many more of those than MACs,
so move (most of) the data into the MAC family config struct.

Note that DCCM information remains for use by older devices,
and on 9000 series it'll be in struct iwl_cfg but be ignored
when the CRF is in a Qu/So platform.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-15-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: remove DCCM offsets from new devices
Johannes Berg [Thu, 8 May 2025 12:13:04 +0000 (15:13 +0300)]
wifi: iwlwifi: cfg: remove DCCM offsets from new devices

This is only used with old-style debug dump, which isn't
supported on newer devices, so remove the data.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-14-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: remove eeprom_size from new devices
Johannes Berg [Thu, 8 May 2025 12:13:03 +0000 (15:13 +0300)]
wifi: iwlwifi: cfg: remove eeprom_size from new devices

Since 22000 series, the data is read by the firmware and the
driver doesn't need to know, remove the useless setting.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-13-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: rename struct iwl_base_params
Johannes Berg [Thu, 8 May 2025 12:13:02 +0000 (15:13 +0300)]
wifi: iwlwifi: rename struct iwl_base_params

These are (going to be) base MAC parameters that are identical
even for different platforms with the same MAC, so rename the
structure accordingly, calling it iwl_family_base_params.

Also rename the pointer to it so the dereferencing is a bit
shorter.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-12-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: remove rf_id field
Johannes Berg [Thu, 8 May 2025 12:13:01 +0000 (15:13 +0300)]
wifi: iwlwifi: cfg: remove rf_id field

This field is always set for >= 9000 series, but then we
already check that, so it's not needed. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-11-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: remove dbgc_supported field
Johannes Berg [Thu, 8 May 2025 12:13:00 +0000 (15:13 +0300)]
wifi: iwlwifi: cfg: remove dbgc_supported field

This field is unused, remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-10-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: rename cfg_trans_params to mac_cfg
Johannes Berg [Thu, 8 May 2025 12:12:59 +0000 (15:12 +0300)]
wifi: iwlwifi: rename cfg_trans_params to mac_cfg

Since 9000 series devices, the devices are split into MAC and
CRF parts. Currently, "struct iwl_cfg" reflects some MAC and
some RF parameters, but we want to clean this up and move the
MAC data to what's now "struct iwl_cfg_trans_params". As the
first step, to reflect the intent, rename this structure.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-9-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: pass trans to iwl_parse_nvm_mcc_info()
Johannes Berg [Thu, 8 May 2025 12:12:58 +0000 (15:12 +0300)]
wifi: iwlwifi: pass trans to iwl_parse_nvm_mcc_info()

There's no need to pass various different pointers when
the transport is already established, so just pass that
instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-8-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: remove nvm_hw_section_num from new devices
Johannes Berg [Thu, 8 May 2025 12:12:57 +0000 (15:12 +0300)]
wifi: iwlwifi: cfg: remove nvm_hw_section_num from new devices

This value hasn't been used since unified firmware in 22000
series, so there's no need to set the value for that or
newer devices. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-7-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: handle cc firmware dynamically
Johannes Berg [Thu, 8 May 2025 12:12:56 +0000 (15:12 +0300)]
wifi: iwlwifi: cfg: handle cc firmware dynamically

Instead of using fw_name_pre, handle the cc firmware file
name specially in iwl_drv_get_fwname_pre() for the cc MAC
type.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-6-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: build ax210 family FW names dynamically
Johannes Berg [Thu, 8 May 2025 12:12:55 +0000 (15:12 +0300)]
wifi: iwlwifi: cfg: build ax210 family FW names dynamically

Add support for the TY MAC (discrete device) and GF4 RF to
the list of MAC/RF types, and use that to remove fw_name_pre
for the ax210 family devices.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-5-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: remove 'cdb' value
Johannes Berg [Thu, 8 May 2025 12:12:54 +0000 (15:12 +0300)]
wifi: iwlwifi: cfg: remove 'cdb' value

This is never used, so remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-4-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: remove QuZ/JF special cases
Johannes Berg [Thu, 8 May 2025 12:12:53 +0000 (15:12 +0300)]
wifi: iwlwifi: cfg: remove QuZ/JF special cases

Since JF RF always uses b0 step and QuZ MAC always uses
a0 step for firmware, there's no need for these configs
that just force the steps to those values. Remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-3-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: build 9000 series FW filenames dynamically
Johannes Berg [Thu, 8 May 2025 12:12:52 +0000 (15:12 +0300)]
wifi: iwlwifi: build 9000 series FW filenames dynamically

This is more maintainable than the fw_name_pre prefix, and
requires fewer duplicate structs as well. Since only b0 FW
exists, override the MAC/RF steps for these devices.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250508121306.1277801-2-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: add JF1/JF2 RF for dynamic FW building
Johannes Berg [Tue, 6 May 2025 19:41:02 +0000 (22:41 +0300)]
wifi: iwlwifi: add JF1/JF2 RF for dynamic FW building

This is needed, otherwise we don't know what to do and will
not find the correct firmware.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-16-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: pcie: remove 0x2726 devices
Johannes Berg [Tue, 6 May 2025 19:41:01 +0000 (22:41 +0300)]
wifi: iwlwifi: pcie: remove 0x2726 devices

These are test chips, not available to users, and not even listed
in the PCI IDs table (so the driver won't bind them). There's no
reason to list specific devices with them in the driver.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-15-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: inline HT params
Johannes Berg [Tue, 6 May 2025 19:41:00 +0000 (22:41 +0300)]
wifi: iwlwifi: cfg: inline HT params

With just a handful of values in two bytes, the params are
smaller than the pointer to them. Inline them and save some
space.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-14-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: cfg: remove 6 GHz from ht40_bands
Johannes Berg [Tue, 6 May 2025 19:40:59 +0000 (22:40 +0300)]
wifi: iwlwifi: cfg: remove 6 GHz from ht40_bands

Since there's no HT on 6 GHz, only HE, the HT capabilities
are never initialized, and so the ht40_bands value is never
checked for the 6 GHz band. Remove the misleading value.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-13-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2 months agowifi: iwlwifi: mld: call thermal exit without wiphy lock held
Benjamin Berg [Tue, 6 May 2025 19:40:58 +0000 (22:40 +0300)]
wifi: iwlwifi: mld: call thermal exit without wiphy lock held

The driver must not hold the wiphy mutex when unregistering the thermal
devices. Do not hold the lock for the call to iwl_mld_thermal_exit and
only do a lock/unlock to cancel the ct_kill_exit_wk work.

The problem is that iwl_mld_tzone_get_temp needs to take the wiphy lock
while the thermal code is holding its own locks already. When
unregistering the device, the reverse would happen as the driver was
calling thermal_cooling_device_unregister with the wiphy mutex already
held.

It is not likely to trigger this deadlock as it can only happen if the
thermal code is polling the temperature while the driver is being
unloaded. However, lockdep reported it so fix it.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-12-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
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