Commit Graph

342 Commits

Author SHA1 Message Date
Jose Ignacio Tornos Martinez 9a4754c12c wifi: iwlwifi: mvm: Fix response handling in iwl_mvm_send_recovery_cmd()
JIRA: https://issues.redhat.com/browse/RHEL-67113
JIRA: https://issues.redhat.com/browse/RHEL-68158
CVE: CVE-2024-53059

commit 07a6e3b78a65f4b2796a8d0d4adb1a15a81edead
Author: Daniel Gabay <daniel.gabay@intel.com>
Date:   Thu Oct 10 14:05:05 2024 +0300

    wifi: iwlwifi: mvm: Fix response handling in iwl_mvm_send_recovery_cmd()
    
    1. The size of the response packet is not validated.
    2. The response buffer is not freed.
    
    Resolve these issues by switching to iwl_mvm_send_cmd_status(),
    which handles both size validation and frees the buffer.
    
    Fixes: f130bb75d8 ("iwlwifi: add FW recovery flow")
    Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20241010140328.76c73185951e.Id3b6ca82ced2081f5ee4f33c997491d0ebda83f7@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-11-22 10:58:20 +01:00
Jose Ignacio Tornos Martinez f934e6e166 wifi: iwlwifi: remove MVM prefix from FW macros
JIRA: https://issues.redhat.com/browse/RHEL-67113

commit cb2b6ce8b2e9289b95d6b997eecdf3083107acad
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Mon Jul 29 20:20:04 2024 +0300

    wifi: iwlwifi: remove MVM prefix from FW macros
    
    These are not mvm specific.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Link: https://patch.msgid.link/20240729201718.939b32f84f46.I293957bf172680871eba24448d9d1870e49100b6@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-11-22 10:57:56 +01:00
Jose Ignacio Tornos Martinez cd8fa78ea9 wifi: iwlwifi: mvm: add support for new REDUCE_TXPOWER_CMD versions
JIRA: https://issues.redhat.com/browse/RHEL-67113

commit 535f01905afac5a5ad420bb94970d410f5e6fec6
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Mon Jul 29 20:20:03 2024 +0300

    wifi: iwlwifi: mvm: add support for new REDUCE_TXPOWER_CMD versions
    
    New API versions are coming up for this command.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240729201718.7ec1527be98c.I52dede6532bc61041c441caee5273734f14a1d78@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-11-22 10:57:56 +01:00
Jose Ignacio Tornos Martinez 93b65c241f wifi: iwlwifi: mvm: prepare the introduction of V9 of REDUCED_TX_POWER
JIRA: https://issues.redhat.com/browse/RHEL-67113

commit cfc13542aa693f248b5b67828a9231c849554dc3
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Mon Jul 29 20:20:02 2024 +0300

    wifi: iwlwifi: mvm: prepare the introduction of V9 of REDUCED_TX_POWER
    
    * Rename iwl_dev_tx_power_cmd to iwl_dev_tx_power_cmd_v3_v8
    * struct iwl_dev_tx_power_common needs to be packed. It was always the
      case, but now that its size is not a multiple of 4, it becomes
      meaningful.
    * Move per_band data out of the common structure since it won't be
      present in the new versions of the command.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240729201718.8da29a66984f.I922bdef4740d990f98cb452e858c4157bbc491c5@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-11-22 10:57:56 +01:00
Jose Ignacio Tornos Martinez 33173b2164 wifi: iwlwifi: mvm: don't log error for failed UATS table read
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit c0b047fd243360bc10dfff100d23de3eb08ebc73
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Tue Jun 25 19:51:15 2024 +0300

    wifi: iwlwifi: mvm: don't log error for failed UATS table read
    
    This causes unnecessary error level kernel messages if the platform
    does not have any UATS table.
    
    Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
    Reviewed-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240625194805.306b7eed8671.I6e9294335378dab38ef957866a0d39ec1a2df7f8@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:18:15 +01:00
Jose Ignacio Tornos Martinez 7a5d929116 wifi: iwlwifi: mvm: remove init_dbg module parameter
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 3778a17ab054313a5513e3341eaff49aea65a88a
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Jun 25 19:51:12 2024 +0300

    wifi: iwlwifi: mvm: remove init_dbg module parameter
    
    This is no longer used
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Link: https://patch.msgid.link/20240625194805.17a1484f2485.I095c7482ac517111081f8ff40312b48ffdd7ff94@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:18:14 +01:00
Jose Ignacio Tornos Martinez 18731ff370 wifi: iwlwifi: mvm: don't flush BSSes on restart with MLD API
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit f9414f8067015b1db14d374a33fbafc8395eb958
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Jun 25 19:51:08 2024 +0300

    wifi: iwlwifi: mvm: don't flush BSSes on restart with MLD API
    
    If the firmware has MLD APIs, it will handle all timing and we
    don't need to give it timestamps. Therefore, we don't care about
    the timestamps stored in the BSS table, so there's no need to
    flush the BSS table.
    
    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/20240625194805.c6d86dc2377e.I246d0fae0d23ed34b7cd9c3400edb004eb5ac1d0@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:18:14 +01:00
Jose Ignacio Tornos Martinez b81337323a wifi: iwlwifi: mvm: don't limit VLP/AFC to UATS-enabled
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit f9802d531835b7591a9ddf99996e0f3ae59093f0
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Jun 18 19:59:45 2024 +0300

    wifi: iwlwifi: mvm: don't limit VLP/AFC to UATS-enabled
    
    When UATS isn't enabled (no VLP/AFC AP support), we need to still
    set the right bits in the channel/regulatory flags, so remove the
    uats_enabled argument to the parsing etc.
    
    Also, firmware deals just fine with getting the UATS table if it
    supports the command even if the bits aren't set, so always send
    it, since it's also needed if BIT(31) is set, but the driver need
    not have any knowledge of that. Remove 'uats_enabled' entirely.
    
    Fixes: 0d2fc8821a7d ("wifi: iwlwifi: nvm: parse the VLP/AFC bit from regulatory")
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240618195731.a81e7234c4f6.Ic0131180d38e0f1ead2f7fa0e7583407ceaa0bd1@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:18:13 +01:00
Jose Ignacio Tornos Martinez 813b6fd2f1 wifi: iwlwifi: mvm: rename 'pldr_sync'
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 67c638675dcdad588aeb71e67dde77b48a53a320
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Jun 18 19:44:11 2024 +0300

    wifi: iwlwifi: mvm: rename 'pldr_sync'
    
    PLDR (product level device reset) is a Windows term, and
    is something the driver triggers there, AFAICT.
    
    Really what 'pldr_sync' here wants to capture is whether
    or not the firmware will/may do a product reset during
    initialization, which makes the device drop off the bus,
    requiring a rescan. If this is the case, obviously the
    init will fail/time out, so we don't want to report all
    kinds of errors etc., hence this tracking variable.
    
    Rename it to 'fw_product_reset' to capture the meaning
    better.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240618194245.ccf849642af8.I01dded6b2393771b7baf8b4b17336784d987c7c2@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:18:13 +01:00
Jose Ignacio Tornos Martinez 79682b5c69 wifi: iwlwifi: mvm: remove IWL_MVM_PARSE_NVM
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit f77bd9491f7fad1f1e3d12ff25469f75d97cb1d4
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Jun 18 19:44:04 2024 +0300

    wifi: iwlwifi: mvm: remove IWL_MVM_PARSE_NVM
    
    This debug is not in use anymore. Remove it.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://patch.msgid.link/20240618194245.bded22049fae.I980c4a941d769f93cf74bfc90a7d7d9fb384dea1@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:18:12 +01:00
Jose Ignacio Tornos Martinez 0dbec572d0 wifi: iwlwifi: mvm: don't track used links separately
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit ed93faf01797d83b3347168adae93e6eb5fc1d9c
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sun May 12 07:31:07 2024 +0300

    wifi: iwlwifi: mvm: don't track used links separately
    
    We track which link is using which FW link ID, so there
    really isn't a need to separately track which link IDs
    are in use. Remove that code and check the table when
    looking for a new link ID to use.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240512072733.1a67d8af815f.Ie642c12dce3ab55c688abd9a25918569e83e558a@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:17:46 +01:00
Jose Ignacio Tornos Martinez 59c6239cd8 wifi: iwlwifi: mvm: align UATS naming with firmware
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 2848df961f18824fa707960477827e8772d451c6
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon May 6 10:04:15 2024 +0300

    wifi: iwlwifi: mvm: align UATS naming with firmware
    
    The firmware has different names for this, which is confusing
    as even the convention of having the firmware name in a comment
    after the struct definition wasn't met here. Fix the naming,
    but keep UATS in some of it since that's the BIOS name.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240506095953.b0dfe17d5f44.I8f5f5a831c7b934ce3140f838315827c018103bb@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:17:22 +01:00
Jose Ignacio Tornos Martinez c1c5cbad7e wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v10
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 332ff43251855fead212f689b6e045809bc9acde
Author: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Date:   Mon Apr 15 11:54:42 2024 +0300

    wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v10
    
    Add support for enable/disable 320 MHz for Japan and South Korea
    by reading WBEM (WiFi Bandwidth Enablement per MCC) variable from
    UEFI or ACPI and sending it to the FW.
    
    Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240415114847.7946c3befbe1.I453c33f7ea48156ea2a3961f50a9003103fca5a5@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:16:56 +01:00
Jose Ignacio Tornos Martinez c8fa3e951e wifi: iwlwifi: move lari_config handlig to regulatory
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit aa80f4844b16df3e2cf12f2ee9decbe824190d86
Author: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Date:   Mon Apr 15 11:54:40 2024 +0300

    wifi: iwlwifi: move lari_config handlig to regulatory
    
    moved lari_config handling to common place to avoid code duplication.
    
    Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240415114847.02bfcd27b333.If149c3038bdfe57e254b26857209e8c7ab709779@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:16:56 +01:00
Jose Ignacio Tornos Martinez 4da8565646 wifi: iwlwifi: mvm: extend STEP URM workaround for new devices
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 554fa7114f24f6a74096e15959adf8512df63cc7
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon Apr 15 11:54:37 2024 +0300

    wifi: iwlwifi: mvm: extend STEP URM workaround for new devices
    
    The same applies for newer devices (currently SC), so just
    change the condition here.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240415114847.db62bba6b2fa.Ie7fdc75c0b8759574a8744f0a316065cb791dd82@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:16:55 +01:00
Jose Ignacio Tornos Martinez 91b8bf5120 wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD cmd v9
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 6b3e87cc0ca5f61a781c3abc651f0eb5a20f6e58
Author: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Date:   Wed Mar 20 23:26:34 2024 +0200

    wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD cmd v9
    
    There is a requirement from OEMs to support new bits in DSM function 7,
    which will indicate enablement of 5.9 GHz in Canada.
    Add support for this by reading those bits from BIOS and sending it to the
    FW. mask unii4 allow bitmap based on LARI_CONFIG_CHANGE_CMD version
    
    Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
    Reviewed-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240320232419.5c31ccd73119.I0363992efc3607368648d34a7918b2534150a3ca@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:16:44 +01:00
Jose Ignacio Tornos Martinez 517ed0255c wifi: iwlwifi: mvm: fix a crash on 7265
JIRA: https://issues.redhat.com/browse/RHEL-57681

commit 788e4c75f831d06fcfbbec1d455fac429521e607
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Sun May 12 07:31:06 2024 +0300

    wifi: iwlwifi: mvm: fix a crash on 7265
    
    Since IWL_FW_CMD_VER_UNKNOWN = 99, then my change to consider
    cmd_ver >= 7 instead of cmd_ver = 7 included also firmwares that don't
    advertise the command version at all. This made us send a command with a
    bad size and because of that, the firmware hit a BAD_COMMAND immediately
    after handling the REDUCE_TX_POWER_CMD command.
    
    Fixes: 8f892e225f41 ("wifi: iwlwifi: mvm: support iwl_dev_tx_power_cmd_v8")
    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://msgid.link/20240512072733.eb20ff5050d3.Ie4fc6f5496cd296fd6ff20d15e98676f28a3cccd@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-09-13 12:24:30 +02:00
Jose Ignacio Tornos Martinez 229068b6c4 wifi: iwlwifi: mvm: support iwl_dev_tx_power_cmd_v8
JIRA: https://issues.redhat.com/browse/RHEL-57681

commit 8f892e225f416fcf2b55a0f9161162e08e2b0cc7
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Tue Mar 19 10:10:18 2024 +0200

    wifi: iwlwifi: mvm: support iwl_dev_tx_power_cmd_v8
    
    This just adds a __le32 that we (currently) don't use.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240319100755.29ff7a88ddac.I39cf2ff1d1ddf0fa62722538698dc7f21aaaf39e@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-09-13 12:24:29 +02:00
CKI Backport Bot 75a3789e92 wifi: iwlwifi: mvm: don't read past the mfuart notifcation
JIRA: https://issues.redhat.com/browse/RHEL-48026
CVE: CVE-2024-40941

commit 4bb95f4535489ed830cf9b34b0a891e384d1aee4
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Mon May 13 13:27:14 2024 +0300

    wifi: iwlwifi: mvm: don't read past the mfuart notifcation

    In case the firmware sends a notification that claims it has more data
    than it has, we will read past that was allocated for the notification.
    Remove the print of the buffer, we won't see it by default. If needed,
    we can see the content with tracing.

    This was reported by KFENCE.

    Fixes: bdccdb854f ("iwlwifi: mvm: support MFUART dump in case of MFUART assert")
    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://msgid.link/20240513132416.ba82a01a559e.Ia91dd20f5e1ca1ad380b95e68aebf2794f553d9b@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
2024-07-15 11:55:37 +00:00
Jose Ignacio Tornos Martinez 5f44cc6942 wifi: iwlwifi: don't use TRUE/FALSE with bool
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 8efadbc3882b8f9084869c5da9660d49cd62c060
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Feb 8 18:58:40 2024 +0200

    wifi: iwlwifi: don't use TRUE/FALSE with bool
    
    With C99 bool we really also should use true/false, not the
    upper-case variants, wherever they may actually be coming
    from. Fix that.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240208185302.5732dd306ee9.Ifc07c026ac3779429e3dc949e96c9437e89f7bf9@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:32 +02:00
Jose Ignacio Tornos Martinez 4f116e007f wifi: iwlwifi: take SGOM and UATS code out of ACPI ifdef
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 74f4cd71070538bd9a8b6686fc53e7b77d510afa
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Mon Feb 5 21:21:04 2024 +0200

    wifi: iwlwifi: take SGOM and UATS code out of ACPI ifdef
    
    The BIOS tables SGOM and UATS are read from UEFI, but require
    additional tables (WGDS and DSM func 3, respectively) which used to be
    read from ACPI only, so the code handling those tables had to be under
    ifdef ACPI. But now the driver reads those tables (WGDS and DSM) from
    both ACPI and UEFI, so SGOM and UATS code shouldn't be under ifdef ACPI
    anymore.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240205211151.dcaa3325773f.I649079c842369dcae3a362842322deca422a61d5@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:23 +02:00
Jose Ignacio Tornos Martinez 7a6ef58f44 wifi: iwlwifi: mvm: fix warnings from dmi_get_system_info()
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 6256760f37baa2e4bf34dcbef69d7450460df9bd
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sun Feb 4 10:56:27 2024 +0100

    wifi: iwlwifi: mvm: fix warnings from dmi_get_system_info()
    
    dmi_get_system_info() will statically return NULL when the
    kernel is compiled without CONFIG_DMI, leading to compiler
    warnings. Fix that by printing "<unknown>" in that case.
    
    Fixes: c3f40c3e0273 ("iwlwifi: mvm: add US/CA to TAS block list if OEM isn't allowed")
    Fixes: 9457077df49e ("wifi: iwlwifi: mvm: Add debugfs to get TAS status")
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:08 +02:00
Jose Ignacio Tornos Martinez e58bba0b54 wifi: iwlwifi: read DSM functions from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit fc7214c3c986142758ae9d2cd456c98e48547b5e
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Feb 1 16:17:37 2024 +0200

    wifi: iwlwifi: read DSM functions from UEFI
    
    For each DSM function, try to first read it from the UEFI.
    If the UEFI WIFI GUID is unclocked, or the DSM function in
    UEFI is invalid/unavailable - read it from ACPI.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240201155157.27dd626ce2bd.Ib90bab74a9d56deb2362edb712294360e4ddae5b@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:07 +02:00
Jose Ignacio Tornos Martinez c2d68b4b83 wifi: iwlwifi: prepare for reading DSM from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit dc4fe7500e7a1a1ab56a7708ac9be4c90fd12174
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Feb 1 16:17:36 2024 +0200

    wifi: iwlwifi: prepare for reading DSM from UEFI
    
    Move all the common items (functions, enumerations and mcaros)
    to regulatory.h/c files, and rename it to a common name.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240201155157.eae9bcbc0023.If1175f3143d6369076669ddd5d6ad4df0ee00659@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:07 +02:00
Jose Ignacio Tornos Martinez 2a9d00d48d wifi: iwlwifi: simplify getting DSM from ACPI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 091d89428f18ac8e67b4032dfa305e957040bdd9
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Feb 1 16:17:35 2024 +0200

    wifi: iwlwifi: simplify getting DSM from ACPI
    
    As DSMs are going to be read from UEFI too, we need a unified API
    to get DSMs for both ACPI and UEFI.
    
    The difference in getting DSM in each one of these methods (ACPI, UEFI)
    is in the GUID, revision (0 for ACPI, 4 for UEFI), and size of the DSM
    values (8 or 32 for ACPI, 32 for UEFI).
    
    Therefore, change the iwl_acpi_get_dsm_x() to iwl_acpi_get_dsm() which
    determines the GUID, revision (these two are the same for all WiFi DSMs),
    and size (based on a func-to-size mapping) internally.
    
    While at it, fix DSM_FUNC_RFI_CONFIG to expect a 32-bit value
    (as defined in Intel BIOS spec) and not a 8-bit one.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240201155157.1bcd7072a7a5.I344ee0a11abbc27da0c693187d1b8bee653aaeef@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:07 +02:00
Jose Ignacio Tornos Martinez 125ca15a90 wifi: iwlwifi: take send-DSM-to-FW flows out of ACPI ifdef
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit b97ada404c4eecb90c79fd884cdc09022d549d20
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Feb 1 16:17:34 2024 +0200

    wifi: iwlwifi: take send-DSM-to-FW flows out of ACPI ifdef
    
    These functions shouldn't be ACPI_CONFIG dependent, as they don't
    access the ACPI. The functions that really access ACPI -
    already handle the case that CONFIG_ACPI is not set.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240201155157.1412e6d561f8.I84f67478d01b576457e1bf489fbcb044adfda6fe@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:07 +02:00
Jose Ignacio Tornos Martinez 52fc831e80 wifi: iwlwifi: rfi: use a single DSM function for all RFI configurations
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit dc2b94a111e0fb3779a86dd8d303ad842880f869
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Feb 1 16:17:33 2024 +0200

    wifi: iwlwifi: rfi: use a single DSM function for all RFI configurations
    
    RFI configuration moved from internal guid to the wifi guid, DSM
    function 11. Update reading RFI configuration from BIOS.
    
    Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240201155157.f4e62435310d.I4f9b6860dd8e3c7ae1f816be5ff8b5967eee266f@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:07 +02:00
Jose Ignacio Tornos Martinez 9821b41b13 wifi: iwlwifi: read ECKV table from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 20935f3e646e687f32f044d9d75a4a8637c086db
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Feb 1 16:17:32 2024 +0200

    wifi: iwlwifi: read ECKV table from UEFI
    
    Try to read the ECKV table from UEFI first,
    and if the WIFI UEFI tables are unlocked or the
    table doesn't exist - try to read it from ACPI.
    
    Change iwl_acpi_get_eckv() to receive fwrt as argument so
    it will be the same as all iwl_acpi_get_x() functions,
    so it could  be generated by the macro.
    
    While at it - move the reading of ECKV to INIT stage. There is no
    reason to read it each time we load the FW.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240201155157.d4937cc00727.I36e5fc7f7850229b9b377c80b5203aa47137c97c@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:07 +02:00
Jose Ignacio Tornos Martinez 0bbc722ed1 wifi: iwlwifi: read WTAS table from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 084e0452a42b1d4ccde601cc1873a4ee9d8a4cbb
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:47 2024 +0200

    wifi: iwlwifi: read WTAS table from UEFI
    
    Try to read the WTAS table from UEFI first,
    and if the WIFI UEFI tables are unlocked or the
    table doesn't exist - try to read it from ACPI.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.45e6ff7b5063.Id3aec70887e14533b10d564f32c0cf5f2a14b792@changeid
    [move uefi_tables_lock_status outside ifdef to fix build errors]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:05 +02:00
Jose Ignacio Tornos Martinez fb95c85c99 wifi: iwlwifi: separate TAS 'read-from-BIOS' and 'send-to-FW' flows
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 3bc67e7c18cd69e88b801336cfe2a4dc7b4981a4
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:46 2024 +0200

    wifi: iwlwifi: separate TAS 'read-from-BIOS' and 'send-to-FW' flows
    
    Currently the TAS 'read-from-BIOS' flow receives the command struct
    and the version of it as read from FW TLVs, and fills the command
    accordingly.
    This seems wrong, we should have the 'read-from-BIOS' flow
    (iwl_acpi_get_tas in iwlwifi) reading/parsing/validating the table from
    BIOS, and the 'send-to-FW' flow (iwl_mvm_tas_init) doing
    all the FW versioning checks and cmd filling.
    Move the cmd filling to the 'send-to-fw' flow.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.24df27772a71.I57b702af4feb3f38dc21d52593c25de4b1999e4b@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:04 +02:00
Jose Ignacio Tornos Martinez 9cb0a9264f wifi: iwlwifi: prepare for reading TAS table from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit ad5a85d8fdd346ecc34217e3bd713bf0b519912d
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:45 2024 +0200

    wifi: iwlwifi: prepare for reading TAS table from UEFI
    
    We are going to support reading BIOS tables from UEFI
    too, Refactor the TAS table flow:
    
    1. Rename and move the common code to the regulatory.h/c files.
    2. Remove the IWL_TAS_BLOCK_LIST_MAX, as we can use IWL_WTAS_BLACK_LIST_MAX
       instead.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.0c2197cf1feb.Ib0e83d5bd3f4d5cfa9c3d2925317ba49377d257f@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:04 +02:00
Jose Ignacio Tornos Martinez 59c6c6f171 wifi: iwlwifi: read PPAG table from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit bc8d0a4528f167742ecb511ba663795235e9d15c
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:43 2024 +0200

    wifi: iwlwifi: read PPAG table from UEFI
    
    Try to read the PPAG table from UEFI first,
    and if the WIFI UEFI tables are unlocked or the
    table doesn't exist - try to read it from ACPI
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.6516da09aec1.I0dcaf0b6d8857417ba1318467a28da5d0d7d7f27@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:04 +02:00
Jose Ignacio Tornos Martinez fea12ab868 wifi: iwlwifi: prepare for reading PPAG table from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 09059c6764a8870ff7515c2d78ecbea7fbcffc23
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:41 2024 +0200

    wifi: iwlwifi: prepare for reading PPAG table from UEFI
    
    As PPAG table is going to be read from UEFI, there are some
    cleanups required:
    Move functions/definitions that are common to both UEFI and ACPI to
    regulatory.h/c.
    In addition, rename the functions/macros names so it will be clear which
    one is ACPI specific, and which is common for ACPI and UEFI.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.25623670b422.I8132af7517e4faf0ea8cbeb2efe9651edd319b98@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:04 +02:00
Jose Ignacio Tornos Martinez b945785379 wifi: iwlwifi: small cleanups in PPAG table flows
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit be3a8cbb1ca7d6737bfff9ea9ca260958f4bf6f0
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:40 2024 +0200

    wifi: iwlwifi: small cleanups in PPAG table flows
    
    1. The name of iwl_read_ppag_table is misleading, as this function only
       fills the command structure from the previously read table. Rename it.
    2. Don't initialize fwrt::ppag_flags to 0 as the entire fwrt is zeroed
       in the INIT stage anyway.
    3. Don't filter out the reserved bits from fwrt::ppag_flags when printing
       it, as it is already done in 'read-from-bios' flow.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.48acf340e817.I810e457b80015c1931d96d3e13c849f0339723c3@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:04 +02:00
Jose Ignacio Tornos Martinez e9239690f1 wifi: iwlwifi: read SAR tables from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 427661e4c48887ea2a226cd972e574ae7686fb95
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:39 2024 +0200

    wifi: iwlwifi: read SAR tables from UEFI
    
    All the regulatory tables will be read from UEFI, and
    only if it doesn't exist - they will be read from ACPI.
    Read SAR tables (WRDS, EWRD and WGDS) from UEFI.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.533b687e1efb.Icb316291e593c8d53f41fdea2d083367dc97e3c4@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:03 +02:00
Jose Ignacio Tornos Martinez 2c7719cc8d wifi: iwlwifi: cleanup sending PER_CHAIN_LIMIT_OFFSET_CMD
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit c0a3dfc1ce955732ae8cd301a052f2277aa55436
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:38 2024 +0200

    wifi: iwlwifi: cleanup sending PER_CHAIN_LIMIT_OFFSET_CMD
    
    iwl_geo_tx_power_profiles_cmd::table_revision indicates whether
    to use South Korea scheme or not.
    We use South Korea scheme if the revision of WGDS table is 1.
    
    We used to read the WGDS table from ACPI inside iwl_sar_geo_fill_table(),
    so we had to set table_revision only after the call to it.
    This added an extra if...else for each cmd version.
    
    But it has been a while since we moved the BIOS tables reading to
    INIT stage, and iwl_sar_geo_fill_table() is now only copying the
    previously stored table to the cmd structure.
    
    Set the table_revision before the call to iwl_sar_geo_fill_table()
    and avoid that extra if...else.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.17a2384d4535.I306570874f1da0c6345066ebbf74a04b6c8aeb37@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:03 +02:00
Jose Ignacio Tornos Martinez 4c6cc4e96b wifi: iwlwifi: prepare for reading SAR tables from UEFI
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 2594e4d9e1a2d79bf7bb262974abaf5ef153e371
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Jan 31 10:24:37 2024 +0200

    wifi: iwlwifi: prepare for reading SAR tables from UEFI
    
    The driver will support reading BIOS tables from UEFI
    too. Refactor the SAR tables (WRDS, EWRD, WGDS) flows:
    
    1. Move all the SAR logic/definitions that is common to both
       UEFI and ACPI to a new file - regulatory.h/c.
    2. Rename the relevant functions/definitions
       so it will be clear which is ACPI specific and which is
       for both ACPI and UEFI
    3. Rename the function that copies the stored tables into the different
       commands structures, so will be clear what these functions do.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240131091413.429a9baff34a.I040460348aa1b43609be3a317b86722d6be71c28@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:03 +02:00
Jose Ignacio Tornos Martinez 0c468d336e wifi: iwlwifi: implement GLAI ACPI table loading
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit ebe8f41319fabee020736220942d79c1644bea85
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Sun Jan 28 08:53:59 2024 +0200

    wifi: iwlwifi: implement GLAI ACPI table loading
    
    All the regulatory tables from BIOS are going to be loaded
    (preferably) from the UEFI instead of the ACPI.
    There is a security issue with the fact that anyone can
    add these UEFI variables.
    The solution for that is to have a lock for all WIFI GUID UEFI
    variables, and only if the UEFI variables are locked then we can
    read it.
    The status of the lock (unlocked, locked, test mode) is indicated
    in a ACPI table: Guid Lock ACPI Indicator.
    Load this table so the driver knows whether to read from UEFI or
    not
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://msgid.link/20240128084842.53994809fbdd.I1bd10aafc387bc04f375e386861ee2bcb82f0a61@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:00 +02:00
Jose Ignacio Tornos Martinez 9200dadab8 wifi: iwlwifi: mvm: disconnect station vifs if recovery failed
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit e50a88e5cb8792cc416866496288c5f4d1eb4b1f
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Sun Jan 28 08:53:56 2024 +0200

    wifi: iwlwifi: mvm: disconnect station vifs if recovery failed
    
    This will allow to reconnect immediately instead of leaving the
    connection in a limbo state.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240128084842.e90531cd3a36.Iebdc9483983c0d8497f9dcf9d79ec37332a5fdcc@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:19:00 +02:00
Jose Ignacio Tornos Martinez 27d43c949e wifi: iwlwifi: mvm: limit EHT 320 MHz MCS for STEP URM
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit de0c2cdcb7eb8e08f3886b433277472d97af0f6e
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Jan 23 20:08:14 2024 +0200

    wifi: iwlwifi: mvm: limit EHT 320 MHz MCS for STEP URM
    
    If the STEP (the interface between MAC and PHY) is in URM
    (a lower speed mode) then we cannot use 320 MHz MCS > 9.
    Therefore, limit the MCS in our capabilities in this case.
    Note that this also limits the TX/rate scaling since that
    takes both TX and RX capabilities into account.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240123200528.02bae683b7fc.Id5efbb71d45da02c8c4e211d20396637ddd44da8@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-06-17 09:18:51 +02:00
Jose Ignacio Tornos Martinez 435ec0f6d9 wifi: iwlwifi: mvm: add US/Canada MCC to API
JIRA: https://issues.redhat.com/browse/RHEL-28754

commit f7e3ab5c33834c0a699ef4b53417cfa2df2bca26
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Dec 19 21:58:59 2023 +0200

    wifi: iwlwifi: mvm: add US/Canada MCC to API
    
    We don't want to duplicate the definitions later,
    so add them to the API.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20231219215605.6595e905997b.I12354d31676911b29ab30c81a4e9b87f59284d3b@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-03-18 17:58:12 +01:00
Jose Ignacio Tornos Martinez e78a69ba96 wifi: iwlwifi: fw: Add support for UATS table in UHB
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit 4a9bb5b4d94999af8a9156e7004cad28db8cde38
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Sun Oct 22 17:55:50 2023 +0300

    wifi: iwlwifi: fw: Add support for UATS table in UHB
    
    Driver need to provide details of VLP, AFC
    AP type supported for the specific MCC to firmware.
    Driver will read the UATS (UHB AP type support) table
    from BIOS and sent to firmware using UATS_TABLE_CMD.
    
    Add the support for the same in the driver.
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20231022173519.eb6cf7be17b2.I8977a660564412056d9fd383d57b236cd4b22d00@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:53 +01:00
Jose Ignacio Tornos Martinez b1ae16276c wifi: iwlwifi: add support for activating UNII-1 in WW via BIOS
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit c3e5f5f60ef2da3976c77a4f389aeecc5cf31f6b
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Wed Oct 11 13:07:31 2023 +0300

    wifi: iwlwifi: add support for activating UNII-1 in WW via BIOS
    
    There is a requirement from OEMs to support a new bit in DSM function 8,
    which will indicate that this device is an indoor one, and that it
    should activate UNII-1 (5.2GHz) sub band in the World Wide Geo Profile.
    Add support for this by reading this bit from BIOS and sending it to the
    FW.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20231011130030.86d4ad178042.Ief40acc08b5482ff147fd17e74e36f1933e43def@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:50 +01:00
Jose Ignacio Tornos Martinez a0fa38a9c7 wifi: iwlwifi: mvm: extend alive timeout to 2 seconds
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit abea0d067d4c57e6506537249636c95e71c4ed28
Author: Haim Dreyfuss <haim.dreyfuss@intel.com>
Date:   Wed Oct 11 13:07:27 2023 +0300

    wifi: iwlwifi: mvm: extend alive timeout to 2 seconds
    
    There are devices that need longer time to get the alive notification.
    
    Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20231011130030.f1f0aa1794e6.I34a06ef24b642a32af69c0bd109694de469d5177@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:49 +01:00
Jose Ignacio Tornos Martinez 3ba33f2f21 wifi: iwlwifi: mvm: don't add dummy phy context
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit f3276ff0d498a364dfdff74cc1825b5f6e27f472
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Wed Oct 11 13:07:24 2023 +0300

    wifi: iwlwifi: mvm: don't add dummy phy context
    
    From its very first stages of development, iwlmvm added all the PHY
    context immediately upon firmware boot. Then, all we needed to do is to
    modify the contexts. This was fine if the addition of a PHY context that
    we don't need is free. This was true until now. Newer devices will run
    calibrations upon the addition of a PHY context.
    
    Change the way we work with PHY context in iwlmvm. Fortunately, we
    already have all the ref counting in place so that it is not very hard
    to do.
    
    Also, since we now remove the PHY context before the link is removed
    (but after it has been de-activated of course), it'll confuse the
    firmware if we put the late phy_id into the LINK command that removes
    the link. Change this to put an invalid phy_id just like we do when we
    add a link that has no PHY context yet.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20231011130030.55a1a78719be.I2032a7d227b57f4fc4370a2793476d47538404fd@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:49 +01:00
Jose Ignacio Tornos Martinez e14f0605cc wifi: iwlwifi: send EDT table to FW
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit c8e01fe070d4e663f4040250c579723ca1edb7d6
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Wed Oct 11 13:07:21 2023 +0300

    wifi: iwlwifi: send EDT table to FW
    
    Read the EDT (Energy detection threshold) optimization configuration
    table from BIOS using DSM Function and send it to FW.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20231011130030.0b78ee48219a.I8ecbd39d258e2ee0514a7e28632f6c18fb798a83@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:48 +01:00
Jose Ignacio Tornos Martinez ceb4735674 wifi: iwlmvm: fw: Add new OEM vendor to tas approved list
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit 8bbe27db8eb10a0f3650550a120fc535715d1463
Author: Matt Chen <matt.chen@intel.com>
Date:   Wed Oct 11 13:07:19 2023 +0300

    wifi: iwlmvm: fw: Add new OEM vendor to tas approved list
    
    Add new oem/odm pair to tas approved vendors list when specified by platform.
    
    Signed-off-by: Matt Chen <matt.chen@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20231011130030.a6f10aaae473.I65c3321535674bbc08d96200961a78fab5e7a09f@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:48 +01:00
Jose Ignacio Tornos Martinez d54f6f4c8c wifi: iwlwifi: mvm: fix SB CFG check
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit 3277baa9a76732dd90f356144590d302231ca0d3
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Oct 4 12:36:25 2023 +0300

    wifi: iwlwifi: mvm: fix SB CFG check
    
    We shouldn't check the 0x10 bit here, since the register
    holds different values (not just bit masks.). Check for
    the exact value where this is needed only.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20231004123422.ab21c7d5e219.I4f9906ebc7ecf38fd276510a276280a9261c8f7f@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:46 +01:00
Jose Ignacio Tornos Martinez f0af742540 wifi: iwlwifi: mvm: make pldr_sync AX210 specific
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit a856ce662c476d75405f576809b84f752909ddac
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Sep 21 11:58:06 2023 +0300

    wifi: iwlwifi: mvm: make pldr_sync AX210 specific
    
    The register here is device specific, so we need to gate
    the reading/checking to apply only on AX210 family.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230921110726.928901700ad8.I648efdc4400d9e537359915a9a8f363d5d255ead@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:15 +01:00
Jose Ignacio Tornos Martinez 844fbe9f4e wifi: iwlwifi: mvm: support set_antenna()
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit 4ea1ed1d14d86173ff4298b1d8fcb60946602f93
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Thu Sep 21 11:57:59 2023 +0300

    wifi: iwlwifi: mvm: support set_antenna()
    
    set_antenna() is supported only when the device is not started in
    mac80211 which translates to the firmware not being loaded in iwlwifi.
    
    The tricky part is that iwlwifi populates the sband data during its boot
    and doesn't touch this data afterwards, but if the antenna settings
    forbid MIMO, we need to update the sband data.
    
    Rework the nvm parsing code to allow to get an existing nvm_data and
    modify the sband with additional constraints (tx / rx chains masks).
    
    Suggested-by: Ben Greear <greearb@candelatech.com>
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230921110726.81d94d630c95.I9473da818cbeeb51b2f89dcc59b00019113e7f55@changeid
    [add bugfix from Benjamin for iwl_mvm_get_valid_rx_ant()]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:29:14 +01:00