diff options
author | Eliad Peller <eliad@wizery.com> | 2011-06-13 05:47:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-17 14:22:18 -0400 |
commit | b856439b1b54358e580aaee5dbe683af5ada9403 (patch) | |
tree | dc38beee0a1585693fa228e33646dee5a37f456d /include/net/mac80211.h | |
parent | eb40e3e8bb453519ae17d42e7cab6bdd2b4b9fc5 (diff) |
mac80211: add cancel_hw_scan() callback
When suspending, __ieee80211_suspend() calls ieee80211_scan_cancel(),
which will only cancel sw scan. In order to cancel hw scan, the
low-level driver has to cancel it in the suspend() callback. however,
this is too late, as a new scan_work will be enqueued (while the driver
is going into suspend).
Add a new cancel_hw_scan() callback, asking the driver to cancel an
active hw scan, and call it in ieee80211_scan_cancel().
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index e33fe795a3a4..120f102814b6 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1708,6 +1708,14 @@ enum ieee80211_ampdu_mlme_action { | |||
1708 | * any error unless this callback returned a negative error code. | 1708 | * any error unless this callback returned a negative error code. |
1709 | * The callback can sleep. | 1709 | * The callback can sleep. |
1710 | * | 1710 | * |
1711 | * @cancel_hw_scan: Ask the low-level tp cancel the active hw scan. | ||
1712 | * The driver should ask the hardware to cancel the scan (if possible), | ||
1713 | * but the scan will be completed only after the driver will call | ||
1714 | * ieee80211_scan_completed(). | ||
1715 | * This callback is needed for wowlan, to prevent enqueueing a new | ||
1716 | * scan_work after the low-level driver was already suspended. | ||
1717 | * The callback can sleep. | ||
1718 | * | ||
1711 | * @sched_scan_start: Ask the hardware to start scanning repeatedly at | 1719 | * @sched_scan_start: Ask the hardware to start scanning repeatedly at |
1712 | * specific intervals. The driver must call the | 1720 | * specific intervals. The driver must call the |
1713 | * ieee80211_sched_scan_results() function whenever it finds results. | 1721 | * ieee80211_sched_scan_results() function whenever it finds results. |
@@ -1900,6 +1908,8 @@ struct ieee80211_ops { | |||
1900 | u32 iv32, u16 *phase1key); | 1908 | u32 iv32, u16 *phase1key); |
1901 | int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 1909 | int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
1902 | struct cfg80211_scan_request *req); | 1910 | struct cfg80211_scan_request *req); |
1911 | void (*cancel_hw_scan)(struct ieee80211_hw *hw, | ||
1912 | struct ieee80211_vif *vif); | ||
1903 | int (*sched_scan_start)(struct ieee80211_hw *hw, | 1913 | int (*sched_scan_start)(struct ieee80211_hw *hw, |
1904 | struct ieee80211_vif *vif, | 1914 | struct ieee80211_vif *vif, |
1905 | struct cfg80211_sched_scan_request *req, | 1915 | struct cfg80211_sched_scan_request *req, |