aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ibss.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/ibss.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/ibss.c')
-rw-r--r--net/mac80211/ibss.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index c585fced8584..ba752362b2b2 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -488,7 +488,9 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
488 printk(KERN_DEBUG "%s: No active IBSS STAs - trying to scan for other " 488 printk(KERN_DEBUG "%s: No active IBSS STAs - trying to scan for other "
489 "IBSS networks with same SSID (merge)\n", sdata->name); 489 "IBSS networks with same SSID (merge)\n", sdata->name);
490 490
491 ieee80211_request_internal_scan(sdata, ifibss->ssid, ifibss->ssid_len); 491 ieee80211_request_internal_scan(sdata,
492 ifibss->ssid, ifibss->ssid_len,
493 ifibss->fixed_channel ? ifibss->channel : NULL);
492} 494}
493 495
494static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) 496static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
@@ -595,8 +597,9 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
595 printk(KERN_DEBUG "%s: Trigger new scan to find an IBSS to " 597 printk(KERN_DEBUG "%s: Trigger new scan to find an IBSS to "
596 "join\n", sdata->name); 598 "join\n", sdata->name);
597 599
598 ieee80211_request_internal_scan(sdata, ifibss->ssid, 600 ieee80211_request_internal_scan(sdata,
599 ifibss->ssid_len); 601 ifibss->ssid, ifibss->ssid_len,
602 ifibss->fixed_channel ? ifibss->channel : NULL);
600 } else { 603 } else {
601 int interval = IEEE80211_SCAN_INTERVAL; 604 int interval = IEEE80211_SCAN_INTERVAL;
602 605