aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorLuciano Coelho <coelho@ti.com>2011-05-11 10:09:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-11 15:12:27 -0400
commit79f460ca49d8d5700756ab7071c951311c7f29cc (patch)
treeb11b62473697c6c1858b83b3abe5181990f85c19 /net/mac80211/main.c
parent807f8a8c300435d5483e8d78df9dcdbc27333166 (diff)
mac80211: add support for HW scheduled scan
Implement support for HW scheduled scan. The mac80211 code doesn't perform scheduled scans itself, but calls the driver to start and stop scheduled scans. This patch also creates a trace event class to be used by drv_hw_scan and the new drv_sched_scan_start and drv_sched_stop functions, in order to avoid duplicate code. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index ab1f464817af..30e6a682a047 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -358,7 +358,8 @@ static void ieee80211_restart_work(struct work_struct *work)
358 flush_workqueue(local->workqueue); 358 flush_workqueue(local->workqueue);
359 359
360 mutex_lock(&local->mtx); 360 mutex_lock(&local->mtx);
361 WARN(test_bit(SCAN_HW_SCANNING, &local->scanning), 361 WARN(test_bit(SCAN_HW_SCANNING, &local->scanning) ||
362 local->sched_scanning,
362 "%s called with hardware scan in progress\n", __func__); 363 "%s called with hardware scan in progress\n", __func__);
363 mutex_unlock(&local->mtx); 364 mutex_unlock(&local->mtx);
364 365
@@ -833,6 +834,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
833 if (!local->ops->remain_on_channel) 834 if (!local->ops->remain_on_channel)
834 local->hw.wiphy->max_remain_on_channel_duration = 5000; 835 local->hw.wiphy->max_remain_on_channel_duration = 5000;
835 836
837 if (local->ops->sched_scan_start)
838 local->hw.wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
839
836 result = wiphy_register(local->hw.wiphy); 840 result = wiphy_register(local->hw.wiphy);
837 if (result < 0) 841 if (result < 0)
838 goto fail_wiphy_register; 842 goto fail_wiphy_register;