aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
Commit message (Collapse)AuthorAgeFilesLines
* wifi: iwlwifi: mvm: Add dump handler to iwl_mvmPagadala Yesu Anjaneyulu2025-07-141-0/+12
| | | | | | | | | Implement a dump handler in the iwl_mvm operation mode to collect firmware dump upon trigger from trans layer. Signed-off-by: Pagadala Yesu Anjaneyulu <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250711183056.366fc31fd551.I976cb17edd85a461043c7a4c7f4895bfaec9174a@changeid
* wifi: iwlwifi: mvm/mld: use average RSSI for beaconsJohannes Berg2025-07-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250711183056.324bfe7027ff.I160f947e7aab30e0110a7019ed46186e57c3de14@changeid
* wifi: iwlwifi: mvm: remove IWL_MVM_ESR_EXIT_FAIL_ENTRYPagadala Yesu Anjaneyulu2025-07-141-42/+0
| | | | | | | | | | EHT capable devices will only use iwlmld. So we can remove EMLSR code from iwlmvm. As part of removal, remove IWL_MVM_ESR_EXIT_FAIL_ENTRY EMLSR state. Signed-off-by: Pagadala Yesu Anjaneyulu <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250711183056.a69dc9c6ba49.I7f9fbc1f954b4c118625a4b8d51c72f3c84936da@changeid
* wifi: iwlwifi: add iwl_trans_is_dead() APIRotem Kerem2025-07-111-1/+1
| | | | | | | | | | 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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250710212632.cd89d8013261.I214b7ffbabc393593fb57831d61d1a9ffa318a1e@changeid
* wifi: iwlwifi: mvm: remove regulatory puncturing setupJohannes Berg2025-07-111-2/+0
| | | | | | | | | | We don't have puncturing before EHT, and EHT devices aren't supported in iwlmvm, so remove the regulatory puncturing setup code. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250710212632.b2a28a99725b.I72ba276cb705c02cea8f68e27ef3935d5120cfee@changeid
* wifi: iwlwifi: Fix memory leak in iwl_mvm_init()Xiu Jianfeng2025-06-251-1/+3
| | | | | | | | | | When iwl_opmode_register() fails, it does not unregster rate control, which will cause a memory leak issue, this patch fixes it. Fixes: 9f66a397c877 ("iwlwifi: mvm: rs: add ops for the new rate scaling in the FW") Signed-off-by: Xiu Jianfeng <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miri Korenblit <[email protected]>
* wifi: iwlwifi: rename iwl_cfg to iwl_rf_cfgJohannes Berg2025-05-101-1/+1
| | | | | | | | | | | | | With all the cleanups now, we can rename the structure to better indicate the functionality. For older devices this isn't quite accurate, of course, but it's better to have a name that reflects future use for maintenance. Add some kernel-doc while at it. Signed-off-by: Johannes Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miri Korenblit <[email protected]>
* wifi: iwlwifi: cfg: move MAC parameters to MAC dataJohannes Berg2025-05-091-1/+1
| | | | | | | | | | | | | | | There are a number of MAC parameters that are in the iwl_cfg (which is the last config matched to the MAC/RF combination). This isn't necessary, there are many more of those than MACs, so move (most of) the data into the MAC family config struct. Note that DCCM information remains for use by older devices, and on 9000 series it'll be in struct iwl_cfg but be ignored when the CRF is in a Qu/So platform. Signed-off-by: Johannes Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miri Korenblit <[email protected]>
* wifi: iwlwifi: rename cfg_trans_params to mac_cfgJohannes Berg2025-05-091-5/+5
| | | | | | | | | | | | Since 9000 series devices, the devices are split into MAC and CRF parts. Currently, "struct iwl_cfg" reflects some MAC and some RF parameters, but we want to clean this up and move the MAC data to what's now "struct iwl_cfg_trans_params". As the first step, to reflect the intent, rename this structure. Signed-off-by: Johannes Berg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miri Korenblit <[email protected]>
* wifi: iwlwifi: handle v3 ratesJohannes Berg2025-05-071-0/+38
| | | | | | | | | | For UHR, a version 3 of the rate API is being added, which increases the number of bits used for MCSes by shifting the NSS bit up. Handle that. Signed-off-by: Johannes Berg <[email protected]> Link: https://patch.msgid.link/20250505215513.84cde65a603f.Ic3119ef77cbc6461abd2a6bda104c0d236adcc8d@changeid Signed-off-by: Miri Korenblit <[email protected]>
* wifi: iwlwifi: rework transport configurationJohannes Berg2025-05-071-21/+24
| | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250504132447.e2a2535ecfd0.I21653103ff02afc5a4d97a41b68021f053985e37@changeid
* wifi: iwlwifi: trans: collect device informationJohannes Berg2025-05-071-3/+3
| | | | | | | | | | | 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 <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250503224232.cd80cb55403c.Ic18524b66d655fad734bf97192a54d9cfa9fdf1f@changeid
* wifi: iwlwifi: remove bc_table_dword transport configJohannes Berg2025-05-071-2/+0
| | | | | | | | | | There's really no point in configuring this, it's just a question of hardware capability. Remove it. Signed-off-by: Johannes Berg <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250503224232.6af4ea001226.I693f72a7c3a76e44f9ef2cefd62d606ad100a734@changeid
* wifi: iwlwifi: pass full FW info to transportJohannes Berg2025-05-071-3/+0
| | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250503224231.eac4006e81c5.Iebadc56bb2762e5f4d71f66bb2609d74b33daf11@changeid
* wifi: iwlwifi: remove PM mode and send-in-D3Johannes Berg2025-05-071-1/+0
| | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250503224231.cc3360761f1e.I72261afc42cee8983198b4660b7d38b7df7963da@changeid
* wifi: iwlwifi: mvm: add command order checks to kunitJohannes Berg2025-05-071-1/+7
| | | | | | | | | | 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 <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250502155404.581b60b0833f.I624fb3efc3fa0b155a5da69d7efc39207f133331@changeid
* wifi: iwlwifi: cfg: remove max_tx_agg_sizeJohannes Berg2025-05-061-5/+0
| | | | | | | | | | | 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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250502151751.9c2689e2ca8e.I8274b29ca64d9ef9d1e357bbe34ca3a4b97aeb7a@changeid
* wifi: iwlwifi: remove mvm prefix from iwl_mvm_esr_mode_notifMiri Korenblit2025-02-261-3/+3
| | | | | | | | This is not specific to mvm. Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250212073923.c536eeaae129.I848307be6df21913c0ce3eb6baef715cd401db1a@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: rename iwl_datapath_monitor_notif::mac_id to link_idMiri Korenblit2025-01-131-1/+2
| | | | | | | | | | The FW really sends the link_id here. Rename it, while leaving a FIXME in iwlmvm. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Link: https://patch.msgid.link/20241231135726.a3d07be17fb1.Ib8a623af099b9b0f2b8d552fca546c476a69a82d@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: cleanup unused variable in trans.hEmmanuel Grumbach2025-01-131-3/+0
| | | | | | | | | Remove unused fields from the transport API. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241229164246.1d04ce18a0ec.Ibfac364163b55b52196d30ff2b43945c5aa804a9@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: iwl_fw_error_collect() is always called syncJohannes Berg2025-01-131-2/+2
| | | | | | | | | | | Since iwl_fw_error_collect() is now always called with the sync argument set to true, to collect data synchronously, remove the argument from it entirely. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.08f515513e88.I780a557743ca7f029f46a1cc75d0799542e39d83@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: rework firmware error handlingJohannes Berg2025-01-131-85/+56
| | | | | | | | | | | | | | | | | | | | | | | | In order to later add the ability to do deeper resets of the device when it crashes, first restructure the firmware error handling. Instead of having just a single nic_error() method that handles all, split it: - nic_error() just handles and prints the error itself, - dump_error() synchronously creates an error dump, and - sw_reset() will be called to request doing a SW reset. This changes the architecture so that the transport is now responsible for deciding how to do the reset, and therefore the handling of reprobe if error occurs during reconfig moves there, which necessitates adding a method there that notifies the transport that the recovery was completed. Actually introducing the model under which deeper resets can be done will be in future patches. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.6d4f741ae907.I96a9243e7877808ed6d1bff6967c15d6c24882f0@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: mvm: restart device through NMIJohannes Berg2025-01-131-1/+1
| | | | | | | | | | | | | When some channel context manipulations fail, the device is going to be restarted to try to recover. Make this go through a real FW restart via an NMI so the transport is aware of it and can later handle escalation, and to make it easier to restructure the code later. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.96b732029d20.I2e729f402db58a76cea620b6f62a02da49a10b48@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: unify cmd_queue_full() into nic_error()Johannes Berg2025-01-131-12/+5
| | | | | | | | | | | | Except for some special handling in DVM, error dump and some message behaviour, cmd_queue_full and nic_error are equivalent now. Unify by giving a special error type, so DVM can continue to differentiate. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.0222183504aa.Ie29cef75fbd91b64a43619bc36bd5b29c5b9f957@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: mvm: clean up FW restart a bitJohannes Berg2025-01-131-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Approximately three years ago, in commit ddb6b76b6f96 ("iwlwifi: yoyo: support TLV-based firmware reset"), the code was (likely erroneously) changed to no longer treat error interrupts as firmware errors. As a result, this meant that the fw_restart counter was only applied in case of command queue being stuck, which never seems to happen. Also, there's no longer any way to set the mvm->fw_restart to a value that doesn't match exactly the module parameter behaviour. Instead of trying to fix this, simply remove the logic that limits the number of restarts, it's clearly unused. However, restore the logic that restart isn't unconditional, by checking the module parameter. Since the "fw_error" argument to iwl_mvm_nic_restart() is now always true (except in the "never happens" case of CMD queue stuck), just remove it too and treat command queue stuck the same way as everything else. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.b0489daf323c.I0cd3233b2214c5f06e059f746041b19d08647e40@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: mvm: remove STARTING stateJohannes Berg2025-01-131-3/+0
| | | | | | | | | | | Now that the retry loop only happens when timeouts occur and firmware errors are different, we no longer need the STARTING state with all the infrastructure for it. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.c55d73436521.I08e9f6a71d56f86872bca4d4e3048faa113a7120@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: return ERR_PTR from opmode start()Johannes Berg2025-01-131-7/+17
| | | | | | | | | | | In order to restrict the retry loops for timeouts, first pass the error code up using ERR_PTR(). This of course requires all existing functions to be updated accordingly. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.3fe5031d5784.I7307996c91dac69619ff9c616b8a077423fac19f@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: interpret STEP URM BIOS configurationSomashekhar(Som)2025-01-131-0/+1
| | | | | | | | | | | | | | | For certain platforms, it may necessary to use the STEP in URM (ultra reliable mode.) Read the necessary flags from the BIOS (ACPI or UEFI) and indicate the chosen mode to the firmware in the context info. Whether or not URM really was configured is already read back later, to adjust capabilities accordingly. Signed-off-by: Somashekhar(Som) <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Reviewed-by: Daniel Gabay <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.b30024905de3.If3c578af2c15f8005bbe71499bc4091348ed7bb0@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: differentiate NIC error typesJohannes Berg2025-01-131-7/+4
| | | | | | | | | | | | | | | | | Instead of differentiating only sync/async, differentiate the type of error, and document that only reset handshake timeout (IWL_ERR_TYPE_RESET_HS_TIMEOUT) needs sync handling. The special sync handling is somewhat temporary, the idea is to later split the nic_error() method into error dump, synchronizing the dump, and SW reset methods, and the type is mostly in order to unify command queue full handling into that new architecture as well. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241227095718.aed9c9e4fac0.I2288042bec4728a75b61cb7f6ded5214bfa3ce85@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: remove mvm from session protection cmd's nameYedidya Benshimol2025-01-131-1/+1
| | | | | | | | | As the session protection command will be used in mld, it shouldn't be associated by name to mvm Signed-off-by: Yedidya Benshimol <[email protected]> Link: https://patch.msgid.link/20241226174257.0cd9ae2499b6.If228310b0578e5da88ccb28ff8dceb56e1c61b27@changeid Signed-off-by: Johannes Berg <[email protected]>
* module: Convert symbol namespace to string literalPeter Zijlstra2024-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the existing export namespace code along the same lines of commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")") and for the same reason, it is not desired for the namespace argument to be a macro expansion itself. Scripted using git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file; do awk -i inplace ' /^#define EXPORT_SYMBOL_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /^#define MODULE_IMPORT_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /MODULE_IMPORT_NS/ { $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g"); } /EXPORT_SYMBOL_NS/ { if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) { if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ && $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ && $0 !~ /^my/) { getline line; gsub(/[[:space:]]*\\$/, ""); gsub(/[[:space:]]/, "", line); $0 = $0 " " line; } $0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/, "\\1(\\2, \"\\3\")", "g"); } } { print }' $file; done Requested-by: Masahiro Yamada <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc Acked-by: Greg KH <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
* wifi: iwlwifi: s/IWL_MVM_INVALID_STA/IWL_INVALID_STAMiri Korenblit2024-11-071-2/+2
| | | | | | | | This is not mvm specific Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20241028135215.acb45e8c4a78.I58736fd85d82a1fe641e75037b77878854a91e50@changeid Signed-off-by: Johannes Berg <[email protected]>
* wifi: iwlwifi: mvm: replace CONFIG_PM by CONFIG_PM_SLEEPEmmanuel Grumbach2024-09-061-2/+5
| | | | | | | | | | | Replace the ifdef CONFIG_PM by CONFIG_PM_SLEEP. CONFIG_PM was useful when we had CONFIG_PM_RUNTIME but that was removed long ago. Use PM_SLEEP consistently across the driver. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240825191257.44e47ba584de.I64f985d0405345252b76b7157291b79677abd64d@changeid Signed-off-by: Johannes Berg <[email protected]>
* Merge tag 'wireless-next-2024-09-04' of ↵Jakub Kicinski2024-09-051-11/+72
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== pull-request: wireless-next-2024-09-04 here's a pull request to net-next tree, more info below. Please let me know if there are any problems. ==================== Conflicts: drivers/net/wireless/ath/ath12k/hw.c 38055789d151 ("wifi: ath12k: use 128 bytes aligned iova in transmit path for WCN7850") 8be12629b428 ("wifi: ath12k: restore ASPM for supported hardwares only") https://lore.kernel.org/[email protected] Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
| * wifi: iwlwifi: mvm: remove mvm prefix from iwl_mvm_tx_resp*Miri Korenblit2024-09-031-1/+1
| | | | | | | | | | | | | | | | | | These are not mvm specific Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Link: https://patch.msgid.link/20240901071542.22e28b56da2c.Ib859a05ed133fa5a1426c5feffa8999a18bba6f2@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: s/IWL_MVM_STATION_COUNT_MAX/IWL_STATION_COUNT_MAXMiri Korenblit2024-09-031-2/+2
| | | | | | | | | | | | | | | | | | This isn't mvm specific. Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Link: https://patch.msgid.link/20240901071542.5d71a0a2b56c.I7e0fe636d914852963e7a2f5e6037d0c3e367145@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: use default command queue watchdog timeoutMiri Korenblit2024-08-271-4/+0
| | | | | | | | | | | | | | | | | | | | | | We used to have the opmode configuring it to the trans according to the debug tlv value (FW_DBG_TRIGGER_TXQ_TIMERS). But this debug is not used, so trans can just have the default value hardcoded. Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240808232017.87af3f063025.I2222981ead13f6a917f2d4b116c5b94200dc9e51@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: mvm: handle the new EML OMN failure notificationEmmanuel Grumbach2024-08-271-0/+42
| | | | | | | | | | | | | | | | | | Take the proper action upon EML OMN frame failure. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240825090005.01ff45fa69db.I9f2d3ea851050f6031ac07bbe69eb38000fd5683@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: mvm: handle the new missed beacons notificationEmmanuel Grumbach2024-08-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | Use the same handler for both types and just convert the old version to the new. Drop the unused fields from the old one and fake the new fields. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240808232017.a64ffc998569.I7d181052b1a69c331d07263f20c1e00cbc0bc891@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: mvm: rename iwl_missed_beacons_notifEmmanuel Grumbach2024-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | A new version is coming up. Rename the current struct to include the current version. s/iwl_missed_beacons_notif/iwl_missed_beacons_notif_v4 Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240808232017.b5c3a83a05ef.I698611582b5ca8395f42a535c51f7230307e2c6f@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: mvm: Offload RLC/SMPS functionality to firmwareDaniel Gabay2024-08-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the driver handles SMPS decisions by tracking AP capabilities, BT coexistence changes, sending necessary SMPS frames to the AP, and updating firmware with RX chain info using the RLC_CONFIG_CMD. Starting with version 3 of the RLC_CONFIG_CMD, the firmware takes over this responsibility. It now tracks SMPS, sends frames, and configures the RLC. In this patch: 1. Stop sending RLC_CONFIG_CMD when firmware supports RLC offload (version 3), as rlc.rx_chain_info is not needed by firmware, and no other field in the cmd is used. 2. Prevent the driver from forwarding any SMPS requests to mac80211, i.e., the driver should not transmit SMPS frames to the AP as firmware handles that. 3. Set NL80211_FEATURE_DYNAMIC_SMPS and NL80211_FEATURE_STATIC_SMPS conditionally based on RLC version. Signed-off-by: Daniel Gabay <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240808232017.45da23be1f65.I0d46db82dd990a82e8a66876fe2f5310bc9513be@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: Enable channel puncturing for US/CAN from biosSomashekhar(Som)2024-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | Add support for enabling channel puncturing for US/CAN based on BIOS configuration through UEFI Signed-off-by: Somashekhar(Som) <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240729201718.828f3ecf5118.I5561ab8c7cd48ad4e5d6daf21b037bf88c619a4a@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: mvm: start to support the new BT profile notificationEmmanuel Grumbach2024-08-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | We have a new notification the BT profile. It contains almost nothing, only the wifi loss information. Copy this into mvm. We still need to iterate over the vifs / links to use this data. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240729201718.637499f3a85a.I8bf654cf5d8aa038100273876c936845ecc338f7@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: mvm: s/iwl_bt_coex_profile_notif/iwl_bt_coex_prof_old_notifEmmanuel Grumbach2024-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | The iwl_bt_coex_profile_notif is now being obsoleted. It'll be replaced by a new notification coming with a non-legacy group. Rename it to avoid confusion. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240729201718.dc29fd0d7817.I5881fce86ec8b76ae98d2948265434b8e7d860c1@changeid Signed-off-by: Johannes Berg <[email protected]>
* | wifi: iwlwifi: mvm: pause TCM when the firmware is stoppedEmmanuel Grumbach2024-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not doing so will make us send a host command to the transport while the firmware is not alive, which will trigger a WARNING. bad state = 0 WARNING: CPU: 2 PID: 17434 at drivers/net/wireless/intel/iwlwifi/iwl-trans.c:115 iwl_trans_send_cmd+0x1cb/0x1e0 [iwlwifi] RIP: 0010:iwl_trans_send_cmd+0x1cb/0x1e0 [iwlwifi] Call Trace: <TASK> iwl_mvm_send_cmd+0x40/0xc0 [iwlmvm] iwl_mvm_config_scan+0x198/0x260 [iwlmvm] iwl_mvm_recalc_tcm+0x730/0x11d0 [iwlmvm] iwl_mvm_tcm_work+0x1d/0x30 [iwlmvm] process_one_work+0x29e/0x640 worker_thread+0x2df/0x690 ? rescuer_thread+0x540/0x540 kthread+0x192/0x1e0 ? set_kthread_struct+0x90/0x90 ret_from_fork+0x22/0x30 Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240825191257.5abe71ca1b6b.I97a968cb8be1f24f94652d9b110ecbf6af73f89e@changeid Signed-off-by: Johannes Berg <[email protected]>
* | wifi: iwlwifi: mvm: take the mutex before running link selectionEmmanuel Grumbach2024-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iwl_mvm_select_links is called by the link selection worker and it requires the mutex. Take it in the link selection worker. This logic used to run from iwl_mvm_rx_umac_scan_complete_notif which had the mvm->mutex held. This was changed to run in a worker holding the wiphy mutex, but we also need the mvm->mutex. Fixes: 2e194efa3809 ("wifi: iwlwifi: mvm: Fix race in scan completion") Signed-off-by: Emmanuel Grumbach <[email protected]> Reviewed-by: Ilan Peer <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240825191257.0cacecd5db1e.Iaca38a078592b69bdd06549daf63408ccf1810e4@changeid Signed-off-by: Johannes Berg <[email protected]>
* | wifi: iwlwifi: mvm: fix hibernationEmmanuel Grumbach2024-08-261-1/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Fast resume is a feature that was recently introduced to speed up the resume time. It basically keeps the firmware alive while the system is suspended and that avoids starting again the whole device. This flow can't work for hibernation, since when the system boots, before the frozen image is loaded, the kernel may touch the device. As a result, we can't assume the device is in the exact same state as before the hibernation. Detect that we are resuming from hibernation through the PCI device and forbid the fast resume flow. We also need to shut down the device cleanly when that happens. In addition, in case the device is power gated during S3, we won't be able to keep the device alive. Detect this situation with BE200 at least with the help of the CSR_FUNC_SCRATCH register and reset the device upon resume if it was power gated during S3. Fixes: e8bb19c1d590 ("wifi: iwlwifi: support fast resume") Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240825191257.24eb3b19e74f.I3837810318dbef0a0a773cf4c4fcf89cdc6fdbd3@changeid Signed-off-by: Johannes Berg <[email protected]>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski2024-07-041-5/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/phy/aquantia/aquantia.h 219343755eae ("net: phy: aquantia: add missing include guards") 61578f679378 ("net: phy: aquantia: add support for PHY LEDs") drivers/net/ethernet/wangxun/libwx/wx_hw.c bd07a9817846 ("net: txgbe: remove separate irq request for MSI and INTx") b501d261a5b3 ("net: txgbe: add FDIR ATR support") https://lore.kernel.org/all/[email protected]/ include/linux/mlx5/mlx5_ifc.h 048a403648fc ("net/mlx5: IFC updates for changing max EQs") 99be56171fa9 ("net/mlx5e: SHAMPO, Re-enable HW-GRO") https://lore.kernel.org/all/[email protected]/ Adjacent changes: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c 4130c67cd123 ("wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereference") 3f3126515fbe ("wifi: iwlwifi: mvm: add mvm-specific guard") include/net/mac80211.h 816c6bec09ed ("wifi: mac80211: fix BSS_CHANGED_UNSOL_BCAST_PROBE_RESP") 5a009b42e041 ("wifi: mac80211: track changes in AP's TPE") Signed-off-by: Jakub Kicinski <[email protected]>
| * wifi: iwlwifi: mvm: check vif for NULL/ERR_PTR before dereferenceMiri Korenblit2024-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iwl_mvm_get_bss_vif might return a NULL or ERR_PTR. Some of the callers check only the NULL case, and some doesn't check at all. Some of the callers even have a pointer to the mvmvif of the bss vif, so we don't even need to call this function, and can simply get the vif from mvmvif. Do it for those cases, and for the others - properly check if IS_ERR_OR_NULL Fixes: ec0d43d26f2c ("wifi: iwlwifi: mvm: Activate EMLSR based on traffic volume") Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240703064027.a661f8c65aac.I45cf09b01af8ee3d55828863958ead741ea43b7f@changeid Signed-off-by: Johannes Berg <[email protected]>
| * wifi: iwlwifi: mvm: don't wake up rx_sync_waitq upon RFKILLEmmanuel Grumbach2024-07-031-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Since we now want to sync the queues even when we're in RFKILL, we shouldn't wake up the wait queue since we still expect to get all the notifications from the firmware. Fixes: 4d08c0b3357c ("wifi: iwlwifi: mvm: handle BA session teardown in RF-kill") Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20240703064027.be7a9dbeacde.I5586cb3ca8d6e44f79d819a48a0c22351ff720c9@changeid Signed-off-by: Johannes Berg <[email protected]>