Lines Matching +full:local +full:- +full:timers
1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (C) 2020-2021 Intel Corporation
11 #include "driver-ops.h"
14 static void ieee80211_sched_scan_cancel(struct ieee80211_local *local) in ieee80211_sched_scan_cancel() argument
16 if (ieee80211_request_sched_scan_stop(local)) in ieee80211_sched_scan_cancel()
18 cfg80211_sched_scan_stopped_locked(local->hw.wiphy, 0); in ieee80211_sched_scan_cancel()
23 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_suspend() local
27 if (!local->open_count) in __ieee80211_suspend()
30 local->suspending = true; in __ieee80211_suspend()
33 ieee80211_scan_cancel(local); in __ieee80211_suspend()
35 ieee80211_dfs_cac_cancel(local); in __ieee80211_suspend()
37 ieee80211_roc_purge(local, NULL); in __ieee80211_suspend()
39 ieee80211_del_virtual_monitor(local); in __ieee80211_suspend()
42 !(wowlan && wowlan->any)) { in __ieee80211_suspend()
43 mutex_lock(&local->sta_mtx); in __ieee80211_suspend()
44 list_for_each_entry(sta, &local->sta_list, list) { in __ieee80211_suspend()
49 mutex_unlock(&local->sta_mtx); in __ieee80211_suspend()
53 if (!(wowlan && wowlan->any)) in __ieee80211_suspend()
54 ieee80211_sched_scan_cancel(local); in __ieee80211_suspend()
64 ieee80211_flush_queues(local, NULL, true); in __ieee80211_suspend()
66 local->quiescing = true; in __ieee80211_suspend()
67 /* make quiescing visible to timers everywhere */ in __ieee80211_suspend()
70 flush_workqueue(local->workqueue); in __ieee80211_suspend()
72 /* Don't try to run timers while suspended. */ in __ieee80211_suspend()
73 del_timer_sync(&local->sta_cleanup); in __ieee80211_suspend()
79 cancel_work_sync(&local->dynamic_ps_enable_work); in __ieee80211_suspend()
80 del_timer_sync(&local->dynamic_ps_timer); in __ieee80211_suspend()
82 local->wowlan = wowlan; in __ieee80211_suspend()
83 if (local->wowlan) { in __ieee80211_suspend()
91 * Thus, clean up in-progress auth/assoc first. in __ieee80211_suspend()
93 list_for_each_entry(sdata, &local->interfaces, list) { in __ieee80211_suspend()
96 if (sdata->vif.type != NL80211_IFTYPE_STATION) in __ieee80211_suspend()
102 * of power-save due to TX and during suspend in __ieee80211_suspend()
108 if (sdata->u.mgd.associated && in __ieee80211_suspend()
109 sdata->u.mgd.powersave && in __ieee80211_suspend()
110 !(local->hw.conf.flags & IEEE80211_CONF_PS)) { in __ieee80211_suspend()
111 local->hw.conf.flags |= IEEE80211_CONF_PS; in __ieee80211_suspend()
112 ieee80211_hw_config(local, in __ieee80211_suspend()
117 err = drv_suspend(local, wowlan); in __ieee80211_suspend()
119 local->quiescing = false; in __ieee80211_suspend()
120 local->wowlan = false; in __ieee80211_suspend()
122 mutex_lock(&local->sta_mtx); in __ieee80211_suspend()
124 &local->sta_list, list) { in __ieee80211_suspend()
127 mutex_unlock(&local->sta_mtx); in __ieee80211_suspend()
150 list_for_each_entry(sdata, &local->interfaces, list) { in __ieee80211_suspend()
153 switch (sdata->vif.type) { in __ieee80211_suspend()
164 flush_delayed_work(&sdata->dec_tailroom_needed_wk); in __ieee80211_suspend()
165 drv_remove_interface(local, sdata); in __ieee80211_suspend()
172 WARN_ON(!list_empty(&local->chanctx_list)); in __ieee80211_suspend()
174 /* stop hardware - this must stop RX */ in __ieee80211_suspend()
175 ieee80211_stop_device(local); in __ieee80211_suspend()
178 local->suspended = true; in __ieee80211_suspend()
181 local->quiescing = false; in __ieee80211_suspend()
182 local->suspending = false; in __ieee80211_suspend()
199 cfg80211_report_wowlan_wakeup(&sdata->wdev, wakeup, gfp); in ieee80211_report_wowlan_wakeup()