aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-05-03 02:49:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-05-03 14:53:10 -0400
commitbe4a4b6a5d2f76393f545a2545fbaa1b65577e13 (patch)
tree5456729061f295a1e7782766eb195707228475f8 /net/mac80211/main.c
parenta75b4363eaafa99d909da4f1192322a78b074c73 (diff)
mac80211: improve IBSS scanning
When IBSS is fixed to a frequency, it can still scan to try to find the right BSSID. This makes sense if the BSSID isn't also fixed, but it need not scan all channels -- just one is sufficient. Make it do that by moving the scan setup code to ieee80211_request_internal_scan() and include a channel variable setting. Note that this can be further improved to start the IBSS right away if both frequency and BSSID are fixed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index ebcca0eaf1dc..353b6b42d9c5 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -439,7 +439,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
439 struct ieee80211_local *local = hw_to_local(hw); 439 struct ieee80211_local *local = hw_to_local(hw);
440 int result; 440 int result;
441 enum ieee80211_band band; 441 enum ieee80211_band band;
442 int channels, i, j, max_bitrates; 442 int channels, max_bitrates;
443 bool supp_ht; 443 bool supp_ht;
444 static const u32 cipher_suites[] = { 444 static const u32 cipher_suites[] = {
445 WLAN_CIPHER_SUITE_WEP40, 445 WLAN_CIPHER_SUITE_WEP40,
@@ -605,21 +605,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
605 605
606 ieee80211_led_init(local); 606 ieee80211_led_init(local);
607 607
608 /* alloc internal scan request */
609 i = 0;
610 local->int_scan_req->ssids = &local->scan_ssid;
611 local->int_scan_req->n_ssids = 1;
612 for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
613 if (!hw->wiphy->bands[band])
614 continue;
615 for (j = 0; j < hw->wiphy->bands[band]->n_channels; j++) {
616 local->int_scan_req->channels[i] =
617 &hw->wiphy->bands[band]->channels[j];
618 i++;
619 }
620 }
621 local->int_scan_req->n_channels = i;
622
623 local->network_latency_notifier.notifier_call = 608 local->network_latency_notifier.notifier_call =
624 ieee80211_max_network_latency; 609 ieee80211_max_network_latency;
625 result = pm_qos_add_notifier(PM_QOS_NETWORK_LATENCY, 610 result = pm_qos_add_notifier(PM_QOS_NETWORK_LATENCY,