wifi: iwlwifi: mvm: Don't access vif valid links directly
authorIlan Peer <ilan.peer@intel.com>
Thu, 15 Jun 2023 06:47:18 +0000 (09:47 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Jun 2023 10:05:27 +0000 (12:05 +0200)
And instead use the vif getter functions, as a preparation for
supporting disabled/dormant links.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230615094410.61ca688cbbf1.Ic1b4049cf156238ff16e6c57959004da911cb5c8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c

index a2583d0..b8143ae 100644 (file)
@@ -893,7 +893,7 @@ u8 iwl_mvm_mac_ctxt_get_lowest_rate(struct iwl_mvm *mvm,
        u8 rate;
        u32 i;
 
-       if (link_id == IEEE80211_LINK_UNSPECIFIED && vif->valid_links) {
+       if (link_id == IEEE80211_LINK_UNSPECIFIED && ieee80211_vif_is_mld(vif)) {
                for (i = 0; i < ARRAY_SIZE(mvmvif->link); i++) {
                        if (!mvmvif->link[i])
                                continue;
index b27f6a7..2c9f2f7 100644 (file)
@@ -42,7 +42,7 @@ static u32 iwl_mvm_get_sec_sta_mask(struct iwl_mvm *mvm,
         * Of course the same can be done during add as well, but we must do
         * it during remove, since we don't have the mvmvif->ap_sta pointer.
         */
-       if (!sta && (keyconf->link_id >= 0 || !vif->valid_links))
+       if (!sta && (keyconf->link_id >= 0 || !ieee80211_vif_is_mld(vif)))
                return BIT(link_info->ap_sta_id);
 
        /* STA should be non-NULL now, but iwl_mvm_sta_fw_id_mask() checks */
index 0ff99de..f313a8d 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2022 Intel Corporation
+ * Copyright (C) 2022 - 2023 Intel Corporation
  */
 #include "mvm.h"
 
@@ -50,7 +50,7 @@ static void iwl_mvm_mld_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
         * the association response successfully, so just skip all that
         * and enable both when we have MLO.
         */
-       if (vif->valid_links) {
+       if (ieee80211_vif_is_mld(vif)) {
                iwl_mvm_mld_set_he_support(mvm, vif, cmd);
                cmd->eht_support = cpu_to_le32(1);
                return;