wifi: iwlwifi: mld: avoid init-after-queue
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 6 May 2025 19:40:57 +0000 (22:40 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Fri, 9 May 2025 12:36:44 +0000 (15:36 +0300)
rx_omi::finished_work is initialized when the containing link is.
If the worker was queued and then an error happened, we will get to
iwl_mld_init_link from the reconfig and initialize the work after it was
queued.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-11-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/mld/link.c

index fa822b748791282254571bd36d1a4b3157302360..cecefa26445fdcbc2dba13c99de69d69dc370b18 100644 (file)
@@ -785,8 +785,9 @@ iwl_mld_init_link(struct iwl_mld *mld, struct ieee80211_bss_conf *link,
        iwl_mld_init_internal_sta(&mld_link->aux_sta);
        iwl_mld_init_internal_sta(&mld_link->mon_sta);
 
-       wiphy_delayed_work_init(&mld_link->rx_omi.finished_work,
-                               iwl_mld_omi_bw_finished_work);
+       if (!mld->fw_status.in_hw_restart)
+               wiphy_delayed_work_init(&mld_link->rx_omi.finished_work,
+                                       iwl_mld_omi_bw_finished_work);
 
        return iwl_mld_allocate_link_fw_id(mld, &mld_link->fw_id, link);
 }