summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi
AgeCommit message (Collapse)Author
2025-02-11wifi: iwlwifi: mvm: Remove unused iwl_mvm_ftm_add_pasn_staDr. David Alan Gilbert
iwl_mvm_ftm_add_pasn_sta() was added in 2020 by commit 0739a7d70e00 ("iwlwifi: mvm: initiator: add option for adding a PASN responder") but hasn't been used. Remove it. That was the only caller of iwl_mvm_ftm_remove_pasn_sta(). Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20241223013202.340180-5-linux@treblig.org
2025-02-11wifi: iwlwifi: mvm: Remove unused iwl_mvm_ftm_*_add_pasn_sta functionsDr. David Alan Gilbert
iwl_mvm_ftm_respoder_add_pasn_sta() and iwl_mvm_ftm_resp_remove_pasn_sta() were added in 2020 by commit be82ecd3a5c8 ("iwlwifi: mvm: add an option to add PASN station") but have remained unused. Remove them. After that removal iwl_mvm_add_pasn_sta() is now unused. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20241223013202.340180-4-linux@treblig.org
2025-02-11wifi: iwlwifi: mvm: Remove unused iwl_mvm_rx_missed_vap_notifDr. David Alan Gilbert
iwl_mvm_rx_missed_vap_notif() was added in 2019 by commit 449a29d0fead ("iwlwifi: mvm: add notification for missed VAP") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20241223013202.340180-3-linux@treblig.org
2025-02-11wifi: iwlwifi: dvm: Remove unused iwl_rx_ant_restrictionDr. David Alan Gilbert
iwl_rx_ant_restriction() was added in 2009 by commit 46f9381aa3fb ("iwlwifi: Thermal Throttling Management - part 2") but never used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20241223013202.340180-2-linux@treblig.org
2025-01-13wifi: iwlwifi: simplify nested if checksJohannes Berg
In the absence of (an) else clause(s), "if (a) if (b)" is equivalent to "if (a && b)", so simplify the code a bit. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250102161730.7ddc9cb1ea50.If18bd94706d6c821e34c38a4704bf85dca6207b2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: rename iwl_datapath_monitor_notif::mac_id to link_idMiri Korenblit
The FW really sends the link_id here. Rename it, while leaving a FIXME in iwlmvm. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241231135726.a3d07be17fb1.Ib8a623af099b9b0f2b8d552fca546c476a69a82d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: pcie: make iwl_pcie_d3_complete_suspend() staticJohannes Berg
The function is only used in the same file, so it can trivially be static. 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/20241231135726.c09d2251824c.Ibcfbb4bbe27a0767a1da4a5897b2b0f70193dc3d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: pcie: make _iwl_trans_pcie_gen2_stop_device() staticJohannes Berg
This function isn't used outside the file it's implemented in, so make it static. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.060c01653d4e.I3f0675b3977e474b633ff10965fe6512f34ae593@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: remove unused tas_rsp variableAnjaneyulu
optimize local variable usage in iwl_dbgfs_tas_get_status_read(). Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.fab845da5c6f.Ica84a4c0df33db9c9b6baef28893bb42e1f367b7@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: handle version 3 GET_TAS_STATUS notificationAnjaneyulu
Add a check to ensure only version-3 of GET_TAS_STATUS notification is allowed. Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.1d571ac80957.Ia48b1cf5585a2a9f9c461e80f5a0ba2bb16c3af4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: extend TAS_CONFIG cmd support for v5Anjaneyulu
Extend TAS_CONFIG to send exact data read from bios to firmware without filtering/altering bios data. This enables driver becoming purely a pipe for TAS features. Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.f46d58e7cfd1.Ifd81e632fa3e7039b8d139ee0d1c24e09669dff5@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: remove Mr/Ms radioJohannes Berg
This radio never shipped, so we don't need to have it in the code. Remove the configurations and a few lines of code for 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/20241231135726.9f984db3efa0.I5a39ec951430e765bdea49ff150dd41af5e911f3@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: add WIKO to PPAG approved listAnjaneyulu
Add WIKO to the list of the OEMs that are allowed to use the PPAG feature Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.d2ba5aee512a.I529cfefabd04c64d801895d6a274e3225a952090@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: support EMLSR on WH/PEJohannes Berg
Unlike FM which only supported EMLSR on B-step and later, here it can be supported starting from A-step. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.65a3b822e002.I4d6f10e02686f1cc159121cf702d6b747cab5b8a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: config: unify fw/pnvm MODULE_FIRMWAREJohannes Berg
All newer devices now require PNVM files, so don't list them separately but simply generate the relevant MODULE_FIRMWARE() declarations together. This simplifies the code and adds a large number of missing PVNM declarations. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.302e521e08e9.I782513432d3dcbf801e8262522ded95302548e1c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: improve/fix chanctx min_def use logicJohannes Berg
There are two cases in which the min_def isn't used: a) if FILS will be enabled b) if FTM responder is enabled Both of these apply to AP mode only, but for FILS we're not checking that right now. Change the code to iterate the interfaces and links using the channel context, and check for AP mode for both, not just for FTM responder. In the case of iwl_mvm_enable_fils() this might also fix an issue where FILS is enabled for an IBSS network that happens to be started on 6 GHz, though that's not very likely to be possible due to regulatory. However for RX OMI bandwidth reduction the driver needs to use the min_def in client mode as well, in order to actually reduce bandwidth when it requested 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/20241231135726.7b91025e103d.I4c99c03fd32363d574ab5e34798b6099401f0729@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: implement reset escalationJohannes Berg
If the normal reset methods don't work well, attempt to escalate to ever increasing methods. TOP reset will only be available for SC (and presumably higher) devices, and still needs to be filled in. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.804e005403d8.I9558f09cd68eec16b02373b1e47adafd28fdffa3@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: implement product reset for TOP errorsJohannes Berg
The TOP is a shared (between BT and WiFi) hardware component, and if it has an error we need to reset the whole device, i.e. both BT and WiFi. This is achieved by calling a specific ACPI DSM (device-specific method) with the right arguments before doing a reset via the object referenced by _PRR. Since this is needed here, but a function reset will always do better than just re-enumerating the bus in case of errors, we can always try to at least do a function reset and do the full product reset only when needed for TOP errors. Also, for some Bz and Sc devices where BT is PCIe/IOSF as well, find the BT device and unbind that device as well so the BT driver can recover from the reset that's going to happen, rather than having to somehow detect that the device was reset. Also add - currently unused - the function reset mode, this is going to get used in the upcoming escalation model. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.5b0f846d3e13.Ia14ccac38ac3d48adf5f341b17c7e34ccc41c065@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: get the max number of links from the firmwareEmmanuel Grumbach
The firmware advertises the maximum number of links. Use it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.5eb29510f2b4.I7f35f61987c2ee905960ee476df6803632b0feb8@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: pcie: check for WiAMT/CSME presenceJohannes Berg
In order to know whether or not a product reset can safely be done (without risking locking up the system completely), check for ME presence with the known methods. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241231135726.0ac9173f1f37.Id83b80b61548b8f4f01e96a356dafe063543c4ac@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: fw: fix repeated words in commentsJilin Yuan
Delete the redundant word 'for'. Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com> Link: https://msgid.link/20220709140036.48913-1-yuanjilin@cdjrlc.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241229164246.2981c3b5a40e.I96ebda41f230d453d4bc0afb01ac43011c13a182@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: Fix duplicated 'the' in commentMiri Korenblit
The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang <wangborong@cdjrlc.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241229164246.76502dda646b.I0a1d012eaa1cd8d39430cde981cae8c4cc058442@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: Fix duplicated 'if' in commentJason Wang
The double `if' is duplicated in the comment, remove one. Signed-off-by: Jason Wang <wangborong@cdjrlc.com> Link: https://msgid.link/20220811115958.8423-1-wangborong@cdjrlc.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241229164246.9d8c224e9d4c.Iaacfbd1e9432f31d5d7d037ad925aadbb0d5c4d6@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: Remove a duplicate assignment in iwl_dbgfs_amsdu_len_write()Minjie Du
Delete a duplicate statement from this function implementation. Signed-off-by: Minjie Du <duminjie@vivo.com> Link: https://msgid.link/20230705114934.16523-1-duminjie@vivo.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241229164246.b1b0dadc2e9e.Ie57cbe8039b9f388632141447ac910b6fcc3d0c0@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: Use helper function IS_ERR_OR_NULL()Miri Korenblit
Use IS_ERR_OR_NULL() instead of open-coding it to simplify the code. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241229164246.d3423626d981.I3b4cc7f19d1bfecdb2e6a4eba8da1c7a41461115@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: Fix spelling typo in commentshitao
Fix spelling typo in iwl-context-info.h comment. Reported-by: k2ci <kernel-bot@kylinos.cn> Signed-off-by: shitao <shitao@kylinos.cn> Link: https://msgid.link/20231212093424.3104329-1-shitao@kylinos.cn Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241229164246.c79c132f811b.Ie07a0007b96359b3552878e23c4b9efeb07bba8d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: api: remove the double wordDeming Wang
Remove the duplicate "the". Signed-off-by: Deming Wang <wangdeming@inspur.com> Link: https://msgid.link/20240318054853.2352-1-wangdeming@inspur.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241229164246.7b385f337e46.Iae60151e718f344098058b0e4fa6f6c1e43cb414@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: fix iwl_ssid_exist() checkMiri Korenblit
iwl_ssid_exist() seems to check if a given ssid/ssid_len already exists in a given array ssid_list. Correctly compare the ssid to the SSID of each array element (with a matching SSID length) to better remove duplicates. Signed-off-by: Bjoern A. Zeeb <bz@FreeBSD.org> Sponsored by: The FreeBSD Foundation Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Daniel Gabay <daniel.gabay@intel.com> Link: https://patch.msgid.link/20241229164246.4471cd3d8dba.Iab8409b22bf6f01d05571ecef1e97dd3c8b1cc75@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: Improve code style in pointer declarationsJuan José Arboleda
The changes ensure that there is a space between the `u8` type and the `*` character as preferred by the guidelines. This change is purely stylistic and do not affect the functionality of the code. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com> Link: https://msgid.link/10b6d4945675cada713e819f7bd6782a66a1c0d2.1724103043.git.soyjuanarbol@gmail.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241229164246.f09a200be4f8.Ia564ae1c59136bd3c2864ccfb3a244b3257dcd5f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: fw: fix typo 'adderss'Gan Jie
Fix typo 'adderss' to 'address'. Signed-off-by: Gan Jie <ganjie182@gmail.com> Link: https://msgid.link/20241101143052.1531-1-ganjie182@gmail.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241229164246.ad8978ee5673.I388e314a4be8333192b3994f43efa5dbd3ac715d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: remove unneeded NULL pointer checksEmmanuel Grumbach
Smatch reported that we dereference the data pointer to calculate the expected length before we check it's not NULL. While this is true (and hence needs to be fixed), this will never happen because the data pointer comes from struct iwl_rx_packet object which has the following layout: struct iwl_rx_packet { __le32 len_n_flags; struct iwl_cmd_header hdr; u8 data[]; } __packed; So, if the pointer to iwl_rx_packet is valid, data will be valid as well. Remove the NULL pointer check on 'data' to avoid confusing smatch. Also remove the check from similar functions in the same flow that were cargo cult copy-pasted. Fixes: 4635e6eaa0fe ("wifi: iwlwifi: mvm: support new versions of the wowlan APIs") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202411210812.0eLaonw3-lkp@intel.com/ Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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/20241229164246.c8ce6e041e4b.I4dc19289e3f3807386768c846e08be3ea322cd15@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: fix AP STA comparisonJohannes Berg
This should be comparing the AP STA, not the deflink firmware STA ID. Correct the implementation so that statistics can be requested for the AP, but not for other stations that may end up with the firmware STA ID matching 0 in the deflink, or so. 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/20241229164246.08b05aca37cf.Iba1a6a637a758691f710dc4f3f03bd1d960fb087@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: cleanup unused variable in trans.hEmmanuel Grumbach
Remove unused fields from the transport 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/20241229164246.1d04ce18a0ec.Ibfac364163b55b52196d30ff2b43945c5aa804a9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: don't count mgmt frames as MPDUDaniel Gabay
When handling TX_CMD notification, for mgmt frames tid is equal to IWL_MAX_TID_COUNT, so with the current logic we'll count that as MPDU, fix that. Fixes: ec0d43d26f2c ("wifi: iwlwifi: mvm: Activate EMLSR based on traffic volume") Signed-off-by: Daniel Gabay <daniel.gabay@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241229164246.80b119bb5d08.I31b1e8ba25cce15819225e5ac80332e4eaa20c13@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: fw: api: tdls: remove MVM_ from nameJohannes Berg
The API isn't really MVM specific, it's just the firmware API. Remove the "MVM_" from the name here as well, as we've already done in many other places. 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/20241229164246.66e17791c392.I6998e263973c26c1e22b4f470b974a519011b29a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: avoid NULL pointer dereferenceMiri Korenblit
When iterating over the links of a vif, we need to make sure that the pointer is valid (in other words - that the link exists) before dereferncing it. Use for_each_vif_active_link that also does the check. Fixes: 2b7ee1a10a72 ("wifi: iwlwiif: mvm: handle the new BT notif") Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241229164246.31d41f7d3eab.I7fb7036a0b187c1636b01970207259cb2327952c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: bump FW API to 96 for BZ/SC devicesMiri Korenblit
Start supporting API version 96 for new devices. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.4028b66f4563.I5d5caf4bffeabcab72a69c2b31445e7bee4a94b6@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mvm: fix add stream vs. restart raceJohannes Berg
My recent restart related work has made this race more likely to happen and we've now noticed it, but it seems that it was always possible. The race is that the add stream work can be scheduled just before a restart is scheduled and then execute before the restart, accessing the device while it's doing the restart and not accessible. To fix this, check if the device is restarting and abort the work in that case. Reschedule it after the restart as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.9c30af039b4d.I1a32936776f8ba5e83dda0a68ffc2722d9d37950@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: move fw_dbg_collect to fw debugfsEmmanuel Grumbach
This debugfs hook really belongs to the firmware handling code and then we can use it across different op_modes. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.d31f5994c6a6.Ibe3bc7a25e2bbf7a575287e19db58833bb3e6b9e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: api: remove version number from latest stored_beacon_notifYedidya Benshimol
By convention the newest version of a command/notification structure is named with out the _ver_# suffix. Apply to stored_beacon_notif. Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.e2140aa3c65b.Ie851bdda6df02dcc352bf765a3ec6bdac45c65a2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: avoid memory leakMiri Korenblit
A caller of iwl_acpi_get_dsm_object must free the returned object. iwl_acpi_get_dsm_integer returns immediately without freeing it if the expected size is more than 8 bytes. Fix that. Note that with the current code this will never happen, since the caller of iwl_acpi_get_dsm_integer already checks that the expected size if either 1 or 4 bytes, so it can't exceed 8 bytes. While at it, print the DSM value instead of the return value, as this was the intention in the first place. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.bf61eaab99f8.Ibdc5df02f885208c222456d42c889c43b7e3b2f7@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mark that we support TX_CMD_API_S_VER_10Miri Korenblit
Usually each struct that represent an API needs to have a comment specifying all the versions of the API that this struct corresponds to. iwl_tx_cmd_gen3 was long supporting also version 10. Say that. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241228223206.83d681dc9cf7.I355270fb20b23978d9402cb70caf52a0108b8cd4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: add channel_load_not_by_us in iwl_mvm_phy_ctxtSomashekhar(Som)
Adding channel_load_not_by_us in the mvm phy context. Signed-off-by: Somashekhar(Som) <somashekhar.puttagangaiah@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.7c7f3ebebadf.Ifac005cf1e3b02cba0861eb19bfd8099957faad9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: add mapping of prph register crf for PE RFSomashekhar(Som)
In blank OTP, we get the CRF type from a peripheral register, support it for PE CRF Signed-off-by: Somashekhar(Som) <somashekhar.puttagangaiah@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.a8899d585a6e.I9d9b223c75d5370811220291c62c364967c0acc3@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: Allow entering EMLSR for more band combinationsSomashekhar(Som)
Enter EMLSR only when two bands are different. EMLSR should be allowed when one of the link is LB. Signed-off-by: Somashekhar(Som) <somashekhar.puttagangaiah@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.ec659168eeb7.I403f61f0e827c14cf2b245f48e1736559f17c476@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: iwl-drv: refactor image loading a bitJohannes Berg
Refactor some parts of the image loading to be able to extend the code for external FSEQ image loading more easily. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.224ac6599bbe.Iadc1974d633eec09797522f7d3fa543ea18bd7f6@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: Remove MVM prefix from TX API macrosDaniel Gabay
These are not mvm specific. Signed-off-by: Daniel Gabay <daniel.gabay@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.1b235ec5354e.If99a38b1f0d7e42ea4ee3907e6c395846c4aa9b0@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: rename bits in config/boot control registerJohannes Berg
The register 0x000 is now really boot control, and some of the old bit names were (even for old hardware) not reflecting the names on the hardware side; rename them in the driver to align the naming. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.6f25be160619.I3ffc9601e99dc414a9ae54a0d90c9d20c0253da5@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: move fw_ver debugfs to firmware runtimeEmmanuel Grumbach
This is really where it belongs. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20241228223206.98bdc5e62828.Iee7a8365dd63ebf580d324f90e1e04466d8ef5d5@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-01-13wifi: iwlwifi: mld: make iwl_mvm_find_ie_offset a iwlwifi utilMiri Korenblit
This is needed also for more opmodes, and is really not opmode dependent. Make it a iwlwifi util. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20241228223206.a36373eefbf2.Ib1f305b78508c98934f6000720d6455c88a860cb@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>