aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.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/cfg.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/cfg.c')
-rw-r--r--net/mac80211/cfg.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index c416cce5e1ed..a2ff47493e0a 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1362,6 +1362,31 @@ static int ieee80211_scan(struct wiphy *wiphy,
1362 return ieee80211_request_scan(sdata, req); 1362 return ieee80211_request_scan(sdata, req);
1363} 1363}
1364 1364
1365static int
1366ieee80211_sched_scan_start(struct wiphy *wiphy,
1367 struct net_device *dev,
1368 struct cfg80211_sched_scan_request *req)
1369{
1370 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1371
1372 if (!sdata->local->ops->sched_scan_start)
1373 return -EOPNOTSUPP;
1374
1375 return ieee80211_request_sched_scan_start(sdata, req);
1376}
1377
1378static int
1379ieee80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev,
1380 bool driver_initiated)
1381{
1382 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1383
1384 if (!sdata->local->ops->sched_scan_stop)
1385 return -EOPNOTSUPP;
1386
1387 return ieee80211_request_sched_scan_stop(sdata, driver_initiated);
1388}
1389
1365static int ieee80211_auth(struct wiphy *wiphy, struct net_device *dev, 1390static int ieee80211_auth(struct wiphy *wiphy, struct net_device *dev,
1366 struct cfg80211_auth_request *req) 1391 struct cfg80211_auth_request *req)
1367{ 1392{
@@ -2103,6 +2128,8 @@ struct cfg80211_ops mac80211_config_ops = {
2103 .suspend = ieee80211_suspend, 2128 .suspend = ieee80211_suspend,
2104 .resume = ieee80211_resume, 2129 .resume = ieee80211_resume,
2105 .scan = ieee80211_scan, 2130 .scan = ieee80211_scan,
2131 .sched_scan_start = ieee80211_sched_scan_start,
2132 .sched_scan_stop = ieee80211_sched_scan_stop,
2106 .auth = ieee80211_auth, 2133 .auth = ieee80211_auth,
2107 .assoc = ieee80211_assoc, 2134 .assoc = ieee80211_assoc,
2108 .deauth = ieee80211_deauth, 2135 .deauth = ieee80211_deauth,