Commit Graph

200 Commits (09cfd3c52ea76f43b3cb15e570aeddf633d65e80)

Author SHA1 Message Date
Miri Korenblit bc4a45f8da wifi: iwlwifi: mld: CHANNEL_SURVEY_NOTIF is always supported
This notification is supported in FW since API 100.
Since we don't support any API older than that, we don't need to check
whether the notification is supported.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.b43f7da0d63b.I7386aeef5fae70dc4b0901cfb650eeaecb4c1575@changeid
2025-09-09 12:08:34 +03:00
Miri Korenblit 9a8a37c14f wifi: iwlwifi: mld: remove support of iwl_esr_mode_notif version 1
The last FW API that supports version 5 is 99. Since this API is no
longer supported on any device that loads iwlmld, we can remove support
of it.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.e15a7fa15c70.Ibb8636e826136c8c31931e77f5ffa853372b4301@changeid
2025-09-09 12:08:34 +03:00
Miri Korenblit 79c0faefef wifi: iwlwifi: mld: remove support from of sta cmd version 1
The last FW API that supports version 1 is 99. Since this API is no
longer supported on any device that loads iwlmld, we can remove support
of it.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.4d6689d5c4b2.I5d2bf7302eea8ac7a805f58e4e60e527d6f5b346@changeid
2025-09-09 12:08:34 +03:00
Miri Korenblit 9175f32e3f wifi: iwlwifi: mld: remove support of roc cmd version 5
The last FW API that supports version 5 is 97. Since this API is no
longer supported on any device that loads iwlmld, we can remove support
of it.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.e53bd8553360.I6978c216b52b818b879d076a85c5f9edafcf2e99@changeid
2025-09-09 12:08:34 +03:00
Miri Korenblit d243f5c112 wifi: iwlwifi: mld: remove support of mac cmd ver 2
The last FW API that supported ver 2 is API 99 (core 96)
Since we no longer support it in any device that loads iwlmld, we can
remove support of it.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.a56bf370d31a.Ie1e93654ce9ee52e6ae3fda9bc898d611456ec41@changeid
2025-09-09 12:08:34 +03:00
Miri Korenblit e5e8d86eb1 wifi: iwlwifi: mld: don't consider phy cmd version 5
It was planed that iwlmld will be loaded also for HR and GF, which has
versions < 6. But eventually it was decided to keep use iwlmvm for those
devices, so iwlmld doesn't need to support those versions.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.42501c7b0baa.I207ff53d259cc90781a0082320e2646b35925e5f@changeid
2025-09-09 12:08:34 +03:00
Rotem Kerem 639401f629 wifi: iwlwifi: implement wowlan status notification API update
Add per key status indication in the WOWLAN status notification.
This update is required for fips. Each key entry now
includes a status field.

Keys are now processed as follows:
0: no key, ignore entry
1: old, use only metadata
2: new, use key material and metadata

While at it, fix tid_offloaded_tx error message to print the
actual variable being validated in iwl_mld_handle_wowlan_info_notif.

Signed-off-by: Rotem Kerem <rotem.kerem@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.0a2e7a62504c.Id195c9c83f9f767d1e3e458468af2d933774daa1@changeid
2025-09-09 12:08:34 +03:00
Rotem Kerem b7a962584f wifi: iwlwifi: replace SUPPRESS_CMD_ERROR_ONCE status bit with a boolean
Convert STATUS_SUPPRESS_CMD_ERROR_ONCE from a status bit to a simple
bool field in struct iwl_trans, as atomicity is not needed.

Signed-off-by: Rotem Kerem <rotem.kerem@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.b33366c11a45.I75aac05afd8c4d8ef217d03327c1a027d6e7667e@changeid
2025-09-09 12:08:34 +03:00
Rotem Kerem 728d92a341 wifi: iwlwifi: add STATUS_FW_ERROR API
Add iwl_trans_notify_fw_error() and iwl_trans_is_fw_error() for use by
op modes. These helpers provide a clean interface for marking and
checking firmware error state. This hides the trans internal
implementation details from callers.

Signed-off-by: Rotem Kerem <rotem.kerem@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250909061931.23f5160b3265.Iba325ffa4c6c6f7fc3a702fb6c1827b0857d0db3@changeid
2025-09-09 12:08:34 +03:00
Miaoqian Lin ff46e2e703 wifi: iwlwifi: Fix dentry reference leak in iwl_mld_add_link_debugfs
The debugfs_lookup() function increases the dentry reference count.
Add missing dput() call to release the reference when the "iwlmld"
directory already exists.

Fixes: d1e879ec60 ("wifi: iwlwifi: add iwlmld sub-driver")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://patch.msgid.link/20250902040955.2362472-1-linmq006@gmail.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
2025-09-07 09:41:35 +03:00
Miri Korenblit 8cab67474b wifi: iwlwifi: mld: remove a TODO
This was already done.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250828111032.c445b2fc8bce.Ic616d605a4d6f82122466f50022cd046d229de4e@changeid
2025-08-31 14:39:26 +03:00
Miri Korenblit 0755db9f26 wifi: iwlwifi: mld: make iwl_mld_rm_vif void
Unlike adding/allocating an object, destroying it should always
succeed. In addition, the return value of iwl_mld_rm_vif is not even
used.
Make it a void function.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250828111032.418e898e908d.I18cc8d6b55a4e468dd155a40089ebea7de70594c@changeid
2025-08-31 14:39:26 +03:00
Miri Korenblit 40f6e94d87 wifi: iwlwifi: mld: support TLC command version 5
A new version of the TLC command was added in order to support the new
MCSs intoduced in UHR, and an indication of ELR support.

To support the new MCSs, the new version will have MCS bitmaps
(ht_rates) of 32 bit and not 16 bit, as in the old version.

Change the code to populate the new version of the command,
and if the FW requires the old version, copy the content of the new version
structure to the old version structure.

Note that this doesn't actually set the new MCSs, this will come later.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250828111032.032a450cc279.Iecf6570c9fe11d8fbdc0718341ac92506b02d78c@changeid
2025-08-31 14:39:26 +03:00
Miri Korenblit 4b12516640 wifi: iwlwifi: mld: don't modify trans state where not needed
In suspend and resume flows, if we had any error we set the transport state to
'FW_ERROR' This was done to avoid sending commands when we shouldn't.

In the mentioned flows, we can have a few types of errors:
1. logic errors
2. FW is in error state (can't send commands)
3. FW is misbehaving
4. D3 handshake error

In the first, we can still talk to the firmware.
In the second - the transport already knows about the FW error, no need to tell it.
In the third - we need to treat it as any other FW misbehaviour. There is no reason
to have a special handling here.

So we only need it for the last type. Change the code to set the
tansport state to FW error only in case of a d3 handshake error.

While at it, add a comment explaining why the opmode sets the FW error
bits.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.44c74ac0eb2a.Ic7369e622d908684f9b25ffc293d14c167c26414@changeid
2025-08-28 09:56:42 +03:00
Miri Korenblit 49e58e9b0a wifi: iwlwifi: simplify iwl_trans_pcie_d3_resume
If iwl_trans_d3_resume succeeded but the hw requested a reset, this will
be indicated to the opmode via the iwl_d3_status parameter while the return
value will be 0.

But the opmode doesn't really care if the resume failed or if a restart
is required. It acts the same in both cases (beside different logs, but
this can be done in iwl_trans_pcie_d3_resume)

This complicates the code for no good reason.

Change the iwl_trans_pcie_d3_resume to return an error value also in the
case that everything went successfully but a restart is required,
and add more logs so we can differentiate between the cases.

This makes iwl_d3_status redundant. Remove it as well.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.5fa2d909c75d.Ida19d8d8d73eddf12b30f1d473ea675f415778b2@changeid
2025-08-28 09:56:42 +03:00
Miri Korenblit b2e4bccc55 wifi: iwlwifi: trans: remove d3 test code
This is no longer needed. Remove it.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.4742846b17ed.I08c70ac544364d68baae03f830b1e01ce702b06d@changeid
2025-08-28 09:56:42 +03:00
Miri Korenblit 6504e3f4c0 wifi: iwlwifi: remove dump file name extension support
The options to configure a dump file name extension was added for 2
cases:
1. if we dump because of a missed beacon, we added the mac id and type
   to the filename.
2. to add the error id of the LMAC/UMAC/TCM/RCM error id to the file
   name.

For 1, there is a bug: in cases in which missed beacon will not trigger
a dump (for example in the default preset), and a missed beacon occurred,
and eventually there is a dump for a different reason,
the dump file name will contain the mac type and id even thought the
dump has nothing to do with a missed beacon.

Anyway, both cases are no longer required. Remove the code.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.d97f93fd1147.I7d0b056b6f9c38cafc53a0f29e0cf1236e2d2e8c@changeid
2025-08-28 09:56:42 +03:00
Daniel Gabay 7a1f7c5217 wifi: iwlwifi: mld: add few missing hcmd/notif names
- SEC_KEY_CMD
- REPLY_ERROR
- PHY_CONFIGURATION_CMD
- BT_CONFIG

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.badba3cc8be8.Ic8bc3ed4a1b05e80bbbc08636463a22ccbd8568f@changeid
2025-08-28 09:56:42 +03:00
Somashekhar Puttagangaiah 27dc581306 wifi: iwlwifi: mld: Add debug log for second link
When there is a missed beacon scenario its
not clear how many times beacon missed,
log this data.

Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.70366c88907e.I39b5c121f9884cd572a19bf89f7cca02ce79eb33@changeid
2025-08-28 09:56:42 +03:00
Somashekhar Puttagangaiah 14a4aca568 wifi: iwlwifi: mld: trigger mlo scan only when not in EMLSR
When beacon loss happens or the RSSI drops, trigger MLO scan only
if not in EMLSR. The link switch was meant to be done when we are
not in EMLSR and we can try to switch to a better link.
If in EMLSR, we exit first and then trigger MLO scan.

Signed-off-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.f6ae8e3882cf.I60901c16487371b8e62019bd0bf25c45ab23752f@changeid
2025-08-28 09:56:42 +03:00
Miri Korenblit da70749568 wifi: iwlwifi: mld: don't check the cipher on resume
On resume, we are iterating all the keys in order to update the PN.
Currently we check the cipher of the key we are currently iterating on
to decide whether the key is PTK, GTK, IGTK or BIGTK.
But we can find the type of the key by the keyidx, and we anyway have to
check the keyidx, so just remove the cipher switch case and check only
the keyidx instead

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250826184046.8c4f9c30242c.Ie34c200f321aae60771476fa9907c333a8a99747@changeid
2025-08-28 09:56:42 +03:00
Miri Korenblit 433570ee39 wifi: iwlwifi: mld: don't validate keys state on resume
When resuming, we iterate over all the (installed) keys to update the
PNs. If we find a key with an unexpected cipher we disconnect.
But there is no reason for us to validate the internal key state
specifically on resume, it should be the same as it was before the
suspend.
Remove the 'unhandled_cipher' from the iteration data.

Also remove the num_keys indication as it is not really needed.
If no keys were installed before the suspend, we will have
num_of_gtk_rekeys = 0 and we will return early anyway.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.fb7e3bd4a967.I7eb24756ee27ad7b6731c0fb5dce5acb5d986694@changeid
2025-08-26 18:39:45 +03:00
Miri Korenblit 370fc69ed9 wifi: iwlwifi: mld: rename iwl_mld_set_key_rx_seq
This function should only be used for group keys. For pairwise keys we
have iwl_mld_update_ptk_rx_seq. Make that clear from the name.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.ebf93a07905a.I8380b5cf9f6095b3a0b35fe4b7d56c544b921600@changeid
2025-08-26 18:39:45 +03:00
Miri Korenblit 457b2a881f wifi: iwlwifi: mld: refactor iwl_mld_add_all_rekeys
This receives iwl_mld_resume_key_iter_data, but it really only needs the
mld object. Pass that instead.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.1d12ab0b5699.I201044d175b979520970090153de4d622652f86d@changeid
2025-08-26 18:39:45 +03:00
Miri Korenblit e7e14d8e39 wifi: iwlwifi: mld: don't consider old versions of PPAG
There is a utility function, iwl_fill_ppag_table, to fill the PPAG table
according the version of the FW API and on of the BIOS table.
But this function handles really old APIs that iwlmld will not support.
Also, iwlmvm will no longer have new APIs of PPAG (because it is loaded
on frozen devices only). So in the next versions we might introdue
regressions to iwlmvm.
Simply fill the PPAG table separately in iwlmld code, without using this
utility.

Reviewed-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.35698eb46b67.Ie77dc9c3ee8275d1c2e4eafa27f1c7899c2660ce@changeid
2025-08-26 18:39:45 +03:00
Miri Korenblit 205a7309cc wifi: iwlwifi: mld/mvm: set beacon protection capability in wowlan config
Although the FW knows if a BIGTK was installed and can conclude from
that the beacon protection capability, the specific component
of the FW that is responsible for rekeying while in wowlan, doesn't know
what keys were installed.
So we need to tell that the FW when we go to wowlan, otherwise it will
ignore the BIGTK rekey, if such occurs.
Set this bit when needed.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.d3968487865e.I784f564ab85f618f26d3f082197a384bb219e07c@changeid
2025-08-26 18:39:44 +03:00
Miri Korenblit 6a1adca41f wifi: iwlwifi: mvm/mld: correctly retrieve the keyidx from the beacon
key->icv_len already includes the pn length and the keyidx length.
In fact it is the size of the MMIE, so subtracting it from the overall
length will actually bring us to the beggining of the MMIE and not of
the keyidx inside it.
Also, we also need to consider a 16 byte long MIC.

Fix the code to correctly retrieve the keyidx.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.e0aea411cd2a.I4220348147541a1478b02389475426047ecf84bc@changeid
2025-08-26 18:39:44 +03:00
Miri Korenblit 8925c7876c wifi: iwlwifi: mld: track BIGTK per link
We track the BIGTKs installed for beacon protection purposes.
But in MLO we will have a different BIGTK per link.
Track the BIGTK per-link and not per-vif.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.0392769d3abb.I5d8e232d663e3ca8fc23de12dd8534cb076cabb9@changeid
2025-08-26 18:39:44 +03:00
Miri Korenblit 33d958b39a wifi: iwlwifi: mld: support MLO rekey on resume
When resuming from wowlan, update mac80211 on rekeys of MLO group keys
and set the PN for those keys.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.fae2b42fbbfc.I7fcba97b6424577e49f7295f0c40b7d294ab56d8@changeid
2025-08-26 18:39:44 +03:00
Miri Korenblit 2f72134320 wifi: iwlwifi: mld: cleanup cipher lookup in resume
We used to lookup the ciphers of the mcast keys, but this was beacuse it
was required for ieee80211_get_rekey_add. Now as this API no longer
needs the cipher as an argument, we can remove the cipher lookups.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250821204455.0650021c587b.Iae55243b575248cb4cc0b416f7f63092b5803219@changeid
2025-08-26 18:39:44 +03:00
Johannes Berg 3630f04330 iwlwifi feature, notably
- disable features in fips
 - remove RX OMI feature code
 - A few fixes and cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQM3A3Pv7vbm9vtjWbacY7uyt+OfQUCaIDD4AAKCRDacY7uyt+O
 fTbHAQDgvAJIaZHxvaVglMTK8VSYFgT/WcbPL38ZXr9z1aqDTgD/QsGWoaYFJs4P
 DtM8+rrBeOq6te6F9keXjl22iTvOpA8=
 =sVgx
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-next-2025-07-23' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

Miri Korenblit says:
====================
iwlwifi feature, notably

- disable features in fips
- remove RX OMI feature code
- A few fixes and cleanups
====================

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-07-23 14:13:27 +02:00
Miri Korenblit 170db5f873 wifi: iwlwifi: mld: use spec link id and not FW link id
In missed beacon handling, we compare the FW link id to the
bss_param_ch_cnt_link_id, which is a spec link id. Fix it.

Reviewed-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/20250723094230.2104f8cac836.I25ed77c2b87bde82a9153e2aa26e09b8a42f6ee3@changeid
2025-07-23 14:10:24 +03:00
Benjamin Berg bc404dfddb wifi: iwlwifi: mld: decode EOF bit for AMPDUs
Only the EOF bit handling for single frames was ported to the MLD
driver. The code to handle AMPDUs correctly was forgotten. Add it back
so that the bit is reported in the radiotap headers again.

Fixes: d1e879ec60 ("wifi: iwlwifi: add iwlmld sub-driver")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Daniel Gabay <daniel.gabay@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.195be86372d5.I4db4abf348f7b6dfc75f869770dd77655a204bc7@changeid
2025-07-23 14:10:24 +03:00
Miri Korenblit 4b0dccdd81 wifi: iwlwifi: Remove support for rx OMI bandwidth reduction
This feature turns out to have an issue: it can take up to 8 seconds to
detect high throughput scenarios and to leave RX OMI bandwidth
reduction. This leads to throughput degradation.
Until the issues are fixed, remove the RX OMI implementation.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.a9ccfe210516.Ic87bc7709a6761f593e88f1488a41442c68c1686@changeid
2025-07-23 14:10:24 +03:00
Miri Korenblit b089c415e0 wifi: iwlwifi: stop supporting iwl_omi_send_status_notif ver 1
This version doesn't provide the sta id, so we need to look it up -
assuming that no other sta exists, since one of the conditions of
entering OMI is not having P2P/TDLS.

But when we leave OMI, because of the P2P/TDLS activation, the P2P/TDLS
sta can already exist while we receive the notification from the FW.
This causes an error log which is incorrect.

Since OMI is only supported in SC, which is not shipped yet, no one will
use a FW with the old version.
Remove support for it.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.b716b9cebaa7.I2a1cc4be441dbbb5566a9a3d2d330d956ff3ed38@changeid
2025-07-23 14:10:24 +03:00
Avraham Stern 666357bf3e wifi: iwlwifi: mld: avoid outdated reorder buffer head_sn
If no frames are received on a queue for a while, the reorder buffer
head_sn may be an old one. When the next frame that is received on
that queue and buffered is a subframe of an AMSDU but not the last
subframe, it will not update the buffer's head_sn. When the frame
release notification arrives, it will not release the buffered frame
because it will look like the notification's NSSN is lower than the
buffer's head_sn (because of a wraparound).
Fix it by updating the head_sn when the first frame is buffered.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.e1f62a9a603c.I7b57a481122074b1f40d39cd31db2e5262668eb2@changeid
2025-07-23 14:10:24 +03:00
Johannes Berg 0636800c8e wifi: iwlwifi: disable certain features for fips_enabled
When fips_enabled is set, keys will not be given to the
hardware by mac80211 since the hardware isn't certified.
In this case, various features cannot work correctly as
the firmware needs to handle frames, but it then cannot
since no keys are available.

Disable features:
 - WoWLAN since no keys etc.
 - MFP since some frames need to be handled in firmware
 - EHT/6GHz since MFP is required

Also restrict A-MSDU size since A-MSDUs cannot be split
up by hardware and thus need to fit into the RX buffers
in one piece.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.329fade58a27.I0be27dd329643cc5fdf79a8c8b8f6d2e6fb5c175@changeid
2025-07-23 14:10:24 +03:00
Benjamin Berg 0dd86ab21d wifi: iwlwifi: mld: support channel survey collection for ACS scans
The firmware is able to collect channel statistics when doing passive
scans. Enable the flag when doing a passive scan on an AP interface and
collect the survey information.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.a659ef1b1fd8.I24a9a0383327c231f36be170968bc7bac801f9f2@changeid
2025-07-23 14:10:24 +03:00
Miri Korenblit fc3475fa46 wifi: iwlwifi: mld: disable RX aggregation if requested
The user can request to disable RX aggregations via the module parameter
enable_11n.
Honor this request and reject addba.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.40746586ade7.Ibf5877df76ea2f1eee614166b3194843fd9898cd@changeid
2025-07-23 14:10:24 +03:00
Miri Korenblit 69fdb08435 wifi: mac80211: don't require cipher and keylen in gtk rekey
ieee80211_add_gtk_rekey receives a keyconf as an argument, and the
cipher and keylen are taken from there to the new allocated key.
But in rekey, both the cipher and the keylen should be the same as of
the old key, so let ieee80211_add_gtk_rekey find those, so drivers won't
have to fill it in.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250721214922.3c5c023bfae9.Ie6594ae2b4b6d5b3d536e642b349046ebfce7a5d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-07-22 10:43:19 +02:00
Miri Korenblit 0356e509d3 wifi: iwlwifi: mld: remove support for iwl_mcc_update_resp versions
iwlmld was planned to be used for HR/GF, which has versions 5/6,
but it was decided at the end to use iwlmvm for HR/GF, so iwlmld only
needs to support version 8.
Remove versions 5 and 6 support.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250711183056.9c64bfbb16cb.I109bee4d4bf455cbffbb8d2340023338bcab886d@changeid
2025-07-14 19:36:13 +03:00
Miri Korenblit 7cc5f89bfb wifi: iwlwifi: mld: Revert "wifi: iwlwifi: mld: allow EMLSR with 2.4 GHz when BT is ON"
Due to a hw bug, this feature won't be enabled. Revert its
implementation.
This reverts commit 37808a3788 ("wifi: iwlwifi: mld: allow EMLSR with
2.4 GHz when BT is ON")

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250711183056.57755ac3f39d.I63ae0ee3e6cdc9b11175ad15927aaad3b8f8f47a@changeid
2025-07-14 19:36:13 +03:00
Miri Korenblit 0ce92d548b wifi: iwlwifi: mld: Revert "wifi: iwlwifi: mld: add kunit test for emlsr with bt on"
Due to a hw bug, this feature won't be enabled. Revert its tests.
This reverts commit f7cc80b871 ("wifi: iwlwifi: mld: add kunit test
for emlsr with bt on")

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250711183056.5fdf77497ad2.I1160f1dcff734cb42baa8fbf8aac121a1a24a4c5@changeid
2025-07-14 19:36:13 +03:00
Emmanuel Grumbach 3735526d3e wifi: iwlwifi: mld: support iwl_omi_send_status_notif version 2
The firmware provides the station id, use it since it makes our lives
easier. No need to assume we have a single BSS vif, and look up the
station id to whom the OMI was sent.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250711183056.7d2cd878855f.I8625ebb2c4e1fb484aafd16a07549f2eeb506e08@changeid
2025-07-14 19:36:13 +03:00
Miri Korenblit 8bec2ec156 wifi: iwlwifi: mld: remove support for iwl_geo_tx_power_profiles_cmd version 4
iwlmld was planned to be used for HR/GF, which has version 4,
but it was decided at the end to use iwlmvm for HR/GF, so iwlmld only
needs to support version 5.
Remove version 4 support.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250711183056.faeb1e6bac2a.I1a29b16f59b67c103d1f91dedee27e04cd7fdfdd@changeid
2025-07-14 19:36:13 +03:00
Miri Korenblit 100f38b0ae wifi: iwlwifi: mld: remove support for REDUCE_TX_POWER_CMD ver 9
iwlmld was planned to be used for HR, which has version 9,
but it was decided at the end to use iwlmvm for HR, so iwlmld only
needs to support version 10.
Remove version 9 support.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250711183056.aeeb617abfae.I05101972506180644c42be5096c1b2afa36c625a@changeid
2025-07-14 19:36:13 +03:00
Johannes Berg f2829c89e2 wifi: iwlwifi: mvm/mld: use average RSSI for beacons
When connected to an AP, the PHY will typically be tuned to
a higher bandwidth than the beacons are transmitted on, as
they are normally only transmitted on 20 MHz. This can mean
that another STA is simultaneously transmitting on another
channel of the higher bandwidth, and apparently this energy
may be taken into account by the PHY, resulting in elevated
energy readings.

To work around this, track the firmware's corrected beacon
energy data and replace the RSSI in beacons by that. The
replacement happens for all beacons received in the context
of the current MAC or link (depending on FW version), in
which case the filters will drop all else. For a scan, which
is only tuning to 20 MHz channels, the MAC/link ID will be
one that isn't found (the AUX ID 4), and no correction will
be done (nor is it needed.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250711183056.324bfe7027ff.I160f947e7aab30e0110a7019ed46186e57c3de14@changeid
2025-07-14 19:36:13 +03:00
Pagadala Yesu Anjaneyulu ea045a0de3 wifi: iwlwifi: add support for accepting raw DSM tables by firmware
Firmware would assert on undefined bits in DSM-originated DWs.
With this change, Firmware introduces a fail-safe mechanism
and removes the assert behavior. This ensures robustness when
handling raw DSM table data.

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/20250710212632.eee871df03c9.I2be2eaa16437e84aa1be0c6c95ec334034ce7e50@changeid
2025-07-11 18:28:31 +03:00
Miri Korenblit 8580be27e2 wifi: iwlwifi: mld: don't remove all keys in mcast rekey
In the current code, if there was a rekey, we remove all the existing keys
from mac80211, then re-add the ones that the FW sent with
ieee80211_gtk_rekey_add, (newer FW will send also the existing GTKs/BIGTKs)
and then update the sequence number.

Instead of removing and re-adding the existing keys for no good reason,
we can just update the sequence of all keys, also of the ones that are
going to be replaced, and update again after the replace.

This change is required because ieee80211_gtk_rekey_add is going to be
changed to lookup the cipher from the old key instead of receiving it as an
argument, and for this it will need the old key(s), so we can't remove all
keys.

Note that with this change, in case that a key that existed before wowlan
is replaced, mac80211 will now call the driver to remove the old key and
add the new one (as opposed the previous behaviour, in which the key was
removed by the driver itself).
Of course we don't want to run the set_key callbacks in this case, so just
return early.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250710212632.f0b5e19f77f5.I958f4926f168cdad6d4d7720ebde2f5e812b297d@changeid
2025-07-11 18:28:31 +03:00
Rotem Kerem 11c5cc9ec6 wifi: iwlwifi: add iwl_trans_is_dead() API
Add iwl_trans_is_dead() function to be called by the op modes instead
of directly checking the trans status bits. This hides the trans
internal implementation details from callers.

Signed-off-by: Rotem Kerem <rotem.kerem@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250710212632.cd89d8013261.I214b7ffbabc393593fb57831d61d1a9ffa318a1e@changeid
2025-07-11 18:28:31 +03:00