wifi: iwlwifi: mvm: remove pre-mld code from mld path
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 24 Dec 2024 17:27:27 +0000 (19:27 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 13 Jan 2025 12:53:03 +0000 (13:53 +0100)
This code is only relevant for older devices, that are not supporting
mld, so shouldn't be in iwl_mvm_sta_del, which is common to both pre-mld
and mld.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://patch.msgid.link/20241224192322.a665d16a3857.I840b00a7b38f3967ec5e75ff6a85e756f4d82437@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/sta.c

index cd74c18..f881fde 100644 (file)
@@ -2063,28 +2063,6 @@ bool iwl_mvm_sta_del(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                                          lockdep_is_held(&mvm->mutex));
        sta_id = mvm_link_sta->sta_id;
 
-       /* If there is a TXQ still marked as reserved - free it */
-       if (mvm_sta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) {
-               u8 reserved_txq = mvm_sta->reserved_queue;
-               enum iwl_mvm_queue_status *status;
-
-               /*
-                * If no traffic has gone through the reserved TXQ - it
-                * is still marked as IWL_MVM_QUEUE_RESERVED, and
-                * should be manually marked as free again
-                */
-               status = &mvm->queue_info[reserved_txq].status;
-               if (WARN((*status != IWL_MVM_QUEUE_RESERVED) &&
-                        (*status != IWL_MVM_QUEUE_FREE),
-                        "sta_id %d reserved txq %d status %d",
-                        sta_id, reserved_txq, *status)) {
-                       *ret = -EINVAL;
-                       return true;
-               }
-
-               *status = IWL_MVM_QUEUE_FREE;
-       }
-
        if (vif->type == NL80211_IFTYPE_STATION &&
            mvm_link->ap_sta_id == sta_id) {
                /* if associated - we can't remove the AP STA now */
@@ -2143,6 +2121,26 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm,
 
        iwl_mvm_disable_sta_queues(mvm, vif, sta);
 
+       /* If there is a TXQ still marked as reserved - free it */
+       if (mvm_sta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) {
+               u8 reserved_txq = mvm_sta->reserved_queue;
+               enum iwl_mvm_queue_status *status;
+
+               /*
+                * If no traffic has gone through the reserved TXQ - it
+                * is still marked as IWL_MVM_QUEUE_RESERVED, and
+                * should be manually marked as free again
+                */
+               status = &mvm->queue_info[reserved_txq].status;
+               if (WARN((*status != IWL_MVM_QUEUE_RESERVED) &&
+                        (*status != IWL_MVM_QUEUE_FREE),
+                        "sta_id %d reserved txq %d status %d",
+                        mvm_sta->deflink.sta_id, reserved_txq, *status))
+                       return -EINVAL;
+
+               *status = IWL_MVM_QUEUE_FREE;
+       }
+
        if (iwl_mvm_sta_del(mvm, vif, sta, &sta->deflink, &ret))
                return ret;