aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/work.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/work.c')
-rw-r--r--net/mac80211/work.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 1e1ea3007b06..bdb1d05b16fc 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -19,6 +19,7 @@
19#include <linux/if_arp.h> 19#include <linux/if_arp.h>
20#include <linux/etherdevice.h> 20#include <linux/etherdevice.h>
21#include <linux/crc32.h> 21#include <linux/crc32.h>
22#include <linux/slab.h>
22#include <net/mac80211.h> 23#include <net/mac80211.h>
23#include <asm/unaligned.h> 24#include <asm/unaligned.h>
24 25
@@ -919,11 +920,16 @@ static void ieee80211_work_work(struct work_struct *work)
919 run_again(local, jiffies + HZ/2); 920 run_again(local, jiffies + HZ/2);
920 } 921 }
921 922
922 if (list_empty(&local->work_list) && local->scan_req) 923 mutex_lock(&local->scan_mtx);
924
925 if (list_empty(&local->work_list) && local->scan_req &&
926 !local->scanning)
923 ieee80211_queue_delayed_work(&local->hw, 927 ieee80211_queue_delayed_work(&local->hw,
924 &local->scan_work, 928 &local->scan_work,
925 round_jiffies_relative(0)); 929 round_jiffies_relative(0));
926 930
931 mutex_unlock(&local->scan_mtx);
932
927 mutex_unlock(&local->work_mtx); 933 mutex_unlock(&local->work_mtx);
928 934
929 ieee80211_recalc_idle(local); 935 ieee80211_recalc_idle(local);