]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mvm: Request periodic system statistics earlier
authorSomashekhar(Som) <somashekhar.puttagangaiah@intel.com>
Thu, 26 Dec 2024 15:44:43 +0000 (17:44 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 13 Jan 2025 13:00:54 +0000 (14:00 +0100)
Currently driver requests periodic statistics after entering EMLSR.
This means that when not in EMLSR, link selection decisions will be
done based on old statistics, from the association time.

Request periodic statistics already at association instead,

Signed-off-by: Somashekhar(Som) <somashekhar.puttagangaiah@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241226174257.4ca59fe0e060.Ic46280aad4dc7087a7d6d0773b86c255133cb7d6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c

index e22c9172bf0281313140cf54ee475e85457d14cb..43fc59415cd3ca0086e644b70cccb83c71980f2e 100644 (file)
@@ -4088,10 +4088,6 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm,
                wiphy_work_cancel(mvm->hw->wiphy, &mvmvif->unblock_esr_tpt_wk);
                wiphy_delayed_work_cancel(mvm->hw->wiphy,
                                          &mvmvif->unblock_esr_tmp_non_bss_wk);
-
-               /* No need for the periodic statistics anymore */
-               if (ieee80211_vif_is_mld(vif) && mvmvif->esr_active)
-                       iwl_mvm_request_periodic_system_statistics(mvm, false);
        }
 
        return 0;
index d02114b093b66490d2c66087995ecd32ec80b5a5..e4ce3257c6634dc81ce78ab5dbf28b0d2991bc90 100644 (file)
@@ -269,9 +269,6 @@ static int iwl_mvm_esr_mode_active(struct iwl_mvm *mvm,
        else
                mvmvif->primary_link = __ffs(vif->active_links);
 
-       /* Needed for tracking RSSI */
-       iwl_mvm_request_periodic_system_statistics(mvm, true);
-
        /*
         * Restart the MPDU counters and the counting window, so when the
         * statistics arrive (which is where we look at the counters) we
@@ -325,7 +322,6 @@ __iwl_mvm_mld_assign_vif_chanctx(struct iwl_mvm *mvm,
                ret = iwl_mvm_esr_mode_active(mvm, vif);
                if (ret) {
                        IWL_ERR(mvm, "failed to activate ESR mode (%d)\n", ret);
-                       iwl_mvm_request_periodic_system_statistics(mvm, false);
                        goto out;
                }
        }
@@ -451,8 +447,6 @@ static int iwl_mvm_esr_mode_inactive(struct iwl_mvm *mvm,
                        break;
        }
 
-       iwl_mvm_request_periodic_system_statistics(mvm, false);
-
        /* Start a new counting window */
        iwl_mvm_restart_mpdu_count(mvm, mvmvif);
 
@@ -859,8 +853,13 @@ static void iwl_mvm_mld_vif_cfg_changed_station(struct iwl_mvm *mvm,
                if (vif->cfg.assoc) {
                        mvmvif->session_prot_connection_loss = false;
 
-                       /* clear statistics to get clean beacon counter */
+                       /*
+                        * Clear statistics to get clean beacon counter, and ask for
+                        * periodic statistics, as they are needed for link
+                        * selection and RX OMI decisions.
+                        */
                        iwl_mvm_request_statistics(mvm, true);
+                       iwl_mvm_request_periodic_system_statistics(mvm, true);
                        iwl_mvm_sf_update(mvm, vif, false);
                        iwl_mvm_power_vif_assoc(mvm, vif);
 
@@ -908,6 +907,8 @@ static void iwl_mvm_mld_vif_cfg_changed_station(struct iwl_mvm *mvm,
                } else if (iwl_mvm_mld_vif_have_valid_ap_sta(mvmvif)) {
                        iwl_mvm_mei_host_disassociated(mvm);
 
+                       iwl_mvm_request_periodic_system_statistics(mvm, false);
+
                        /* If update fails - SF might be running in associated
                         * mode while disassociated - which is forbidden.
                         */