Commit Graph

195 Commits

Author SHA1 Message Date
Jose Ignacio Tornos Martinez 3d99756637 wifi: iwlwifi: use default command queue watchdog timeout
JIRA: https://issues.redhat.com/browse/RHEL-67113

commit 7921c411490ca8b091068a41de873d79d065aab1
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Aug 8 23:22:45 2024 +0300

    wifi: iwlwifi: use default command queue watchdog timeout
    
    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 <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240808232017.87af3f063025.I2222981ead13f6a917f2d4b116c5b94200dc9e51@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:00 +01:00
Jose Ignacio Tornos Martinez 5ff978004a wifi: iwlwifi: clear trans->state earlier upon error
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 094513f8a2fbddee51b055d8035f995551f98fce
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Sun Aug 25 19:17:01 2024 +0300

    wifi: iwlwifi: clear trans->state earlier upon error
    
    When the firmware crashes, we first told the op_mode and only then,
    changed the transport's state. This is a problem if the op_mode's
    nic_error() handler needs to send a host command: it'll see that the
    transport's state still reflects that the firmware is alive.
    
    Today, this has no consequences since we set the STATUS_FW_ERROR bit and
    that will prevent sending host commands. iwl_fw_dbg_stop_restart_recording
    looks at this bit to know not to send a host command for example.
    
    To fix the hibernation, we needed to reset the firmware without having
    an error and checking STATUS_FW_ERROR to see whether the firmware is
    alive will no longer hold, so this change is necessary as well.
    
    Change the flow a bit.
    Change trans->state before calling the op_mode's nic_error() method and
    check trans->state instead of STATUS_FW_ERROR. This will keep the
    current behavior of iwl_fw_dbg_stop_restart_recording upon firmware
    error, and it'll allow us to call iwl_fw_dbg_stop_restart_recording
    safely even if STATUS_FW_ERROR is clear, but yet, the firmware is not
    alive.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240825191257.9d7427fbdfd7.Ia056ca57029a382c921d6f7b6a6b28fc480f2f22@changeid
    [I missed this was a dependency for the hibernation fix, changed
     the commit message a bit accordingly]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-10-29 08:18:44 +01:00
Jose Ignacio Tornos Martinez 3a561b67ec wifi: iwlwifi: release TXQ lock during reclaim
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit a2ed933dfefac8976ac915e1b1b60028b9c344b3
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Wed Jul 3 12:58:57 2024 +0300

    wifi: iwlwifi: release TXQ lock during reclaim
    
    Much of the work during reclaim can be done without holding the TXQ
    lock and releasing the lock means that command submission can happen at
    the same time.
    
    Add a new reclaim_lock to prevent parallel cleanup. Release the lock
    while working with an internal copy of the txq->read_ptr and only take
    the lock again when updating the read pointer after the cleanup is done.
    
    Signed-off-by: Benjamin Berg <benjamin.berg@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/20240703125541.2a81021d49ac.I53698ae92fb75a0461d41176db115462cf8be1cd@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:23 +01:00
Jose Ignacio Tornos Martinez 85e260c54a wifi: iwlwifi: map entire SKB when sending AMSDUs
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 7f5e3038f02902a1409c9ad0f07e3b11c581c113
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Wed Jul 3 12:58:53 2024 +0300

    wifi: iwlwifi: map entire SKB when sending AMSDUs
    
    This adds logic to map the entire SKB for AMSDUs. The required scatter
    gather list is allocated together with the space for TSO headers.
    Unmapping happens again when free'ing the TSO header page.
    
    For now the mapping is unused, this will be changed in a later commit.
    
    Signed-off-by: Benjamin Berg <benjamin.berg@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/20240703125541.96c6006f40ff.I55b74bc97c4026761397a7513a559c88a10b6489@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:22 +01:00
Jose Ignacio Tornos Martinez 3de5ea5594 wifi: iwlwifi: fix kernel-doc in iwl-trans.h
JIRA: https://issues.redhat.com/browse/RHEL-50013

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

    wifi: iwlwifi: fix kernel-doc in iwl-trans.h
    
    One mismatched enum name, and some missing docs.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240625194805.4846bf27dec1.I31fdfad01abc82b1340c59e51ece3db2242c8816@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 aaa320a66b wifi: iwlwifi: trans: remove unused status bits
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit bffa3d04e4ab90dcd3ae74642977132df135417b
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Tue Jun 18 19:44:08 2024 +0300

    wifi: iwlwifi: trans: remove unused status bits
    
    Those bits are never used.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20240618194245.cd26318d9513.I035ec7f3f022cdc19a650eca3b89455e3b5eca18@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 c4bec5665d wifi: iwlwifi: remove struct iwl_trans_ops
JIRA: https://issues.redhat.com/browse/RHEL-50013

commit 0d91a2bfc3dcae0a586e67c904abef002c848e6c
Author: Yedidya Benshimol <yedidya.ben.shimol@intel.com>
Date:   Wed Jun 5 14:05:03 2024 +0300

    wifi: iwlwifi: remove struct iwl_trans_ops
    
    This was needed when we had multiple types of transports. Now we only
    have pcie, so there is no need for this ops.
    Cleanup the code such as the different trans APIs will call the pcie
    function directly, instead of calling the callback,
    and remove struct iwl_trans_ops.
    
    Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240605140327.8315ff64f9f3.Ifdbc1f26d49766f7de553dcb5f613885f4ee65cc@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:03 +01:00
Jose Ignacio Tornos Martinez 9573e64739 wifi: iwlwifi: pcie: integrate TX queue code
JIRA: https://issues.redhat.com/browse/RHEL-50013

Conflicts:
  - drivers/net/wireless/intel/iwlwifi/queue/tx.c
    This file is removed and it is not necessary, just remove although
    there were conflicts in the past.

commit 49101078be769e9c50a8bfbc8caaab56db9d12d9
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Jun 5 14:05:02 2024 +0300

    wifi: iwlwifi: pcie: integrate TX queue code
    
    The TX queue code was mostly moved out to support an internal
    transport that we were never going to publish, but we're no
    longer using that. Since we're also going to be dissolving
    the virtual transport layer entirely, integrate the TX queue
    code into the PCIe layer.
    
    This also has a small kernel of already removing the virtual
    transport function layer, since iwl_trans_send_cmd() calls
    iwl_trans_pcie_send_hcmd() directly now, even if that still
    calls the transport send_cmd method for now, we'll clean it
    up later.
    
    Also, not everything is renamed yet.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240605140327.936b13f45071.Ib219ce01a1e67bcad79d5131626db950252aaa46@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:03 +01:00
Jose Ignacio Tornos Martinez d962b3605a wifi: iwlwifi: iwl-trans.h: clean up kernel-doc
JIRA: https://issues.redhat.com/browse/RHEL-34696

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

    wifi: iwlwifi: iwl-trans.h: clean up kernel-doc
    
    Add missing kernel-doc, fix annotations, etc.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240208185302.a66b5cad363b.I3ee4522ac34c3e5984fce5c1cb677fb3db7a965b@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:33 +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 8bda66f6eb wifi: iwlwifi: disable 160 MHz based on subsystem device ID
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 84ec2d2e960f33edcee7c47118e59dde72826843
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Fri Jan 26 09:00:30 2024 +0200

    wifi: iwlwifi: disable 160 MHz based on subsystem device ID
    
    The driver should not send 160 MHz BW support for 5 GHz
    band in HE if PCI subsystem device ID  indicates no 160 MHz support.
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Reviewed-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20240126085924.77c248ce6986.I558e8d0cf19dc862b1c4124df78a4cb690095bb2@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 a75e9bf6ab wifi: iwlwifi: Add support for new 802.11be device
JIRA: https://issues.redhat.com/browse/RHEL-34696

commit 099a47dbe71b758e6875d0297467f2b8d23014df
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Tue Jan 23 20:08:10 2024 +0200

    wifi: iwlwifi: Add support for new 802.11be device
    
    Add support for the new 802.11be device with limites capabilities:
    - 320 MHz isn't supported
    - MCSs 12 and 13 are not supported
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@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.8529bd2acedf.I25dccb7bbeb21b8df2123fad51dde7fcf137a508@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:50 +02:00
Jose Ignacio Tornos Martinez 024940e76f wifi: iwlwifi: replace ENOTSUPP with EOPNOTSUPP
JIRA: https://issues.redhat.com/browse/RHEL-28754

commit 968509128207f122d7177ffb6ff51c9c6fa7e13d
Author: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Date:   Tue Dec 19 21:59:02 2023 +0200

    wifi: iwlwifi: replace ENOTSUPP with EOPNOTSUPP
    
    ENOTSUPP isn't a standard error code, don't use it. Replace with
    EOPNOTSUPP instead.
    
    Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@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.a69f4347b5f8.I88429d5de8251287ec0b58ff26a588465b9049a5@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:13 +01:00
Jose Ignacio Tornos Martinez bb0f5f7171 wifi: iwlwifi: remove async command callback
JIRA: https://issues.redhat.com/browse/RHEL-28754

commit 14c1b6f430e3582b3ef2ce1e3016de829b520f77
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Dec 7 04:50:15 2023 +0200

    wifi: iwlwifi: remove async command callback
    
    There's only one user of this code, which is STA unblock
    during sleep for uAPSD on really old devices. Instead of
    having this all through the API with calls up and down,
    just implemented a special-case CMD_BLOCK_TXQS flag for
    this, it's only needed in the old gen1 transport.
    
    While at it, fix a complain that lockdep would have, as
    we lock the cmd queue and then the TXQs in the reclaim
    by using spin_lock_nested(). We no longer need to disable
    BHs in iwl_trans_pcie_block_txq_ptrs() since it's called
    with them disabled already.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://msgid.link/20231207044813.2bd95e0570fc.I16486dbc82570d2f73a585872f5394698627310d@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-03-18 17:57:57 +01:00
Jose Ignacio Tornos Martinez e6ea425e1b wifi: iwlwifi: empty overflow queue during flush
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit 658939fc68d3241f9a0019e224cd7154438c23f2
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Sun Oct 22 17:55:51 2023 +0300

    wifi: iwlwifi: empty overflow queue during flush
    
    If a TX queue has no space for new TX frames, the driver will keep
    these frames in the overflow queue, and during reclaim flow it
    will retry to send the frames from that queue.
    But if the reclaim flow was invoked from TX queue flush, we will also
    TX these frames, which is wrong as we don't want to TX anything
    after flush.
    This might also cause assert 0x125F when removing the queue,
    saying that the driver removes a non-empty queue
    Fix this by TXing the overflow queue's frames only if we are
    not in flush queue flow.
    
    Fixes: a445098058 ("iwlwifi: move reclaim flows to the queue file")
    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/20231022173519.caf06c8709d9.Ibf664ccb3f952e836f8fa461ea58fc08e5c46e88@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 8a573e03ed wifi: iwlwifi: disable multi rx queue for 9000
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit 29fa9a984b6d1075020f12071a89897fd62ed27f
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Tue Oct 17 12:16:46 2023 +0300

    wifi: iwlwifi: disable multi rx queue for 9000
    
    Multi rx queue allows to spread the load of the Rx streams on different
    CPUs. 9000 series required complex synchronization mechanisms from the
    driver side since the hardware / firmware is not able to provide
    information about duplicate packets and timeouts inside the reordering
    buffer.
    
    Users have complained that for newer devices, all those synchronization
    mechanisms have caused spurious packet drops. Those packet drops
    disappeared if we simplify the code, but unfortunately, we can't have
    RSS enabled on 9000 series without this complex code.
    
    Remove support for RSS on 9000 so that we can make the code much simpler
    for newer devices and fix the bugs for them.
    
    The down side of this patch is a that all the Rx path will be routed to
    a single CPU, but this has never been an issue, the modern CPUs are just
    fast enough to cope with all the traffic.
    
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20231017115047.2917eb8b7af9.Iddd7dcf335387ba46fcbbb6067ef4ff9cd3755a7@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:52 +01:00
Jose Ignacio Tornos Martinez 768ceb3bf3 wifi: iwlwifi: fw: disable firmware debug asserts
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit fc2fe0a5e856efe58e86115b87c3efe348b8e9ea
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Wed Sep 13 14:56:41 2023 +0300

    wifi: iwlwifi: fw: disable firmware debug asserts
    
    Disable firmware debug asserts, which are used for internal
    firmware testing purposes only.
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230913145231.8feafd9b17be.Ia7bec82ac25897caab581692d67055aa1aca2ed2@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:02 +01:00
Jose Ignacio Tornos Martinez 942c2e4324 wifi: iwlwifi: fix some kernel-doc issues
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit 594de1229f89943f4f6140cadb8ea188749d7de8
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Aug 30 11:30:53 2023 +0300

    wifi: iwlwifi: fix some kernel-doc issues
    
    Fix kernel-doc issues.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230830112059.2edc4d82f717.Ic7c6f1153939903b067062c9aec8fb70e0a2c30d@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:28:57 +01:00
Jose Ignacio Tornos Martinez bdcf99ceaf wifi: iwlwifi: honor the enable_ini value
JIRA: https://issues.redhat.com/browse/RHEL-19746

commit e0c1ca236e28e4263fba76d47a108ed95dcae33e
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Wed Aug 30 11:30:52 2023 +0300

    wifi: iwlwifi: honor the enable_ini value
    
    In case the user sets the enable_ini to some preset, we want to honor
    the value.
    
    Remove the ops to set the value of the module parameter is runtime, we
    don't want to allow to modify the value in runtime since we configure
    the firmware once at the beginning on its life.
    
    Fixes: b49c2b252b58 ("iwlwifi: Configure FW debug preset via module param.")
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230830112059.5734e0f374bb.I6698eda8ed2112378dd47ac5d62866ebe7a94f77@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-02-01 15:28:57 +01:00
Jose Ignacio Tornos Martinez f1301097ce wifi: iwlwifi: pcie: point invalid TFDs to invalid data
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit c83031afaaaa4a1129394439c8cd93ffe94f9970
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Aug 16 11:10:50 2023 +0300

    wifi: iwlwifi: pcie: point invalid TFDs to invalid data
    
    There are occasionally bugs which cause the device to try
    to use a TFD that it wasn't supposed to, and these are
    very hard to diagnose. Fill all unused TFDs with a debug
    command that immediately causes an error to be detected
    in these cases.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230816104355.10a9af1ca91f.Ifc790d62c52b4bc9a74c9581610af498509f5759@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:02:25 +01:00
Jose Ignacio Tornos Martinez 1bce33f1ec wifi: iwlwifi: remove WARN from read_mem32()
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit d9d115fed674351effd8610aad1e8f1178a5f8b9
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Aug 16 11:10:45 2023 +0300

    wifi: iwlwifi: remove WARN from read_mem32()
    
    There's no reason to warn here, it's not an internal consistency
    issue, we even use this to check if the device is dead, and if it
    read_mem() returns an error that's either because grab NIC access
    or memory allocation failed, both of which are already noisy.
    
    Just remove the warning entirely.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230816104355.5f4e80eb63cc.Iffd88f63f95575f28e503da13b473724e3341aee@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:02:24 +01:00
Jose Ignacio Tornos Martinez d3c6987084 wifi: iwlwifi: limit EHT capabilities based on PCIe link speed
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit 3a9690d030d8572736e07b912deea5547dd94db3
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Jun 20 13:03:56 2023 +0300

    wifi: iwlwifi: limit EHT capabilities based on PCIe link speed
    
    If a discrete NIC is connected to a PCIe link hat isn't at least
    Gen3 (8.0 GT/s), then we cannot sustain 320 MHz traffic, so remove
    that from EHT capabilities in that case.
    
    While at it, also move setting 320 MHz beamformee to the right
    place in the code so it's not set while not supporting 320 MHz.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230620125813.b77a1574a0a7.Id4120c161fb7df6dedc70d5f3e3829e9117b8cb1@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:48 +01:00
Jose Ignacio Tornos Martinez dc1a79745d wifi: iwlwifi: unify checks for HW error values
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit d4f1a50ca998420e27f904128a8dac5f69c291ed
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon Jun 12 18:51:10 2023 +0300

    wifi: iwlwifi: unify checks for HW error values
    
    The hardware, depending on which part fails or times out,
    returns 0xA5A5A5A. or 0x5A5A5A5. with the lowest 4 bits
    encoding some further reason/status. However, mostly we
    don't really need to care about the exact reasons, so
    unify the checks for this to avoid hardcoding those magic
    values all over the driver.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230612184434.3e2959741a38.I1c297a53787b87e4e2b8f296c041921338573f4d@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:29 +01:00
Jose Ignacio Tornos Martinez 105a9bb073 wifi: iwlwifi: Separate reading and parsing of reduce power table
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit 380bf72d1b1dc3cb2572acd9b61153e79413b036
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Tue Jun 6 10:43:07 2023 +0300

    wifi: iwlwifi: Separate reading and parsing of reduce power table
    
    It enables to better handle error cases. Also save the image till the
    end of the loading and only then free it.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230606103519.71e3b3e0e794.Ifbe69ad99a7e805eb70e09280365821eb146b1c9@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:15 +01:00
Jose Ignacio Tornos Martinez 5194749330 wifi: iwlwifi: Enable loading of reduce-power tables into several segments
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit 7c9c8477170d32def5df9d88823ea10d65749341
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Tue Jun 6 10:43:06 2023 +0300

    wifi: iwlwifi: Enable loading of reduce-power tables into several segments
    
    Replace the field reduce_power_dram with a struct that holds data about
    the reduced-power tables drams regions. Generalize load_payloads_segments()
    to work for both pnvm tables and reduction power tables.
    Make required adjustments in the data structures.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230606103519.6fe66958f049.I85d80682229fc02fe354462cc9da40937558f30c@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:15 +01:00
Jose Ignacio Tornos Martinez 7c12f406cb wifi: iwlwifi: Use iwl_pnvm_image in reduce power tables flow
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit ea3571f48953df2cf77a9c4200a7363236736673
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Tue Jun 6 10:43:05 2023 +0300

    wifi: iwlwifi: Use iwl_pnvm_image in reduce power tables flow
    
    Generalize the parsing, loading, and setting of the power-reduce
    tables, in order to support allocation of several DRAM payloads
    in the future.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230606103519.564f1eead99b.Iaba653b21dc09aafc72b9bbb3928abddce0db50a@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:15 +01:00
Jose Ignacio Tornos Martinez 8f258d087b wifi: iwlwifi: Separate loading and setting of power reduce tables
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit c738fb6163b213dd9565ba1951d4f130975db10f
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Tue Jun 6 10:43:04 2023 +0300

    wifi: iwlwifi: Separate loading and setting of power reduce tables
    
    Take the part that copies the tables into DRAM, out of the method
    that sets the prph_scratch to make the code cleaner. Each of the
    operations will get more complex in the future when it will also
    support larger power-reduce tables images.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230606103519.7695684dc848.I13626cd318e5d68efec9618b2045f52788bff114@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:15 +01:00
Jose Ignacio Tornos Martinez f935aa3328 wifi: iwlwifi: Add support for fragmented pnvm images
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit 331828106e52d76170fed605aeeb9ba1b7321f46
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Tue Jun 6 10:43:02 2023 +0300

    wifi: iwlwifi: Add support for fragmented pnvm images
    
    Add support for fragmented pnvm images, depending on the FW capability.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230606103519.c49bfaf435a9.I0278312e7c3355b224cd870d4f8cf6578d12f03e@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:15 +01:00
Jose Ignacio Tornos Martinez ed96575fef wifi: iwlwifi: Take loading and setting of pnvm image out of parsing part
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit b99e32cbfdf63a8acab18b0d44402172528ffe48
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Tue Jun 6 10:43:00 2023 +0300

    wifi: iwlwifi: Take loading and setting of pnvm image out of parsing part
    
    Change iwl_pnvm_parse so it will only save the information into the
    iwl_pnvm_image struct. This enables to use the parsing code for the
    power reduce tables in the future.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230606103519.504b42fc1611.I4ddf6ad76d922d118fcbcc4f0e9ec003753d0b75@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:14 +01:00
Jose Ignacio Tornos Martinez 1fe305ac84 wifi: iwlwifi: Separate loading and setting of pnvm image into two functions
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit 194d1f84d56e912459f166a80ef520037c84b0d3
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Tue Jun 6 10:42:59 2023 +0300

    wifi: iwlwifi: Separate loading and setting of pnvm image into two functions
    
    Take the part that is copying the pnvm image into DRAM, out of the
    the method that sets the prph_scratch. Makes the code cleaner since
    those 2 operations don't always happen together (loading should happen
    only once while setting can happen more than once).
    In addition, each operation will get more complex in the future when
    it will support also larger pnvm images.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230606103519.4c0728239fd6.Ibc30a9fbdb6123dadbe2dbb89318dbd5ec01080a@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:14 +01:00
Jose Ignacio Tornos Martinez f31f82f239 wifi: iwlwifi: Generalize the parsing of the pnvm image
JIRA: https://issues.redhat.com/browse/RHEL-2907

commit 5f40850399c61aec5f26861f4a5194aae64c27df
Author: Alon Giladi <alon.giladi@intel.com>
Date:   Tue Jun 6 10:42:58 2023 +0300

    wifi: iwlwifi: Generalize the parsing of the pnvm image
    
    Generalize iwl_pnvm_parse(). This saves us from copying each payload
    twice (first in the parsing and later when copying it to the dram).
    Moreover, its  more compatible for handling larger pnvm tables in
    the future (in which payloads won't be concatenated).
    
    The main changes are:
    
    1. Take out the concatenating of the payloads from the parsing level
    2. Start using iwl_pnvm_image structure that will hold pointers to
    payloads that should be delivered to fw, their sizes and number.
    
    Signed-off-by: Alon Giladi <alon.giladi@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230606103519.06c02f380b6f.I03a3030fca194aa0c4bc2ecd18531f8914e98cfd@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-11-27 15:01:14 +01:00
Íñigo Huguet 51a1e69366 wifi: iwlwifi: don't silently ignore missing suspend or resume ops
Bugzilla: https://bugzilla.redhat.com/2196821

commit cad7850ac0f597cd462b263a6395c5cd0ad8e760
Author: Haim Dreyfuss <haim.dreyfuss@intel.com>
Date:   Wed May 24 20:42:03 2023 +0300

    wifi: iwlwifi: don't silently ignore missing suspend or resume ops
    
    In case the driver doesn't implement suspend or resume operations
    on the transport layer, notify the driver's upper layer.
    Otherwise, we might access d3_status uninitialized.
    
    Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230524203151.0c55e0ca92f1.I6870fe1683215e65d3d036f9b576b03b7b7257be@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:16:38 +02:00
Íñigo Huguet 9cd967940d wifi: iwlwifi: Add RF Step Type for BZ device
Bugzilla: https://bugzilla.redhat.com/2196821

commit 729040295f96b8060b1a3bdd35f767d266508502
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Fri Apr 14 13:11:52 2023 +0300

    wifi: iwlwifi: Add RF Step Type for BZ device
    
    Add RF step id handling and handle for BZ device.
    Read CNV Aux register and uses for no OTP case.
    Add missing rf support for Bz/Bnj device and correct/add
    the mapping for rf-type if OTP not present.
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230414130637.8f2e2fff7bbc.Iee5554178bc5f134dcc28591db0968e619afbdca@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:45 +02:00
Íñigo Huguet e0d8d1e0b7 wifi: iwlwifi: dbg: print pc register data once fw dump occurred
Bugzilla: https://bugzilla.redhat.com/2196821

Omitted-fix: 2b69d242e2 ("wifi: iwlwifi: fw: print PC register value instead of address")
             Not needed for normal working, it only fix a value shown in a debug
	     message. I can't check it's done right, so the risk of backporting
	     the fix out of order is not worth it.

commit 5e31b3df86ec6fbb925eee77fe2c450099c61dff
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Thu Apr 13 21:40:21 2023 +0300

    wifi: iwlwifi: dbg: print pc register data once fw dump occurred
    
    Add debug print for different FW program counter details of
    different CPU. Program counter pc details will be read from
    TLV during init.
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230413213309.862790d336a9.I34e2ea05a79e8b2552f7f221bacf3af0166cb9c0@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:42 +02:00
Íñigo Huguet 2939494a60 wifi: iwlwifi: yoyo: Add new tlv for dump file name extension
Bugzilla: https://bugzilla.redhat.com/2196821

commit 51fa8c026e072dac49ca638d66a64a66b29e916f
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Tue Mar 14 19:49:14 2023 +0200

    wifi: iwlwifi: yoyo: Add new tlv for dump file name extension
    
    Add tlv in dump file for dump file name extension.
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Greenman, Gregory <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230314194113.ffc28212994e.Ie5f10709548497061f95c1634d942dd2facf72ec@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:47 +02:00
Jose Ignacio Tornos Martinez 844d94f4d1 wifi: iwlwifi: mvm: Support STEP equalizer settings from BIOS.
Bugzilla: https://bugzilla.redhat.com/2178526

commit 09b4c35d73a59c092cf8466958b62cf896786472
Author: Ayala Barazani <ayala.barazani@intel.com>
Date:   Fri Jan 27 00:28:20 2023 +0200

    wifi: iwlwifi: mvm: Support STEP equalizer settings from BIOS.
    
    Read the STEP equalizer parameters from the BIOS during init
    and transfer it to the firmware.
    
    This table provides values to configure an equalizer at the transmitter
    that can be used to compensate for PCB channel attenuation.
    
    Signed-off-by: Ayala Barazani <ayala.barazani@intel.com>
    Link: https://lore.kernel.org/r/20230127002430.f25f871c5e17.I8390ab916c8f681229433ebc576ed37a594c6d30@changeid
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-05-09 08:17:57 +02:00
Jose Ignacio Tornos Martinez e28cbeb8aa wifi: iwlwifi: pcie: Add reading and storing of crf and cdb id.
Bugzilla: https://bugzilla.redhat.com/2178526

commit 3a27a1a158bd1811db7f9b82a72303414fa270e1
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Mon Dec 5 10:35:43 2022 +0200

    wifi: iwlwifi: pcie: Add reading and storing of crf and cdb id.
    
    Read and store crf and cdb id details to make it
    available during driver's lifetime
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20221205102808.888b30780128.Ic8c4c088a75a0d7092d6301ef3760a118a06d819@changeid

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-05-09 08:17:04 +02:00
Jose Ignacio Tornos Martinez 7228b1c11c wifi: iwlwifi: mvm: trigger PCI re-enumeration in case of PLDR sync
Bugzilla: https://bugzilla.redhat.com/2178526

commit b8133439bda70ff24e3bdb89bb55d204c3fea606
Author: Avraham Stern <avraham.stern@intel.com>
Date:   Wed Nov 23 23:02:07 2022 +0200

    wifi: iwlwifi: mvm: trigger PCI re-enumeration in case of PLDR sync
    
    When doing the PLDR flow, the fw goes through a re-read and needs
    PCI re-enumeration in order to recover. In this case, skip the mac
    start retry and fw dumps as all the fw and registers are invalid
    until the PCI re-enumeration.
    
    In addition, print the register that shows the re-read counter
    when loading the fw.
    
    Signed-off-by: Avraham Stern <avraham.stern@intel.com>
    Link: https://lore.kernel.org/r/20221123225313.9ae77968961e.Ie06e886cef4b5921b65dacb7724db1276bed38cb@changeid
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-05-09 08:16:09 +02:00
Íñigo Huguet 2a8f41a69c iwlwifi: support new queue allocation command
Bugzilla: https://bugzilla.redhat.com/2059999

commit 227f25972c5adc86aeae86494c0269256b235489
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Feb 10 18:22:30 2022 +0200

    iwlwifi: support new queue allocation command
    
    Newer firmware versions will support a new queue allocation
    command, in order to deal with MLD where multiple stations
    are used for a single queue. Add support for the new command.
    
    This requires some refactoring of the queue allocation API,
    which now gets
     - the station mask instead of the station ID
     - the flags without the "enable" flag, since that's no longer
       used in the new API
    
    Additionally, this new API now requires that we remove queues
    before removing a station, the firmware will no longer do that
    internally. Also add support for that.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20220210181930.acbf22ac2b66.I2bf38578c5ca1f7ffb2011a782f772db92fc4965@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:50:56 +02:00
Íñigo Huguet 30629a31cd iwlwifi: remove command ID argument from queue allocation
Bugzilla: https://bugzilla.redhat.com/2059999

commit 85b17a33c8f16e5e0a90b851705661198d6a63cd
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Feb 10 18:22:25 2022 +0200

    iwlwifi: remove command ID argument from queue allocation
    
    The command ID here is always hard-coded to the same, so we
    can remove it. In the future we actually need to make this
    configurable, but that doesn't need to be on each call, it
    can be done through the transport configuration.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20220210181930.8b352828f767.Ice4c91d8ea3e207914104e72801b87cd7f409ba7@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:50:55 +02:00
Íñigo Huguet 26595aa261 iwlwifi: yoyo: add IMR DRAM dump support
Bugzilla: https://bugzilla.redhat.com/2059999

commit c0941ace9a134bd1a9c2c09afad4e6bf0066c1e3
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Sat Jan 29 13:16:19 2022 +0200

    iwlwifi: yoyo: add IMR DRAM dump support
    
    Support debug collection of the platform IMR memory region,
    where data is copied by FW during d3 state
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20220129105618.715f04ecc635.Ib89a6caa06c1324c1c0dd3f9f4cf7407f2857155@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:50:49 +02:00
Íñigo Huguet 2a26130e1b iwlwifi: yoyo: support TLV-based firmware reset
Bugzilla: https://bugzilla.redhat.com/2059999

commit ddb6b76b6f96afb2977c3c460acf18cc0dd13cae
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Sun Dec 19 12:18:13 2021 +0200

    iwlwifi: yoyo: support TLV-based firmware reset
    
    Support resetting the firmware via TLV-based debugging.  When applied,
    this will cause the driver to reset the firmware when the debugging
    is triggered.
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20211219121514.d59b29653a1e.I7b3be4a1ad1a9d5d0e86259740e89ac113c9348b@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:50:01 +02:00
Íñigo Huguet 7ecf6b16f4 iwlwifi: dump RCM error tables
Bugzilla: https://bugzilla.redhat.com/2059999

commit 4cd177b43a1443924c56c6d94b8a77be762a3976
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri Dec 10 11:12:39 2021 +0200

    iwlwifi: dump RCM error tables
    
    There's another set of error tables on newer (Bz) hardware,
    support finding and dumping those error tables if present.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20211210110539.c727a975b434.Ie5ad3fd974b700f1b90867b2b52ef7607799e8fe@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:50:00 +02:00
Íñigo Huguet efc63df954 iwlwifi: dump both TCM error tables if present
Bugzilla: https://bugzilla.redhat.com/2059999

commit 57417e1bf9d95449e1d9e4547a69886f9bd16f87
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri Dec 10 11:12:38 2021 +0200

    iwlwifi: dump both TCM error tables if present
    
    There can be two TCMs in a given device, dump both of the
    error tables if present.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20211210110539.887cba319301.Ifdc3f617f7e0e3e39c90e8c208e60f11b3bb9404@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:50:00 +02:00
Íñigo Huguet 918228dc1a iwlwifi: mvm: optionally suppress assert log
Bugzilla: https://bugzilla.redhat.com/2059999

Conflicts: minor content conflicts due to later commits already backported
  5283dd677e52a iwlwifi: mvm: retry init flow if failed

commit 4b992db6ebdaaee244a7931753f5b49d049a760a
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sat Dec 4 17:49:44 2021 +0200

    iwlwifi: mvm: optionally suppress assert log
    
    Normally, when we hit an assert, we print out all the
    assert data. However, in certain tests, when we trigger
    it from debugfs intentionally, that can be useless and
    confusing.
    
    Allow writing the string "nolog\n" to the fw_nmi and
    fw_restart files suppressing the assert dump as well
    as - in the case of fw_restart - the
    
      iwlwifi 0000:00:00.0: FW error in SYNC CMD REPLY_ERROR
    
    message.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20211204174546.75e29a2ab68d.Id3064feda2ce7a77c116c6d6e71ce5ff447c6e86@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:49:43 +02:00
Íñigo Huguet 6b90df9f34 iwlwifi: pcie: retake ownership after reset
Bugzilla: https://bugzilla.redhat.com/2059999

commit 15bf5ac6cd93b655ef82c6bb837cb3c19bce7f36
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sat Dec 4 17:49:36 2021 +0200

    iwlwifi: pcie: retake ownership after reset
    
    In most cases, unless shutting down the NIC, we really need
    to retake ownership after doing a software reset of the NIC.
    Encode that into the API so we "automatically" do it, even
    in case of workarounds, and don't keep forgetting it like a
    few of the places we have did.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20211204174545.458f9d98ac21.I40b9a22df1ab8178cc838fc83d5190e689dfac6a@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:49:42 +02:00
Íñigo Huguet e9d3c8f3db iwlwifi: integrate with iwlmei
Bugzilla: https://bugzilla.redhat.com/2059999

Conflicts: minor content conflicts due to later commits already backported
  5283dd677e52a iwlwifi: mvm: retry init flow if failed
  f5cecf1d4c5ff iwlwifi: fix warnings produced by kernel debug options

commit 6d19a5eba5cda26310f83f5ea87eef54e68afc34
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Fri Nov 12 08:28:12 2021 +0200

    iwlwifi: integrate with iwlmei
    
    iwlmei needs to know about the follwing events:
    
    * Association
    * De-association
    * Country Code change
    * SW Rfkill change
    * SAR table changes
    
    iwlmei can take the device away from us, so report the new
    rfkill type when this happens.
    Advertise the required data from the CSME firmware to the
    usersapce: mostly, the AP that the CSME firmware is currently
    associated to in case there is an active link protection
    session.
    Generate the HOST_ASSOC / HOST_DISSASSOC messages.
    
    Don't support WPA1 (non-RSNA) for now.
    Don't support shared wep either.
    We can then determine the AUTH parameter by checking the AKM.
    Feed the cipher from the key installation.
    
    SW Rfkill will be implemented later when cfg80211 will
    allow us to read the SW Rfkill state.
    
    Co-Developed-by: Ayala Beker <ayala.beker@intel.com>
    Signed-off-by: Ayala Beker <ayala.beker@intel.com>
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    
    v7: Ayala added her signed-off
        remove pointless function declaration
        fix a bug due to merge conflict in the HOST_ASSOC message
    v8: leave a print if we have a SAP connection on a device we do
        not support (yet)
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20211112062814.7502-4-emmanuel.grumbach@intel.com

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-05-31 14:49:38 +02:00
Íñigo Huguet 93a9364124 iwlwifi: support 4-bits in MAC step value
Bugzilla: http://bugzilla.redhat.com/2043454

commit 55c6d8f89dab6d9bed0165dd4c134856975bd000
Author: Mike Golant <michael.golant@intel.com>
Date:   Tue Dec 7 16:05:51 2021 +0200

    iwlwifi: support 4-bits in MAC step value
    
    We have a MAC component (which is inside the SoC) and it has several
    different HW steps.  3 bits used to be enough but now we need 4-bits
    to represent all the different steps.
    
    Properly support 4-bits in the MAC step value by refactoring all the
    current handling of the MAC step/dash.
    
    Already from family 8000 and up the dash (bits 0-1) no longer exists
    and the step (until 8000 bits 2-3) consists of the dash bits as well.
    
    To do this remove the CSR_HW_REV_STEP and the CSR_HW_REV_DASH
    macros, replace them with CSR_HW_REV_STEP_DASH and add hw_rev_step
    into the trans struct.
    
    In addition remove the CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP and
    CSR_HW_IF_CONFIG_REG_MSK_MAC_DASH macros and create a new macro
    combining the 2 (this way we don't need shifting or anything else.)
    
    Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
    Signed-off-by: Mike Golant <michael.golant@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20211207160459.2e81a14d1f80.Ia5287e37fb3439d805336837361f6491f958e465@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-02-21 11:40:50 +01:00
Íñigo Huguet f474b33111 iwlwifi: yoyo: fw debug config from context info and preset
Bugzilla: http://bugzilla.redhat.com/2043454

commit f21baf244112e646c6b6c9db94834cf06358db06
Author: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Date:   Sun Oct 17 12:40:19 2021 +0300

    iwlwifi: yoyo: fw debug config from context info and preset
    
    Add new TLV for debug config set to read preset
    based on TLV is set in context info.
    This is needed to set the preset based on ucode in early
    trigger point.
    Add DRAM frag allocation info in first fragment of
    DBGC1 with all details.
    New capability from FW for DBGC frag debug support is
    added and BUFFER_ALLOCATION_CMD is disabled in capability
    is supported.
    
    Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20211017123741.cacf0babc521.If3704b5fda09b344e3e438252360898a3f2e90fa@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-02-21 11:40:33 +01:00
Íñigo Huguet 42734d6ffa iwlwifi: fw dump: add infrastructure for dump scrubbing
Bugzilla: http://bugzilla.redhat.com/2043454

commit fdb70083dd2886e45dc2575b8b21dbf63505c29b
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sun Oct 17 12:40:11 2021 +0300

    iwlwifi: fw dump: add infrastructure for dump scrubbing
    
    In firmware dumps, currently all kinds of key material may be
    included, e.g. in host commands (if firmware crashes during the
    processing of a key-related command) or in the TX FIFO(s) if
    we have been using in-TX-command key material.
    
    Additionally, some firmware versions will advertise sections
    of their internal data to not dump, due to them containing some
    sensitive data.
    
    Add some infrastructure to allow scrubbing this data out, as
    dependent on the opmode's idea of what will need to be done.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Link: https://lore.kernel.org/r/iwlwifi.20211017123741.360cc8fe55b1.Ie3bd3ece38043969f7e116e61a6ec1197a58d78b@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-02-21 11:40:33 +01:00