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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Pagadala Yesu Anjaneyulu [Wed, 30 Apr 2025 12:23:18 +0000 (15:23 +0300)]
wifi: iwlwifi: rename ppag_ver to ppag_bios_rev
ppag_ver variable is holding PPAG BIOS revision but name misleading
as PPAG command API version, So rename to ppag_bios_rev.
This will improve code readability but doesn't alter behaviour.
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.be51850947df.If81d88cd2d38299faf1e2a3db5efbc021650f907@changeid
Miri Korenblit [Wed, 30 Apr 2025 12:23:17 +0000 (15:23 +0300)]
wifi: iwlwifi: mld: don't return an error if the FW is dead
If iwl_mld_change_vif_links failed to add the requested link(s)
because the FW is dead (error before recovery), there is no point
in returning an error value, as the reconfig will re-add the link(s)
after the FW is started.
Return 0 in that case, and WARN in the others.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250430151952.c549c72b1f37.I445bf723e9befc9541b4abd0ec7c72db8f1ff177@changeid
Miri Korenblit [Wed, 30 Apr 2025 12:23:16 +0000 (15:23 +0300)]
wifi: iwlwifi: mld: check for NULL before referencing a pointer
Errors can happen, and it is better not to risk with a NULL pointer
dereference.
Make sure that the links-to-remove pointers are not NULL before
dereferencing it.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250430151952.408652d45cda.I1bb72836dab17895a2e39910e4493d667db0fa80@changeid
Somashekhar Puttagangaiah [Wed, 30 Apr 2025 12:23:15 +0000 (15:23 +0300)]
wifi: iwlwifi: mld: allow EMLSR with 2.4 GHz when BT is ON
When BT is ON, EMLSR with one of the links operating on 2.4 GHz
is allowed only if it meets following conditions.
In this patch:
1. during link selection, when BT is ON, allow emlsr only if BT
pentalty is < 7%.
2. exit EMLSR if BT is turned ON and one of the links is operating
on 2.4 GHz with BT penalty > 7%
Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.d30212ec3901.I48e3d5bd6b0b8583f98057c38d2ee30fff5abd8a@changeid
Johannes Berg [Wed, 30 Apr 2025 12:23:14 +0000 (15:23 +0300)]
wifi: iwlwifi: implement TOP reset follower
For the upcoming SC hardware, a new reset mode "(silent) TOP
reset" will be available. When BT initiates that reset, it'll
negotiate with the WiFi firmware which makes it appear to the
driver as the reset interrupt. To distinguish it from all the
other reasons for the reset interrupt, there's (now) a status
field in CSR 0x110.
Implement the part of TOP reset where we react to BT doing it.
This requires disambiguating the interrupt, depending on the
state of the device, since we can even get TOP reset from BT
while waiting for the reset handshake.
If TOP reset is done by BT while we're not trying to do reset
anyway, then simply reprobe, since we cannot keep the state
of the device as it's being reset, after waiting the needed
180ms to let the device reset/settle.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.fb86bfbdca40.Ibe40bf54003e3f8929b671324a395e76eb64a4d8@changeid
Johannes Berg [Wed, 30 Apr 2025 12:23:12 +0000 (15:23 +0300)]
wifi: iwlwifi: avoid scheduling restart during restart
When a restart is in progress, it can be async due to the next
worker being scheduled in mac80211 (restart work) or the driver
itself (reprobe). Avoid scheduling another restart during this
period.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.db428503ec3c.I3f2be3d72a9d40cfb4e697cdab1cd2866a9262bc@changeid
Johannes Berg [Wed, 30 Apr 2025 12:23:11 +0000 (15:23 +0300)]
wifi: iwlwifi: mld: tests: extend link pair tests
Generalize and extend the link pair tests to not just do
channel load checks, but generally check link pairs. To
enable more accurate checking, return the reasons bitmap
from iwl_mld_valid_emlsr_pair() and therefore rename it
to iwl_mld_emlsr_pair_state.
It's also necessary now to add more chandefs, and while
doing so fix the existing ones to be valid and add a
test to check they really are valid.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.1f7c4ac75c6d.I69d68359e02d99632e95daba3d126115dce167b3@changeid
Johannes Berg [Wed, 30 Apr 2025 12:23:10 +0000 (15:23 +0300)]
wifi: iwlwifi: mld: refactor tests to use chandefs
Instead of building invalid chandefs on the fly, use only
chandefs throughout and ensure those are valid. Also add
more chandefs that will be needed for new tests.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.6643fa8773f1.I644e9053d222a772e1d109799c4bfa0677add4d7@changeid
Miri Korenblit [Wed, 30 Apr 2025 12:23:09 +0000 (15:23 +0300)]
wifi: iwlwifi: mld: send the WPFC table to the FW
Read the table on op mode start, and send it to the FW when it is
loaded.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.e349a33cd871.Ied196cf0fbe18b82b87ce713c4e3347f9aca1c25@changeid
Miri Korenblit [Wed, 30 Apr 2025 12:23:08 +0000 (15:23 +0300)]
wifi: iwlwifi: read WPFC also from UEFI
We are currently reading it only from ACPI, but we need to read it from
UEFI too (if exists, and if the UEFI variables are locked)
Add the reading from the UEFI and use IWL_BIOS_TABLE_LOADER to generate
the code that determines the source from which the table should be read
(ACPI/UEFI).
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250430151952.839a5e7dd89b.I491acbf68047874df97b3971f1ba692ebc998a52@changeid
Miri Korenblit [Wed, 30 Apr 2025 12:23:07 +0000 (15:23 +0300)]
wifi: iwlwifi: prepare for reading WPFC from UEFI
IWL_BIOS_TABLE_LOADER generates the code that determines from what source
to read a BIOS table (ACPI or UEFI).
As we want to read WPFC from UEFI to, iwl_acpi_get_phy_filters needs to
have the prototype that is required by this macro:
receive fwrt and return a int on success/failure.
Do that.
This allowes us to make to version of iwl_acpi_get_phy_filters for non
ACPI builds back to an iniline function.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Link: https://patch.msgid.link/20250430151952.8046a2db775b.Ifbcf4168183d3cd635e3e800ec7ecd903e57d361@changeid
Jeff Johnson [Wed, 19 Mar 2025 14:37:37 +0000 (07:37 -0700)]
wifi: iwlwifi: Add short description to enum iwl_power_scheme
The kernel-doc script flagged the following:
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:130: warning: missing initial short description on line:
* enum iwl_power_scheme
1 warnings as Errors
Add a short description to address this warning.
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250319-iwl_power_scheme-kdoc-v1-1-2033ae38b178@oss.qualcomm.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Johannes Berg [Fri, 25 Apr 2025 09:59:08 +0000 (11:59 +0200)]
Revert "wifi: iwlwifi: clean up config macro"
This reverts commit
b6abf63ed7719f6dc1f7e36375b970126e29e709.
This is causing major merge conflicts with the changes in
wireless, where we reverted some changes. Revert this for
now to avoid having to solve that problem. We can redo it
on top of wireless-next with wireless merged back later.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Miri Korenblit [Thu, 24 Apr 2025 12:38:31 +0000 (15:38 +0300)]
wifi: iwlwifi: move phy_filters to fw_runtime
phy_filters holds the values as read from WFPC BIOS table.
Since also iwlmld is going to need it, move it to fw_runtime.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20250424153620.357baa65950a.I01d22328b4c381d4c0064ad9bd36750911157f90@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Miri Korenblit [Thu, 24 Apr 2025 12:38:30 +0000 (15:38 +0300)]
wifi: iwlwifi: pcie: make sure to lock rxq->read
rxq->read is accessed without the rxq->lock in a few places,
Make sure to have the lock there.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20250424153620.73725f207aaa.I1a3e4b6c5fd370e029fdacfcdc9ee335788afa98@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Miri Korenblit [Thu, 24 Apr 2025 12:38:29 +0000 (15:38 +0300)]
wifi: iwlwifi: add definitions for iwl_mac_power_cmd version 2
This version has a new flag bit that indicates whether or not SMPS is
allowed for the MAC.
This only adds the API, the actual support will be done in other
patches.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20250424153620.991ff01b8d16.Id0aa4061d7926753b03a13bf94ec1ac9e1d18745@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:28 +0000 (15:38 +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/20250424153620.877b65b940b5.Ic3a40afcd182b6e1802bb8f8a1a845b20608e328@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:27 +0000 (15:38 +0300)]
wifi: iwlwifi: mld: simplify iwl_mld_rx_fill_status()
Move some code that's only done when having received data out
of iwl_mld_rx_fill_status() and remove the two arguments that
are related to that. This simplifies the function for the no-
data case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250424153620.77010d6a6694.I2fd06b073460717d324245482110cb0381218526@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:26 +0000 (15:38 +0300)]
wifi: iwlwifi: mld: rx: simplify channel handling
There's no need to have the channel in phy_data, this
code only supports one descriptor format so can use
it directly from there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250424153620.409c2f4ecbcc.I1735cd773ed07ad9fae44bdfc46261fa9a8fd0e0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:25 +0000 (15:38 +0300)]
wifi: iwlwifi: clean up band in RX metadata
Use u8_get_bits() instead of open-coding, and adjust the
name as well. Also don't use enum nl80211_band for the
variable holding an entirely different 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/20250424153620.c41058510800.Ic3f16ce2f0c991fde2cfe7bcd58ee3b875575fce@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:24 +0000 (15:38 +0300)]
wifi: iwlwifi: mld: skip unknown FW channel load values
The firmware statistics were previously reporting bogus/old
channel load values if the device hadn't been active on a
given channel; it'll report an unknown value now for those
statistics affected (channel_load and channel_load_not_by_us.)
Handle that by simply skipping the value, the averaging would
result in the exact same value as before.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250424153620.db5410318642.I4d2981f68b915ad335bb02c926e9289c2a60ea6c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:23 +0000 (15:38 +0300)]
wifi: iwlwifi: define API for external FSEQ images
The firmware will support external FSEQ images, define the
necessary API for that. We're not yet using/shipping such,
so don't add code to load them for now.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250424153620.4f5acc3dff6c.Ic559d90376945c78495352a0d24b1d44ef887f2d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:22 +0000 (15:38 +0300)]
wifi: iwlwifi: mld: allow EMLSR on separated 5 GHz subbands
If there are two links on 5 GHz subbands that are separated
enough (using channels 36-64 and 100+) then we can support
EMLSR across those two links. Allow that in the logic.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250424153620.d568a26661d5.Ie4277945272c5bbf637957704fda34ea03ef28d2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:21 +0000 (15:38 +0300)]
wifi: iwlwifi: mld: use cfg80211_chandef_get_width()
We can use this helper now to simplify some code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250424153620.586e12d3d07c.Idc27c446d00a7f7925ee76b356f53b72dafc5745@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:20 +0000 (15:38 +0300)]
wifi: iwlwifi: mld: fix iwl_mld_emlsr_disallowed_with_link() return
The return type of iwl_mld_emlsr_disallowed_with_link() is a u32
bitmap of exit reasons, but in the data structure confusion case
where the warning triggers, it returns false. Add a new reason
bit for this case so it doesn't return that EMLSR is possible.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250424153620.d1f8465e2b5e.I58c463c70801231a79b04c1ff600f41afcbb04f5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Apr 2025 12:38:19 +0000 (15:38 +0300)]
wifi: iwlwifi: mld: clarify variable type
In iwl_mld_emlsr_disallowed_with_link() the code uses an
enum for a bitmap of values from it, which doesn't really
make sense.Use u32 for the variable just like the return
value.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250424153620.ddf54a728ec0.Ie2e8de150f67369c4e034452c5f1a15f85d2931c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Thu, 24 Apr 2025 12:38:18 +0000 (15:38 +0300)]
wifi: iwlwifi: pcie: add support for the reset handshake in MSI
Add the proper case in the MSI interrupt handler and read the non-MSIx
interrupt cause register in case of timeout.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250424153620.758cdfbb78dc.Ia359071e6148218c26f18e783a8130c681d77df7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Edward Adam Davis [Wed, 23 Apr 2025 14:15:53 +0000 (22:15 +0800)]
wifi: mac80211_hwsim: Prevent tsf from setting if beacon is disabled
Setting tsf is meaningless if beacon is disabled, so check that beacon
is enabled before setting tsf.
Reported-by: syzbot+064815c6cd721082a52a@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=
064815c6cd721082a52a
Tested-by: syzbot+064815c6cd721082a52a@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Link: https://patch.msgid.link/tencent_3609AC2EFAAED68CA5A7E3C6D212D1C67806@qq.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 25 Apr 2025 09:22:01 +0000 (11:22 +0200)]
Merge tag 'ath-next-
20250418' of git://git./linux/kernel/git/ath/ath into wireless-next
Jeff Johnson says:
====================
ath.git patches for v6.16
ath12k:
Enable AHB support for IPQ5332.
Add monitor interface support to QCN9274.
Add MLO support to WCN7850.
Add 802.11d scan offload support to WCN7850.
ath11k:
Restore hibernation support
In addition, perform the usual set of bug fixes and cleanups across
all supported drivers.
====================
Change-Id: I6555e64d7434f3a5fed5faab25057be93106b18e
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Rameshkumar Sundaram [Tue, 8 Apr 2025 18:45:00 +0000 (11:45 -0700)]
wifi: mac80211: restructure tx profile retrieval for MLO MBSSID
For MBSSID, each vif (struct ieee80211_vif) stores another vif
pointer for the transmitting profile of MBSSID set. This won't
suffice for MLO as there may be multiple links, each of which can
be part of different MBSSID sets. Hence the information needs to
be stored per-link. Additionally, the transmitted profile itself
may be part of an MLD hence storing vif will not suffice either.
Fix MLO by storing an instance of struct ieee80211_bss_conf
for each link.
Modify following operations to reflect the above structure updates:
- channel switch completion
- BSS color change completion
- Removing nontransmitted links in ieee80211_stop_mbssid()
- drivers retrieving the transmitted link for beacon templates.
Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Co-developed-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Co-developed-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
Link: https://patch.msgid.link/20250408184501.3715887-3-aloka.dixit@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Rameshkumar Sundaram [Tue, 8 Apr 2025 18:44:59 +0000 (11:44 -0700)]
wifi: nl80211: add link id of transmitted profile for MLO MBSSID
During non-transmitted (nontx) profile configuration, interface
index of the transmitted (tx) profile is used to retrieve the
wireless device (wdev) associated with it. With MLO, this 'wdev'
may be part of an MLD with more than one link, hence only
interface index is not sufficient anymore to retrieve the correct
tx profile. Add a new attribute to configure link id of tx profile.
Signed-off-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Co-developed-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Co-developed-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com>
Link: https://patch.msgid.link/20250408184501.3715887-2-aloka.dixit@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Rameshkumar Sundaram [Thu, 27 Mar 2025 05:13:19 +0000 (10:43 +0530)]
wifi: ieee80211: Add helpers to fetch EMLSR delay and timeout values
Add helpers to get EMLSR transition delay, padding delay and transition
timeout values from EML capabilities field of Multi-link Element.
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Link: https://patch.msgid.link/20250327051320.3253783-4-quic_ramess@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ramasamy Kaliappan [Thu, 27 Mar 2025 05:13:18 +0000 (10:43 +0530)]
wifi: mac80211: update ML STA with EML capabilities
When an AP and Non-AP MLD operates in EMLSR mode, EML capabilities
advertised during Association contains information such as EMLSR
transition delay, padding delay and transition timeout values.
Save the EML capabilities information that is received during station
addition and capabilities update in ieee80211_sta so that drivers can use
it for triggering EMLSR operation.
Signed-off-by: Ramasamy Kaliappan <quic_rkaliapp@quicinc.com>
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Link: https://patch.msgid.link/20250327051320.3253783-3-quic_ramess@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ramasamy Kaliappan [Thu, 27 Mar 2025 05:13:17 +0000 (10:43 +0530)]
wifi: cfg80211: Add support to get EMLSR capabilities of non-AP MLD
The Enhanced multi-link single-radio (EMLSR) operation allows a non-AP MLD
with multiple receive chains to listen on one or more EMLSR links when the
corresponding non-AP STA(s) affiliated with the non-AP MLD is (are) in
the awake state. [IEEE 802.11be-2024, (35.3.17 Enhanced multi-link
single-radio (EMLSR) operation)]
An MLD which intends to enable EMLSR operations will set the EML
Capabilities Present subfield to 1 and shall set the EMLSR Support
subfield in the Common Info field of the Basic Multi-Link element to 1 in
all Management frames that include the Basic Multi-Link element except
Authentication frames. EML capabilities contains information such as
EML Transition timeout, Padding delay and Transition delay. These fields
needs to updated to drivers to trigger EMLSR operation and to transmit and
receive initial control frame and data frames.
Add support to receive EML Capabilities subfield that non-AP MLD
advertises during (re)association request and send it to underlying
drivers during ADD/SET station.
Signed-off-by: Ramasamy Kaliappan <quic_rkaliapp@quicinc.com>
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Link: https://patch.msgid.link/20250327051320.3253783-2-quic_ramess@quicinc.com
[accept EMLSR capabilities only for unassoc AP STA]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Muna Sinada [Tue, 25 Mar 2025 21:31:25 +0000 (14:31 -0700)]
wifi: mac80211: VLAN traffic in multicast path
Currently for MLO, sending out multicast frames on each link is handled by
mac80211 only when IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX flag is not set.
Dynamic VLAN multicast traffic utilizes software encryption.
Due to this, mac80211 should handle transmitting multicast frames on
all links for multicast VLAN traffic.
Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Link: https://patch.msgid.link/20250325213125.1509362-4-muna.sinada@oss.qualcomm.com
[remove unnecessary parentheses]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Muna Sinada [Tue, 25 Mar 2025 21:31:24 +0000 (14:31 -0700)]
wifi: mac80211: Create separate links for VLAN interfaces
Currently, MLD links for an AP_VLAN interface type is not fully
supported.
Add allocation of separate links for each VLAN interface and copy
chanctx and chandef of AP bss to VLAN where necessary. Separate
links are created because for Dynamic VLAN each link will have its own
default_multicast_key.
Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Link: https://patch.msgid.link/20250325213125.1509362-3-muna.sinada@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Muna Sinada [Tue, 25 Mar 2025 21:31:23 +0000 (14:31 -0700)]
wifi: mac80211: Add link iteration macro for link data
Currently before iterating through valid links we are utilizing
open-coding when checking if vif valid_links is a non-zero value.
Add new macro, for_each_link_data(), which iterates through link_id
and checks if it is set on vif valid_links. If it is a valid link then
access link data for that link id.
Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Link: https://patch.msgid.link/20250325213125.1509362-2-muna.sinada@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sascha Hauer [Wed, 23 Apr 2025 08:21:05 +0000 (10:21 +0200)]
wifi: mwifiex: remove mwifiex_sta_init_cmd() last argument
The init argument from mwifiex_sta_init_cmd() is no longer used. Drop
it.
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://patch.msgid.link/20250423-mwifiex-drop-asynchronous-init-v2-4-1bb951073a06@pengutronix.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>