diff options
-rw-r--r-- | net/mac80211/ieee80211_i.h | 6 | ||||
-rw-r--r-- | net/mac80211/pm.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 16f7fb164c2d..4e635e2fabdb 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1186,6 +1186,12 @@ int __ieee80211_suspend(struct ieee80211_hw *hw); | |||
1186 | 1186 | ||
1187 | static inline int __ieee80211_resume(struct ieee80211_hw *hw) | 1187 | static inline int __ieee80211_resume(struct ieee80211_hw *hw) |
1188 | { | 1188 | { |
1189 | struct ieee80211_local *local = hw_to_local(hw); | ||
1190 | |||
1191 | WARN(test_bit(SCAN_HW_SCANNING, &local->scanning), | ||
1192 | "%s: resume with hardware scan still in progress\n", | ||
1193 | wiphy_name(hw->wiphy)); | ||
1194 | |||
1189 | return ieee80211_reconfig(hw_to_local(hw)); | 1195 | return ieee80211_reconfig(hw_to_local(hw)); |
1190 | } | 1196 | } |
1191 | #else | 1197 | #else |
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index d287fde0431d..ce671dfd238c 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -12,7 +12,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
12 | struct ieee80211_sub_if_data *sdata; | 12 | struct ieee80211_sub_if_data *sdata; |
13 | struct sta_info *sta; | 13 | struct sta_info *sta; |
14 | 14 | ||
15 | ieee80211_scan_cancel(local); | 15 | if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning))) |
16 | ieee80211_scan_cancel(local); | ||
16 | 17 | ||
17 | ieee80211_stop_queues_by_reason(hw, | 18 | ieee80211_stop_queues_by_reason(hw, |
18 | IEEE80211_QUEUE_STOP_REASON_SUSPEND); | 19 | IEEE80211_QUEUE_STOP_REASON_SUSPEND); |