aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/work.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-03-28 10:01:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-13 14:31:50 -0400
commit5f5460706e5feaef286aacce37647f7e57d026e4 (patch)
treecbea8989e8967cf5438328dede657b3dabc6fa4c /net/mac80211/work.c
parent133d40f9a22bdfd2617a446f1e3209537c5415ec (diff)
mac80211: protect ->scanning by mutex in ieee80211_work_work()
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/work.c')
-rw-r--r--net/mac80211/work.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 1f74af33901b..b2650a9d45ff 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -122,9 +122,6 @@ static void ieee80211_work_work(struct work_struct *work)
122 enum work_action rma; 122 enum work_action rma;
123 bool remain_off_channel = false; 123 bool remain_off_channel = false;
124 124
125 if (local->scanning)
126 return;
127
128 /* 125 /*
129 * ieee80211_queue_work() should have picked up most cases, 126 * ieee80211_queue_work() should have picked up most cases,
130 * here we'll pick the rest. 127 * here we'll pick the rest.
@@ -134,6 +131,11 @@ static void ieee80211_work_work(struct work_struct *work)
134 131
135 mutex_lock(&local->mtx); 132 mutex_lock(&local->mtx);
136 133
134 if (local->scanning) {
135 mutex_unlock(&local->mtx);
136 return;
137 }
138
137 ieee80211_recalc_idle(local); 139 ieee80211_recalc_idle(local);
138 140
139 list_for_each_entry_safe(wk, tmp, &local->work_list, list) { 141 list_for_each_entry_safe(wk, tmp, &local->work_list, list) {