mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
mac80211: don't reconfigure sched scan in case of wowlan
Scheduled scan has to be reconfigured only if wowlan wasn't configured, since otherwise it should continue to run (with the 'any' trigger) or be aborted. The current code will end up asking the driver to start a new scheduled scan without stopping the previous one, and leaking some memory (from the previous request.) Fix this by doing the abort/restart under the proper conditions. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
968a76cef3
commit
0d440ea294
5 changed files with 45 additions and 35 deletions
|
@ -6,6 +6,13 @@
|
|||
#include "driver-ops.h"
|
||||
#include "led.h"
|
||||
|
||||
static void ieee80211_sched_scan_cancel(struct ieee80211_local *local)
|
||||
{
|
||||
if (ieee80211_request_sched_scan_stop(local))
|
||||
return;
|
||||
cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy);
|
||||
}
|
||||
|
||||
int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
|
@ -34,6 +41,10 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
|
|||
mutex_unlock(&local->sta_mtx);
|
||||
}
|
||||
|
||||
/* keep sched_scan only in case of 'any' trigger */
|
||||
if (!(wowlan && wowlan->any))
|
||||
ieee80211_sched_scan_cancel(local);
|
||||
|
||||
ieee80211_stop_queues_by_reason(hw,
|
||||
IEEE80211_MAX_QUEUE_MAP,
|
||||
IEEE80211_QUEUE_STOP_REASON_SUSPEND,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue