Commit Graph

420 Commits

Author SHA1 Message Date
Íñigo Huguet fbd929786b wifi: iwlwifi: mvm: implement link change ops
Bugzilla: https://bugzilla.redhat.com/2196821

commit bf976c814c864ec45fa32303e7080fc2e6efe4f2
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Mar 28 10:59:11 2023 +0300

    wifi: iwlwifi: mvm: implement link change ops
    
    Implement the link change ops for links and stations.
    Note that the stations one is empty for now as we only
    have support for a single link so far, and then the
    stations are created with the first link as deflink by
    mac80211, so right now we don't really need anything.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.6186c5a37e99.Ifd00d3ee93356ddef273aa18f1e081cd8f2c84ae@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:14 +02:00
Íñigo Huguet d5165e4779 wifi: iwlwifi: mvm: adjust some cleanup functions to MLO
Bugzilla: https://bugzilla.redhat.com/2196821

commit 79faae3a408e2a03e550de2d60f9619902251248
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:59:10 2023 +0300

    wifi: iwlwifi: mvm: adjust some cleanup functions to MLO
    
    Clean up data for all allocated links of a vif.
    Invalidate all link sta pointers.
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.948a7bee8b09.Ic6b202959c158258d391ccce77f66e1281879690@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:14 +02:00
Íñigo Huguet b0c1fd6924 wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common()
Bugzilla: https://bugzilla.redhat.com/2196821

commit 57974a55d995468a9a476e24693eb741c649b25f
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:59:09 2023 +0300

    wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common()
    
    Move code handling specific state transitions into separate handlers
    and adjust them for MLO. Adjust relevant callbacks as well.
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.5a3f8a849723.I0670d20436858a1cd3c055e03c7528db81292811@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:13 +02:00
Íñigo Huguet d82019ce05 wifi: iwlwifi: mvm: adjust to MLO assign/unassign/switch_vif_chanctx()
Bugzilla: https://bugzilla.redhat.com/2196821

commit 4263ac7fe5b2d6d5b3acc4c4192cebe7054bc623
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:59:07 2023 +0300

    wifi: iwlwifi: mvm: adjust to MLO assign/unassign/switch_vif_chanctx()
    
    Pass link_conf when it's necessary and change the code accordingly.
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.dc1074239c5b.I30db722af9009f1b274fa929f276fd2b78520dea@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:13 +02:00
Íñigo Huguet 42cb77fe62 wifi: iwlwifi: mvm: replace bss_info_changed() with vif_cfg/link_info_changed()
Bugzilla: https://bugzilla.redhat.com/2196821

commit 22c588343529d34e971b7cafae99d23f80dff7e9
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:59:04 2023 +0300

    wifi: iwlwifi: mvm: replace bss_info_changed() with vif_cfg/link_info_changed()
    
    These are two new handlers for MLO. As the configurations done in
    bss_info_changed() are now split into two separate flows, use MLO
    specific implementation instead of common functions with the non-MLO
    code.
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.7b238cae0895.Ieb87f204787fb1c7cb7562e1cbf54ef518d87123@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:12 +02:00
Íñigo Huguet 3b850e0ce6 wifi: iwlwifi: mvm: add link_conf parameter for add/remove/change link
Bugzilla: https://bugzilla.redhat.com/2196821

commit cacc1d42a489f6f61cd5bdc42d216ec29b144317
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:59:03 2023 +0300

    wifi: iwlwifi: mvm: add link_conf parameter for add/remove/change link
    
    Add link_conf parameter and change all the relevant calls accordingly.
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.374015eed2e3.Icbf15a18e2599b53f4fa1c92fe3db64b551b84b1@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:12 +02:00
Íñigo Huguet f563491464 wifi: iwlwifi: mvm: adjust SMPS for MLO
Bugzilla: https://bugzilla.redhat.com/2196821

commit 1a3e70391e55d12010073935e383629ab856528a
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:59:01 2023 +0300

    wifi: iwlwifi: mvm: adjust SMPS for MLO
    
    Configure SMPS per-link. Add link_id parameter to
    iwl_mvm_update_smps() and refactor iwl_mvm_intf_dual_chain_req()
    since it has to handle all active links.
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.da6a19db562c.Ic88b02338c8973f2934439ac3ee77c7451bc0054@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:12 +02:00
Íñigo Huguet 7ea1b551ec wifi: iwlwifi: mvm: add set_hw_timestamp to mld ops
Bugzilla: https://bugzilla.redhat.com/2196821

commit be8897e24415f2c23b05711c68d32392ba8541f7
Author: Avraham Stern <avraham.stern@intel.com>
Date:   Tue Mar 28 10:59:00 2023 +0300

    wifi: iwlwifi: mvm: add set_hw_timestamp to mld ops
    
    In mld ops, set_hw_timestamp was not set. Fix it.
    
    Signed-off-by: Avraham Stern <avraham.stern@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.7b24a582b763.Ieb3139d41f1a01b2b566adecd32450da1bcdd5fa@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:11 +02:00
Íñigo Huguet f86698a54b wifi: iwlwifi: mvm: add link to firmware earlier
Bugzilla: https://bugzilla.redhat.com/2196821

commit cb145863e7abbbf4248ab11d2783a1b619349d1b
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Mar 28 10:58:59 2023 +0300

    wifi: iwlwifi: mvm: add link to firmware earlier
    
    The firmware now allows adding a link that's not yet bound
    to a PHY context. Make use of that to align the driver with
    mac80211's API expectations. For now, just add the link at
    the same time as the MAC since we don't yet have real MLD
    support, but that'll obviously change later. This fixes an
    issue with apStaId tracking in the firmware.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.097e5008b637.I4e75c6c11e21c08d28ff6a066be36629d3975db6@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:11 +02:00
Íñigo Huguet 0f8f11bdd2 wifi: iwlwifi: mvm: adjust some PS and PM methods to MLD
Bugzilla: https://bugzilla.redhat.com/2196821

commit f551d013bd3111413a1c57214796ab3fe3b2f694
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:58:58 2023 +0300

    wifi: iwlwifi: mvm: adjust some PS and PM methods to MLD
    
    When using mvm vif PS/PM related properties, consider all links.
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.8d9e18f7d74b.I048fc17405ecdddc1f6fe72859013cc4878b2a3b@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:11 +02:00
Íñigo Huguet 616195bb9a wifi: iwlwifi: mvm: adjust mld_mac_ctxt_/beacon_changed() for MLO
Bugzilla: https://bugzilla.redhat.com/2196821

commit 36cf537798cb6c738b94a67ec1604c571e15b2b8
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:58:57 2023 +0300

    wifi: iwlwifi: mvm: adjust mld_mac_ctxt_/beacon_changed() for MLO
    
    HE/EHT support is reported to FW if there's at least one link
    that supports it. Configure beacon separately for each link.
    Don't send the beacon template before adding the MAC.
    
    Co-developed-by: Johannes Berg <johannes.berg@intel.com>
    Co-developed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104949.5ef4efeda2dd.I6ebda2b71c964b9aa63240c9fa1ee0d28099fe6e@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:11 +02:00
Íñigo Huguet 4a9437e15a wifi: iwlwifi: mvm: add all missing ops to iwl_mvm_mld_ops
Bugzilla: https://bugzilla.redhat.com/2196821

commit cbce62a315f67e3badfd3f4a7b33e21c90ddc415
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 28 10:58:50 2023 +0300

    wifi: iwlwifi: mvm: add all missing ops to iwl_mvm_mld_ops
    
    Add all the callbacks that are not changing with the
    new MLD API and register to mac80211 with the new ops.
    
    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/20230328104948.a2f724342522.I5d1d6a8f5f14e6275da56ea704c3c0063fee5226@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:09 +02:00
Íñigo Huguet 6e5e3e9ee0 wifi: iwlwifi: mvm: add support for post_channel_switch in MLD mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit 03117f30b998430d83842057a1ecf0382618acfb
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 28 10:58:49 2023 +0300

    wifi: iwlwifi: mvm: add support for post_channel_switch in MLD mode
    
    Adjust the existing iwl_mvm_post_channel_switch()
    to the new MLD API and use it in the new MLD ieee80211_ops
    
    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/20230328104948.fa3992f7dfd2.Ie298a9b1522e956d7b699f0432795548bc6e47f9@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:09 +02:00
Íñigo Huguet 434a40595c wifi: iwlwifi: mvm: unite sta_modify_disable_tx flows
Bugzilla: https://bugzilla.redhat.com/2196821

commit 56f4f12ba8f6d8cb52f776dfcd261f2e1040d38c
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 28 10:58:48 2023 +0300

    wifi: iwlwifi: mvm: unite sta_modify_disable_tx flows
    
    These flows are the same in both MLD API and the current API,
    except for the commands that are being sent during this flows.
    Instead of checking each time before calling these floews
    what API we use and then call the correct function, call always the old
    one, which in turn will call the new one in case we're using the MLD
    API.
    
    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/20230328104948.5692d8dea9be.Ib1882b2c2f0b0603abc4b7d4a0ecc45cd1fbf9a7@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:09 +02:00
Íñigo Huguet 73dd2be9df wifi: iwlwifi: mvm: add cancel/remain_on_channel for MLD mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit fe8b2ad361fb92f4b2b7b003c4609a2a7ed1fbda
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 28 10:58:47 2023 +0300

    wifi: iwlwifi: mvm: add cancel/remain_on_channel for MLD mode
    
    Add an MLD version of the remain_on_channel and
    cancel_remain_on_channel callbacks.
    
    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/20230328104948.b51813dbebd4.Ia25bbd63d3138e4759237ce2be0cd0436fe01c0a@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:08 +02:00
Íñigo Huguet 1a5ba734e8 wifi: iwlwifi: mvm: refactor iwl_mvm_roc()
Bugzilla: https://bugzilla.redhat.com/2196821

commit feebebae1fc3a9c02395ce48074e763cbcdecc8e
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 28 10:58:46 2023 +0300

    wifi: iwlwifi: mvm: refactor iwl_mvm_roc()
    
    This flow is almost the same for both MLD and non-MLD modes,
    except for some function calls. Therefore there is no reason to
    add an MLD version of this flow. Instead - put the parts that are unique
    for each mode in helper functions, and in the next patch each version of
    this flow will call the common part with pointers to its specific
    helper functions.
    
    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/20230328104948.61bc077a7f3c.Ia3aa81d3293792bf8f80528dbc67a711ce334b32@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:08 +02:00
Íñigo Huguet cd042acb16 wifi: iwlwifi: mvm: add some new MLD ops
Bugzilla: https://bugzilla.redhat.com/2196821

commit 660eba5af0ddf80f04efd970a63958d23c4d1052
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 28 10:58:45 2023 +0300

    wifi: iwlwifi: mvm: add some new MLD ops
    
    Add MLD version of bss_info_changed/switch_vif_chanctx/
    config_iface_filter and conf_tx() callbacks.
    
    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/20230328104948.9c83c253d610.Ibf2006be9ece87896c17cb43dfe3654ac73d81ff@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:08 +02:00
Íñigo Huguet 38b6ee1587 wifi: iwlwifi: mvm: add sta handling flows for MLD mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit 87f7e2435cb7ddafbc644b759aa1a9dffaab1515
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 28 10:58:44 2023 +0300

    wifi: iwlwifi: mvm: add sta handling flows for MLD mode
    
    In MLD mode we have a new STA cmd. As a result, it is also changes
    the flows of adding/updating/removing and handling state of
    a station. Add these flows.
    
    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/20230328104948.b5548cfd8fe3.I70f9c8f3c95e18d5c9af0a5681e0830893509531@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:08 +02:00
Íñigo Huguet b57a5bcd1e wifi: iwlwifi: mvm: sta preparation for MLO
Bugzilla: https://bugzilla.redhat.com/2196821

commit c8ee33e184e4163586cc6c786d5c14dcdf6f4e07
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:58:42 2023 +0300

    wifi: iwlwifi: mvm: sta preparation for MLO
    
    Split iwl_mvm_sta into general and link specific parts. As a first
    step, all link dependent parameters reside in deflink.
    
    The change was done mostly using the spatch below with some manual
    adjustments.
    
    @iwl_mvm_sta@
    struct iwl_mvm_sta *s;
    identifier var = {sta_id, lq_sta, avg_energy};
    @@
    
    (
      s->
    -    var
    +    deflink.var
    )
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104948.34eace06d583.I1f8c5e919a71b21030460fbdd220d42401b688b1@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:07 +02:00
Íñigo Huguet 360fc6c86d wifi: iwlwifi: mvm: vif preparation for MLO
Bugzilla: https://bugzilla.redhat.com/2196821

commit 650cadb730105f1894b6c8afacc57a368dd18b91
Author: Gregory Greenman <gregory.greenman@intel.com>
Date:   Tue Mar 28 10:58:41 2023 +0300

    wifi: iwlwifi: mvm: vif preparation for MLO
    
    In MLO, some fields of iwl_mvm_vif should be defined in the
    context of a link. Define a separate structure for these fields and
    add a deflink object to hold it as part of iwl_mvm_vif. Non-MLO legacy
    code will use only deflink object while MLO related code will use the
    corresponding link from the link array.
    
    It follows the strategy applied in mac80211 for introducing MLO
    changes.
    
    The below spatch takes care of updating all driver code to access
    fields separated into MLD specific data structure via deflink (need
    to convert all references to the fields listed in var to deflink.var
    and also to take care of calls like iwl_mvm_vif_from_mac80211(vif)->field).
    
      @iwl_mld_vif@
      struct iwl_mvm_vif *v;
      struct ieee80211_vif *vv;
      identifier fn;
      identifier var = {bssid, ap_sta_id, bcast_sta, mcast_sta,
                        beacon_stats, smps_requests, probe_resp_data,
                        he_ru_2mhz_block, cab_queue, phy_ctxt,
                        queue_params};
      @@
    
      (
        v->
      -    var
      +    deflink.var
      |
        fn(vv)->
      -    var
      +    deflink.var
      )
    
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230328104948.4896576f0a9f.Ifaf0187c96b9fe52b24bd629331165831a877691@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:15:07 +02:00
Íñigo Huguet c71ef2bbd8 wifi: iwlwifi: mvm: support enabling and disabling HW timestamping
Bugzilla: https://bugzilla.redhat.com/2196821

commit cf85123a210fe99cdd972a5cc84857fec925f794
Author: Avraham Stern <avraham.stern@intel.com>
Date:   Mon Mar 20 12:33:18 2023 +0200

    wifi: iwlwifi: mvm: support enabling and disabling HW timestamping
    
    Instead of enabling HW timestamping by default every time a station
    is connected, disable it by default and enable it only upon request
    for a specific station. HW timestamping can be enabled for only one
    peer at a time.
    
    Signed-off-by: Avraham Stern <avraham.stern@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230320122330.62b98fbf545b.I450c1017ada7900a71a63d879bb542a08e3166c8@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:58 +02:00
Íñigo Huguet 97d0db8d7f wifi: iwlwifi: mvm: refactor iwl_mvm_cfg_he_sta()
Bugzilla: https://bugzilla.redhat.com/2196821

commit 4df6a07551c8a70460b590e534785d5e97d1d528
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Mon Mar 20 12:33:12 2023 +0200

    wifi: iwlwifi: mvm: refactor iwl_mvm_cfg_he_sta()
    
    This function sends the STA_HE_CTXT_CMD, which won't be used in the
    new MLD API. Instead, a part of the fields of this command
    will be in the new STA cmd. Put the parts that are common to both
    commands in functions, which will later be used in sending the new
    STA cmd.
    
    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/20230320122330.19b9b6c346ab.I0b8512eb64d8f03ff83879bafe9707f897d5b3c6@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:57 +02:00
Íñigo Huguet 77d718c66a wifi: iwlwifi: mvm: Don't send MAC CTXT cmd after deauthorization
Bugzilla: https://bugzilla.redhat.com/2196821

commit f5034bcf6868bf5c2de272819aa6de23f5d588f7
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Mon Mar 20 12:33:11 2023 +0200

    wifi: iwlwifi: mvm: Don't send MAC CTXT cmd after deauthorization
    
    We used to send a MAC CTXT cmd to ask the FW to not pass MCAST frames
    if we're associated but not authorized, because we don't have the
    keys in that stage, and after authorization - we sent the cmd again
    to ask the FW to pass MCAST, as we have the keys now.
    The patch linked below was changing this strategy to always allow
    MCAST frames, and if we're not authorized - the driver will drop them.
    But we're still sending the MAC CTXT cmd after deaouthorization even
    though we don't tell the FW to not pass MCAST frames anymore.
    Basically we don't tell the FW anything new with this cmd.
    Fix this by not sending MAC CTXT command after deauthorization.
    For authorization we're sending the cmd to configure other changes too,
    so keep it.
    
    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/20230320122330.11b3481bc497.I9672acff9cfc00e7e1a187e7178caa3a1911a1b5@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:56 +02:00
Íñigo Huguet f62b5c94d0 wifi: iwlwifi: mvm: add stop_ap() and leave_ibss() callbacks for MLD mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit fd1a54c14bd93166784c2adfaf1f4f22c597e963
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Mon Mar 20 12:33:10 2023 +0200

    wifi: iwlwifi: mvm: add stop_ap() and leave_ibss() callbacks for MLD mode
    
    This is another patch in the series adding all the ops
    for the new MLD ieee80211_ops.
    The callbacks added here use the new MLD FW API
    
    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/20230320122330.42b0d4726b8d.I0755baace47c0ab1d9d70137448125d3140ef3af@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:56 +02:00
Íñigo Huguet 00cc47ba0b wifi: iwlwifi: mvm: add start_ap() and join_ibss() callbacks for MLD mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit f947b62c03b15d14349668384bb365aabe898650
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Mon Mar 20 12:33:09 2023 +0200

    wifi: iwlwifi: mvm: add start_ap() and join_ibss() callbacks for MLD mode
    
    This is another patch in the series adding all the ops
    for the new MLD ieee80211_ops.
    The callbacks added here use the new MLD FW API
    
    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/20230320122330.3eb485c359fc.I28be198ea9389083d5a01f68c92763722613ba9b@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:56 +02:00
Íñigo Huguet d73807c1fb wifi: iwlwifi: mvm: enable TX beacon protection
Bugzilla: https://bugzilla.redhat.com/2196821

commit a5de7de7e78eddd3ae16aec01c5601ae36c1c2e8
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon Mar 20 12:33:06 2023 +0200

    wifi: iwlwifi: mvm: enable TX beacon protection
    
    Check hardware/firmware support and enable TX beacon protection
    as well if supported, programming the key into the firmware as
    usual.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230320122330.6a90a4f4f469.Ia028dea75f9a8eed40786d876d51f97fb3142688@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:55 +02:00
Íñigo Huguet bf35e61534 wifi: iwlwifi: mvm: add support for timing measurement
Bugzilla: https://bugzilla.redhat.com/2196821

commit 8e33f046ff0756dd02a0c6da835f32b3a5daf35e
Author: Krishnanand Prabhu <krishnanand.prabhu@intel.com>
Date:   Mon Mar 20 12:33:05 2023 +0200

    wifi: iwlwifi: mvm: add support for timing measurement
    
    Add support for timing measurement in extended capabilities, used for
    time synchronization.
    
    Signed-off-by: Krishnanand Prabhu <krishnanand.prabhu@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230320122330.001d2b459ece.I15ab8fc214edc35f1f362006a9e1a22b89e7ed8e@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:55 +02:00
Íñigo Huguet 4006b75255 wifi: iwlwifi: mvm: add an unassign_vif_chanctx() callback for MLD mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit 6f71e90e65e9bb5d5e12199e19670bb4973a6e39
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:26 2023 +0200

    wifi: iwlwifi: mvm: add an unassign_vif_chanctx() callback for MLD mode
    
    This is another patch in the series adding all the ops
    for the new MLD ieee80211_ops.
    The callback added here uses the new MLD FW API
    
    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/20230314194113.5d4bcd384425.I263eef3aad8efe23a597843fe7c56924038c8fdc@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:50 +02:00
Íñigo Huguet bf6374ffdd wifi: iwlwifi: mvm: refactor __iwl_mvm_unassign_vif_chanctx()
Bugzilla: https://bugzilla.redhat.com/2196821

commit daddfae5527164edee09bcca0848c10ab72c5c5b
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:25 2023 +0200

    wifi: iwlwifi: mvm: refactor __iwl_mvm_unassign_vif_chanctx()
    
    Since parts of the functionality of this function is going to be used
    also by the MLD version of it, put in a separate function the parts
    that are common for both MLD and non-MLD modes.
    The common function will later be used in the MLD ops.
    
    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/20230314194113.fa05929badb9.I2222dc86cf7d7a7bb58c6a2f2529c8089bfe58b4@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:50 +02:00
Íñigo Huguet 78debb9d4d wifi: iwlwifi: mvm: add an assign_vif_chanctx() callback for MLD mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit 50e81437a4831e32b0d04a828aa18c02356ee23e
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:24 2023 +0200

    wifi: iwlwifi: mvm: add an assign_vif_chanctx() callback for MLD mode
    
    This is another patch in the series adding all the ops
    for the new MLD ieee80211_ops.
    The callback added here uses the new MLD FW API.
    
    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/20230314194113.d3753975e720.I45f89cc81370d2cf8d4f51748ccb3ec675eff1bd@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:49 +02:00
Íñigo Huguet cd812ad1db wifi: iwlwifi: mvm: refactor __iwl_mvm_assign_vif_chanctx()
Bugzilla: https://bugzilla.redhat.com/2196821

commit 8a919a78a469bb4e01ced9766bdbb7a03c8a4edf
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:23 2023 +0200

    wifi: iwlwifi: mvm: refactor __iwl_mvm_assign_vif_chanctx()
    
    Since parts of the functionality of this function is going to be used
    also by the MLD version of it, put in a separate function the parts
    that are common for both MLD and non-MLD modes.
    The common function will later be used in the MLD ops.
    
    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/20230314194113.844755701cac.I1c650718ad2381eabc38f4103c1aac67936a1ffc@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:49 +02:00
Íñigo Huguet 59f77ba109 wifi: iwlwifi: mvm: Add a remove_interface() callback for mld mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit 60efeca1c6a75d7f518c963fa4f3694dcfc1147e
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:22 2023 +0200

    wifi: iwlwifi: mvm: Add a remove_interface() callback for mld mode
    
    As the MLD mode and its new APIs are introduced,
    we've decided to add a new ieee80211_ops dedicated for
    MLD callbacks. Add the MLD remove_interface() callback
    which uses the new MLD APIs.
    
    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/20230314194113.b87c5c0a4b6b.I631173a73d6ffd7232aa539ea8b356a222fac398@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:49 +02:00
Íñigo Huguet 682e99eb42 wifi: iwlwifi: mvm: Add an add_interface() callback for mld mode
Bugzilla: https://bugzilla.redhat.com/2196821

commit 1ab26632332eac61cc24464a74fd9bcf5ec5167b
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:21 2023 +0200

    wifi: iwlwifi: mvm: Add an add_interface() callback for mld mode
    
    As the MLD mode and its new APIs are introduced,
    we've decided to add a new ieee80211_ops dedicated for
    MLD callbacks. Add the MLD add_interface() callback
    which uses the new MLD APIs added the previous patches.
    
    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/20230314194113.6adc29bff39b.I97ed469028009be9392dcc6f7b5ffbe45f4b2c43@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:49 +02:00
Íñigo Huguet c82cff760e wifi: iwlwifi: mvm: add support for the new LINK command
Bugzilla: https://bugzilla.redhat.com/2196821

commit 55eb1c5fa4b260491d8be3299d4546d0b34465f4
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:19 2023 +0200

    wifi: iwlwifi: mvm: add support for the new LINK command
    
    As a part of the new MLD FW API changes, we have a new LINK command
    to add/remove/configure a link.
    Add structures and enum definitions, along with the functions that
    sends this command (i.e. add, remove and change mac ctxt).
    These functions will be in used in the next patches.
    
    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/20230314194113.d7808329effb.I13bea2db206b78540bc866bc3ab755ad5be78c53@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:48 +02:00
Íñigo Huguet 9d48d238dc wifi: iwlwifi: mvm: add support for the new MAC CTXT command
Bugzilla: https://bugzilla.redhat.com/2196821

commit 9be162a7b670b7e8dbada3c139d77961f457a34d
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:18 2023 +0200

    wifi: iwlwifi: mvm: add support for the new MAC CTXT command
    
    As a part of the new MLD FW API changes, we have a new MAC CTXT command.
    Add structures and enum definitions, along with the functions that
    sends this command (i.e. add, remove and change mac ctxt).
    This functions will be in used in the next patches.
    
    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/20230314194113.99a41a5bc55f.I310312c829f5f2f69b64fcddce487b1eab80165b@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:48 +02:00
Íñigo Huguet da623ac474 wifi: iwlwifi: mvm: Refactor STA_HE_CTXT_CMD sending flow
Bugzilla: https://bugzilla.redhat.com/2196821

commit 9c4f15cadcd74becbb7e05f7fccd27180e433b8c
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Mar 14 19:49:16 2023 +0200

    wifi: iwlwifi: mvm: Refactor STA_HE_CTXT_CMD sending flow
    
    Refactor STA_HE_CTXT_CMD sending flow:
    
    1. As the new MLD API is introduced, there are some common fields in
    both the old and new APIs. The STA_HE_CTXT_CMD of the non-MLD API
    has common fields with the link and mac commands of the new MLD API.
    Put this common parts in functions so it can be used later by the
    new MLD API.
    
    2. The HE capability which indicates whether the NIC is ack-enabled or
    not is the same for all bands. No need to take it from the specific
    band which is currently in use. Take it from the low band - this
    simplifies the code and doesn't require a phy_ctxt.
    
    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/20230314194113.7ca960596953.Ifc3e816461abbd69c6fd87752342afcedfebc293@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
Íñigo Huguet 0fdf14f4d2 wifi: iwlwifi: mvm: make flush code a bit clearer
Bugzilla: https://bugzilla.redhat.com/2196821

commit f7bd883b3fca50f8429a67b4bfdf82a22e8dac53
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sun Mar 5 14:16:28 2023 +0200

    wifi: iwlwifi: mvm: make flush code a bit clearer
    
    The mask building here is only relevant for the old TX API,
    so move it into the else branch.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230305124407.c0795543f254.I302124a8584dd049577b0c2c74ecd7c48ddf4f3e@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:38 +02:00
Íñigo Huguet eba60e562b wifi: iwlwifi: mvm: add primary 80 known for EHT radiotap
Bugzilla: https://bugzilla.redhat.com/2196821

commit 5abf31544a4d2bcb3a0dd2fd080f9448d4026975
Author: Mordechay Goodstein <mordechay.goodstein@intel.com>
Date:   Sun Mar 5 14:16:26 2023 +0200

    wifi: iwlwifi: mvm: add primary 80 known for EHT radiotap
    
    Calculate the position of the control channel in the wide channel
    based on the chandef, this is used to obtain the value of N in
    802.11be D1.5 Table 9-53a in the column PHY MU/MRU index.
    
    To avoid the need to calculate every frame the value, do it once
    monitor vif is added.
    
    Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20230305124407.fe9a5b58e241.I291ee480252d098f62d9ec39040284d3e521d88e@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2023-07-26 13:14:37 +02:00
Jose Ignacio Tornos Martinez bae9c9c20b wifi: iwlwifi: mvm: add minimal EHT rate reporting
Bugzilla: https://bugzilla.redhat.com/2178526

commit 23dcee948a5ffa61dec94ceb35896eb28f89b169
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon Jan 9 13:07:22 2023 +0200

    wifi: iwlwifi: mvm: add minimal EHT rate reporting
    
    Now with all the prework, this is fairly simple, just report the
    new bandwidth and RX_ENC_EHT type in RX, and for now just do a
    minimal report of the EHT TLC rate in iwl_mvm_set_sta_rate().
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://lore.kernel.org/r/20230109130329.5f34d73d1f74.Ib27ae7bd23bc152d61021fd73aabdc76679b9fe4@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:55 +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
Jose Ignacio Tornos Martinez 0a5a5e7414 wifi: iwlwifi: mvm: support PPE Thresholds for EHT
Bugzilla: https://bugzilla.redhat.com/2178526

commit cb63eb438ee9264b086ec7e0b2f01c56983ebe61
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Tue Nov 22 22:10:36 2022 +0200

    wifi: iwlwifi: mvm: support PPE Thresholds for EHT
    
    In an EHT connection fill in the HE context command
    with PPE Thresholds field from EHT Capabilities IE.
    If PPE Thresholds field presents only in HE Capabilities IE,
    take the thresholds from there.
    If it's not present in both - set the Common Nominal Packet Padding
    field from EHT Capabilities IE.
    
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://lore.kernel.org/r/20221122220713.062ac86110f2.I0bcd5ee35f4d987a49f15501985f90e0d3ce7590@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:08 +02:00
Jose Ignacio Tornos Martinez d4f969f67e wifi: iwlwifi: mvm: support 320 MHz PHY configuration
Bugzilla: https://bugzilla.redhat.com/2178526

commit 7ac875753a11589bfbebe707941ac8a11306ba25
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Nov 22 22:10:33 2022 +0200

    wifi: iwlwifi: mvm: support 320 MHz PHY configuration
    
    Support 320 MHz PHY configuration and while doing so rewrite
    the code since we'd otherwise double the number of cases in
    the switch statement.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://lore.kernel.org/r/20221122220713.964db911b733.If56c94a9bf20c050f35d2421b680e400a9f4aeb8@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:06 +02:00
Jose Ignacio Tornos Martinez 099b7f2594 wifi: iwlwifi: mvm: Fix getting the lowest rate
Bugzilla: https://bugzilla.redhat.com/2178526

commit ef2e7a51095012673b9b72dabe343333f537c826
Author: Ilan Peer <ilan.peer@intel.com>
Date:   Wed Nov 2 16:59:54 2022 +0200

    wifi: iwlwifi: mvm: Fix getting the lowest rate
    
    When setting the rate for Tx, the code tried to get the lowest
    allowed rate but without considering the BSS basic rates. Fix this
    by considering the basic rates.
    
    In addition, declare support for configuring beacon Tx rate and when
    configured use the configured Tx beacon rate to set beacon tx command rate.
    
    Signed-off-by: Ilan Peer <ilan.peer@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20221102165239.be8403f0d5c0.I7d141646746b96310efd75fc77ca9aebc61aefcc@changeid

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-05-09 08:15:56 +02:00
Jose Ignacio Tornos Martinez 21dc129c46 wifi: iwlwifi: mvm: support new key API
Bugzilla: https://bugzilla.redhat.com/2178526

commit 5c75a208c2449c6ea24f07610cc052f6a352246c
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Nov 2 16:59:53 2022 +0200

    wifi: iwlwifi: mvm: support new key API
    
    In order to support MLD, the key API is also changing to have
    station masks instead of just the station ID etc. Change the
    driver to support this, and add the new code in a new file so
    it's more clearly separated.
    
    For now this isn't separated at the mac80211 ops level, which
    we wanted to do, but we're calling these functions in a place
    when pre-start keys are installed in iwl_mvm_start_ap_ibss(),
    and the function has some glue logic to mac80211. We may want
    to change that later.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20221102165239.ed9ccd814abc.Iacc7360de68807fbac19e5b67c86504b39cc15df@changeid

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-05-09 08:15:56 +02:00
Jose Ignacio Tornos Martinez 5b631fc41a wifi: iwlwifi: mvm: send TKIP connection status to csme
Bugzilla: https://bugzilla.redhat.com/2178526

commit e5d3a64e650c721f9e9b1f76e5df8c62f16b734d
Author: Avraham Stern <avraham.stern@intel.com>
Date:   Sun Oct 30 19:17:40 2022 +0200

    wifi: iwlwifi: mvm: send TKIP connection status to csme
    
    Notify csme when associated with TKIP cipher. TKIP is supported
    by csme.
    
    Signed-off-by: Avraham Stern <avraham.stern@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20221030191011.cea63e4a355c.If6cdfa52529a79b923191c89dad7ed871d2ad2c6@changeid

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-05-09 08:15:54 +02:00
Jose Ignacio Tornos Martinez 4d443217de wifi: iwlwifi: mvm: protect TXQ list manipulation
Bugzilla: https://bugzilla.redhat.com/2183490

commit 923bf981eb6ecc027227716e30701bdcc1845fbf
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri Mar 17 10:53:25 2023 +0100

    wifi: iwlwifi: mvm: protect TXQ list manipulation
    
    Some recent upstream debugging uncovered the fact that in
    iwlwifi, the TXQ list manipulation is racy.
    
    Introduce a new state bit for when the TXQ is completely
    ready and can be used without locking, and if that's not
    set yet acquire the lock to check everything correctly.
    
    Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>
    Tested-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-03-31 14:56:07 +02:00
Jose Ignacio Tornos Martinez 11d7b51846 wifi: iwlwifi: mvm: fix mvmtxq->stopped handling
Bugzilla: https://bugzilla.redhat.com/2183490

commit b58e3d4311b54b6dd0e37165277965da0c9eb21d
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri Mar 17 10:53:24 2023 +0100

    wifi: iwlwifi: mvm: fix mvmtxq->stopped handling
    
    This could race if the queue is redirected while full, then
    the flushing internally would start it while it's not yet
    usable again. Fix it by using two state bits instead of just
    one.
    
    Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>
    Tested-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-03-31 14:56:07 +02:00
Jose Ignacio Tornos Martinez a422c46c8d wifi: iwlwifi: mvm: refactor iwl_mvm_set_sta_rate() a bit
Bugzilla: https://bugzilla.redhat.com/2136124

commit 7138763e02d1585659a5e82d517f096459985704
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Sep 6 16:42:09 2022 +0300

    wifi: iwlwifi: mvm: refactor iwl_mvm_set_sta_rate() a bit
    
    Use a switch statement over the rate type instead of the
    if chain, to simplify.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
    Link: https://lore.kernel.org/r/20220906161827.623e32931b67.Id743a7879e84ae37a849179e536c58b1bf55380f@changeid
    Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-01-27 13:41:07 +01:00
Jose Ignacio Tornos Martinez a1c81270cd wifi: mac80211: keep A-MSDU data in sta and per-link
Bugzilla: https://bugzilla.redhat.com/2136124

commit 4c51541ddb78cef2da9c4c30006c0d9d06ea9a77
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Fri Sep 2 16:12:54 2022 +0200

    wifi: mac80211: keep A-MSDU data in sta and per-link
    
    The A-MSDU data needs to be stored per-link and aggregated into a single
    value for the station. Add a new struct ieee_80211_sta_aggregates in
    order to store this data and a new function
    ieee80211_sta_recalc_aggregates to update the current data for the STA.
    
    Note that in the non MLO case the pointer in ieee80211_sta will directly
    reference the data in deflink.agg, which means that recalculation may be
    skipped in that case.
    
    Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2023-01-27 13:40:33 +01:00
Íñigo Huguet 1b2d8b0f38 wifi: iwlwifi: don't spam logs with NSS>2 messages
Bugzilla: https://bugzilla.redhat.com/2136122

commit 4d8421f2dd88583cc7a4d6c2a5532c35e816a52a
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Mon Sep 5 19:22:46 2022 +0200

    wifi: iwlwifi: don't spam logs with NSS>2 messages
    
    I get a log line like this every 4 seconds when connected to my AP:
    
    [15650.221468] iwlwifi 0000:09:00.0: Got NSS = 4 - trimming to 2
    
    Looking at the code, this seems to be related to a hardware limitation,
    and there's nothing to be done. In an effort to keep my dmesg
    manageable, downgrade this error to "debug" rather than "info".
    
    Cc: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
    Signed-off-by: Kalle Valo <kvalo@kernel.org>
    Link: https://lore.kernel.org/r/20220905172246.105383-1-Jason@zx2c4.com

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
2022-11-28 12:57:53 +01:00