summaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2013-12-08 14:48:57 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 07:47:26 -0500
commitd43c6b6e6f2fcaebf198c499716e5e24d878fdd2 (patch)
treeef8cc16a17e5b0101d0fc138eb28e55ebd3363c9 /net/mac80211/util.c
parent0ae07968f6de608ab02d98731747299a0cf274ea (diff)
mac80211: reschedule sched scan after HW restart
Keep the sched scan req when starting sched scan, and reschedule it in case of HW restart during sched scan. The upper layer don't have to know about the restart. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index adf81f023681..591b46b72462 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1462,6 +1462,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1462 struct sta_info *sta; 1462 struct sta_info *sta;
1463 int res, i; 1463 int res, i;
1464 bool reconfig_due_to_wowlan = false; 1464 bool reconfig_due_to_wowlan = false;
1465 struct ieee80211_sub_if_data *sched_scan_sdata;
1466 bool sched_scan_stopped = false;
1465 1467
1466#ifdef CONFIG_PM 1468#ifdef CONFIG_PM
1467 if (local->suspended) 1469 if (local->suspended)
@@ -1765,6 +1767,27 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1765#else 1767#else
1766 WARN_ON(1); 1768 WARN_ON(1);
1767#endif 1769#endif
1770
1771 /*
1772 * Reconfigure sched scan if it was interrupted by FW restart or
1773 * suspend.
1774 */
1775 mutex_lock(&local->mtx);
1776 sched_scan_sdata = rcu_dereference_protected(local->sched_scan_sdata,
1777 lockdep_is_held(&local->mtx));
1778 if (sched_scan_sdata && local->sched_scan_req)
1779 /*
1780 * Sched scan stopped, but we don't want to report it. Instead,
1781 * we're trying to reschedule.
1782 */
1783 if (__ieee80211_request_sched_scan_start(sched_scan_sdata,
1784 local->sched_scan_req))
1785 sched_scan_stopped = true;
1786 mutex_unlock(&local->mtx);
1787
1788 if (sched_scan_stopped)
1789 cfg80211_sched_scan_stopped(local->hw.wiphy);
1790
1768 return 0; 1791 return 0;
1769} 1792}
1770 1793