Commit 68dd5b7a authored by Teemu Paasikivi's avatar Teemu Paasikivi Committed by John W. Linville

mac80211: check whether scan is in progress before queueing scan_work

As scan_work is queued from work_work it needs to be checked if scan
has been started during execution of work_work. Otherwise, when hw
scan is used, the stack gets error about hw being busy with ongoing
scan. This causes the stack to abort scan without notifying the driver
about it. This leads to a situation where the hw is scanning and the stack
thinks it's not. Then when the scan finishes, the stack will complain by
warnings.
Signed-off-by: default avatarTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 00236aed
...@@ -919,11 +919,16 @@ static void ieee80211_work_work(struct work_struct *work) ...@@ -919,11 +919,16 @@ static void ieee80211_work_work(struct work_struct *work)
run_again(local, jiffies + HZ/2); run_again(local, jiffies + HZ/2);
} }
if (list_empty(&local->work_list) && local->scan_req) mutex_lock(&local->scan_mtx);
if (list_empty(&local->work_list) && local->scan_req &&
!local->scanning)
ieee80211_queue_delayed_work(&local->hw, ieee80211_queue_delayed_work(&local->hw,
&local->scan_work, &local->scan_work,
round_jiffies_relative(0)); round_jiffies_relative(0));
mutex_unlock(&local->scan_mtx);
mutex_unlock(&local->work_mtx); mutex_unlock(&local->work_mtx);
ieee80211_recalc_idle(local); ieee80211_recalc_idle(local);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment