aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2014-02-11 05:27:19 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-11 06:59:12 -0500
commit32769814d54a5a360b83811b4039c776ec953c71 (patch)
treeab0245a4935cd6116a6c671c3a0dd085b56f4d44
parentfab57a6cc227468ca9e6a4c7ff8d3b10727785ee (diff)
mac80211: fix sched_scan restart on recovery
In case we were not suspended, the reconfig function returns without configuring the scheduled scan. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/util.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 676dc0967f37..1d1bb7084c05 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1741,6 +1741,26 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1741 IEEE80211_QUEUE_STOP_REASON_SUSPEND); 1741 IEEE80211_QUEUE_STOP_REASON_SUSPEND);
1742 1742
1743 /* 1743 /*
1744 * Reconfigure sched scan if it was interrupted by FW restart or
1745 * suspend.
1746 */
1747 mutex_lock(&local->mtx);
1748 sched_scan_sdata = rcu_dereference_protected(local->sched_scan_sdata,
1749 lockdep_is_held(&local->mtx));
1750 if (sched_scan_sdata && local->sched_scan_req)
1751 /*
1752 * Sched scan stopped, but we don't want to report it. Instead,
1753 * we're trying to reschedule.
1754 */
1755 if (__ieee80211_request_sched_scan_start(sched_scan_sdata,
1756 local->sched_scan_req))
1757 sched_scan_stopped = true;
1758 mutex_unlock(&local->mtx);
1759
1760 if (sched_scan_stopped)
1761 cfg80211_sched_scan_stopped(local->hw.wiphy);
1762
1763 /*
1744 * If this is for hw restart things are still running. 1764 * If this is for hw restart things are still running.
1745 * We may want to change that later, however. 1765 * We may want to change that later, however.
1746 */ 1766 */
@@ -1768,26 +1788,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1768 WARN_ON(1); 1788 WARN_ON(1);
1769#endif 1789#endif
1770 1790
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
1791 return 0; 1791 return 0;
1792} 1792}
1793 1793