diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/work.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c index 1e1ea3007b0..7bd8670379d 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c | |||
@@ -919,11 +919,16 @@ static void ieee80211_work_work(struct work_struct *work) | |||
919 | run_again(local, jiffies + HZ/2); | 919 | run_again(local, jiffies + HZ/2); |
920 | } | 920 | } |
921 | 921 | ||
922 | if (list_empty(&local->work_list) && local->scan_req) | 922 | mutex_lock(&local->scan_mtx); |
923 | |||
924 | if (list_empty(&local->work_list) && local->scan_req && | ||
925 | !local->scanning) | ||
923 | ieee80211_queue_delayed_work(&local->hw, | 926 | ieee80211_queue_delayed_work(&local->hw, |
924 | &local->scan_work, | 927 | &local->scan_work, |
925 | round_jiffies_relative(0)); | 928 | round_jiffies_relative(0)); |
926 | 929 | ||
930 | mutex_unlock(&local->scan_mtx); | ||
931 | |||
927 | mutex_unlock(&local->work_mtx); | 932 | mutex_unlock(&local->work_mtx); |
928 | 933 | ||
929 | ieee80211_recalc_idle(local); | 934 | ieee80211_recalc_idle(local); |