mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
wifi: iwlwifi: mld: refactor purging async notifications
To cancel all async notifications, we need to: - cancel async_handlers_wk - empty async_handlers_list Instead of having the callers to do both, do it in iwl_mld_purge_async_handlers_list and rename it accordingly. Note that the caller iwl_cleanup_mld didn't cancel the work, but it is harmless. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.e98aed77e836.Id9f858d9d553d406a24165b09db830df111befce@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
e1d35eabdd
commit
833026098b
|
|
@ -541,14 +541,10 @@ void iwl_mld_mac80211_stop(struct ieee80211_hw *hw, bool suspend)
|
|||
(IS_ENABLED(CONFIG_PM_SLEEP) && 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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user