mac80211: support hw scan while idle

Currently, mac80211 goes to idle-off before starting a scan.
However, some devices that implement hw scan might not
need going idle-off in order to perform a hw scan, and
thus saving some energy and simplifying their state machine.

(Note that this is also the case for sched scan - it
currently doesn't make mac80211 go idle-off)

Add a new flag to indicate support for hw scan while idle.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Eliad Peller
2012-02-02 17:44:55 +02:00
committed by John W. Linville
parent 3dc5e17518
commit 885bd8eca6
4 changed files with 12 additions and 1 deletions

View File

@ -697,6 +697,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
)
return -EINVAL;
if ((hw->flags & IEEE80211_HW_SCAN_WHILE_IDLE) && !local->ops->hw_scan)
return -EINVAL;
if (hw->max_report_rates == 0)
hw->max_report_rates = hw->max_rates;