@@ -540,14 +540,10 @@ void iwl_mld_mac80211_stop(struct ieee80211_hw *hw, bool suspend)
if (!suspend || iwl_mld_no_wowlan_suspend(mld))
iwl_mld_stop_fw(mld);
- /* HW is stopped, no more coming RX. OTOH, the worker can't run as the
- * wiphy lock is held. Cancel it in case it was scheduled just before
- * we stopped the HW.
+ /* HW is stopped, no more coming RX. Cancel all notifications in
+ * case they were sent just before stopping the HW.
*/
- wiphy_work_cancel(mld->wiphy, &mld->async_handlers_wk);
-
- /* Empty out the list, as the worker won't do that */
- iwl_mld_purge_async_handlers_list(mld);
+ iwl_mld_cancel_async_notifications(mld);
/* Clear in_hw_restart flag when stopping the hw, as mac80211 won't
* execute the restart.
@@ -299,10 +299,10 @@ iwl_cleanup_mld(struct iwl_mld *mld)
iwl_mld_low_latency_restart_cleanup(mld);
- /* Empty the list of async notification handlers so we won't process
+ /* Cancel the async notification handlers so we won't process
* notifications from the dead fw after the reconfig flow.
*/
- iwl_mld_purge_async_handlers_list(mld);
+ iwl_mld_cancel_async_notifications(mld);
}
enum iwl_power_scheme {
@@ -662,10 +662,14 @@ void iwl_mld_async_handlers_wk(struct wiphy *wiphy, struct wiphy_work *wk)
}
}
-void iwl_mld_purge_async_handlers_list(struct iwl_mld *mld)
+void iwl_mld_cancel_async_notifications(struct iwl_mld *mld)
{
struct iwl_async_handler_entry *entry, *tmp;
+ lockdep_assert_wiphy(mld->wiphy);
+
+ wiphy_work_cancel(mld->wiphy, &mld->async_handlers_wk);
+
spin_lock_bh(&mld->async_handlers_lock);
list_for_each_entry_safe(entry, tmp, &mld->async_handlers_list, list) {
iwl_mld_log_async_handler_op(mld, "Purged", &entry->rxb);
@@ -15,7 +15,7 @@ void iwl_mld_rx_rss(struct iwl_op_mode *op_mode, struct napi_struct *napi,
void iwl_mld_async_handlers_wk(struct wiphy *wiphy, struct wiphy_work *wk);
-void iwl_mld_purge_async_handlers_list(struct iwl_mld *mld);
+void iwl_mld_cancel_async_notifications(struct iwl_mld *mld);
enum iwl_mld_object_type {
IWL_MLD_OBJECT_TYPE_NONE,