diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2010-04-27 05:59:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-27 16:09:23 -0400 |
commit | a060bbfe4ee95d115e8f9705a66894ac34e2c475 (patch) | |
tree | 6aea616cdd07c06886c0e1ffade68e5d58f9e9c2 /net/mac80211 | |
parent | 9043f3b89abebfbfe4b8d64c7b71b9ac0b9eaa0b (diff) |
mac80211: give virtual interface to hw_scan
When scanning, it is somewhat important to scan
on the correct virtual interface. All drivers
that currently implement hw_scan only support a
single virtual interface, but that may change
and then we'd want to be ready.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/driver-ops.h | 5 | ||||
-rw-r--r-- | net/mac80211/driver-trace.h | 9 | ||||
-rw-r--r-- | net/mac80211/scan.c | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index d1f8a7c2225a..997008e236ff 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -154,14 +154,15 @@ static inline void drv_update_tkip_key(struct ieee80211_local *local, | |||
154 | } | 154 | } |
155 | 155 | ||
156 | static inline int drv_hw_scan(struct ieee80211_local *local, | 156 | static inline int drv_hw_scan(struct ieee80211_local *local, |
157 | struct ieee80211_sub_if_data *sdata, | ||
157 | struct cfg80211_scan_request *req) | 158 | struct cfg80211_scan_request *req) |
158 | { | 159 | { |
159 | int ret; | 160 | int ret; |
160 | 161 | ||
161 | might_sleep(); | 162 | might_sleep(); |
162 | 163 | ||
163 | ret = local->ops->hw_scan(&local->hw, req); | 164 | ret = local->ops->hw_scan(&local->hw, &sdata->vif, req); |
164 | trace_drv_hw_scan(local, req, ret); | 165 | trace_drv_hw_scan(local, sdata, req, ret); |
165 | return ret; | 166 | return ret; |
166 | } | 167 | } |
167 | 168 | ||
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h index e209cb82ff29..ce734b58d07a 100644 --- a/net/mac80211/driver-trace.h +++ b/net/mac80211/driver-trace.h | |||
@@ -363,23 +363,26 @@ TRACE_EVENT(drv_update_tkip_key, | |||
363 | 363 | ||
364 | TRACE_EVENT(drv_hw_scan, | 364 | TRACE_EVENT(drv_hw_scan, |
365 | TP_PROTO(struct ieee80211_local *local, | 365 | TP_PROTO(struct ieee80211_local *local, |
366 | struct ieee80211_sub_if_data *sdata, | ||
366 | struct cfg80211_scan_request *req, int ret), | 367 | struct cfg80211_scan_request *req, int ret), |
367 | 368 | ||
368 | TP_ARGS(local, req, ret), | 369 | TP_ARGS(local, sdata, req, ret), |
369 | 370 | ||
370 | TP_STRUCT__entry( | 371 | TP_STRUCT__entry( |
371 | LOCAL_ENTRY | 372 | LOCAL_ENTRY |
373 | VIF_ENTRY | ||
372 | __field(int, ret) | 374 | __field(int, ret) |
373 | ), | 375 | ), |
374 | 376 | ||
375 | TP_fast_assign( | 377 | TP_fast_assign( |
376 | LOCAL_ASSIGN; | 378 | LOCAL_ASSIGN; |
379 | VIF_ASSIGN; | ||
377 | __entry->ret = ret; | 380 | __entry->ret = ret; |
378 | ), | 381 | ), |
379 | 382 | ||
380 | TP_printk( | 383 | TP_printk( |
381 | LOCAL_PR_FMT " ret:%d", | 384 | LOCAL_PR_FMT VIF_PR_FMT " ret:%d", |
382 | LOCAL_PR_ARG, __entry->ret | 385 | LOCAL_PR_ARG,VIF_PR_ARG, __entry->ret |
383 | ) | 386 | ) |
384 | ); | 387 | ); |
385 | 388 | ||
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index eb86a5f6e645..2b1f1f3d6a58 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -410,7 +410,7 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
410 | 410 | ||
411 | if (local->ops->hw_scan) { | 411 | if (local->ops->hw_scan) { |
412 | WARN_ON(!ieee80211_prep_hw_scan(local)); | 412 | WARN_ON(!ieee80211_prep_hw_scan(local)); |
413 | rc = drv_hw_scan(local, local->hw_scan_req); | 413 | rc = drv_hw_scan(local, sdata, local->hw_scan_req); |
414 | } else | 414 | } else |
415 | rc = ieee80211_start_sw_scan(local); | 415 | rc = ieee80211_start_sw_scan(local); |
416 | 416 | ||
@@ -654,7 +654,7 @@ void ieee80211_scan_work(struct work_struct *work) | |||
654 | } | 654 | } |
655 | 655 | ||
656 | if (local->hw_scan_req) { | 656 | if (local->hw_scan_req) { |
657 | int rc = drv_hw_scan(local, local->hw_scan_req); | 657 | int rc = drv_hw_scan(local, sdata, local->hw_scan_req); |
658 | mutex_unlock(&local->scan_mtx); | 658 | mutex_unlock(&local->scan_mtx); |
659 | if (rc) | 659 | if (rc) |
660 | ieee80211_scan_completed(&local->hw, true); | 660 | ieee80211_scan_completed(&local->hw, true); |