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>
This commit is contained in:
committed by
John W. Linville
parent
a75b4363ea
commit
be4a4b6a5d
@@ -488,7 +488,9 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
|
||||
printk(KERN_DEBUG "%s: No active IBSS STAs - trying to scan for other "
|
||||
"IBSS networks with same SSID (merge)\n", sdata->name);
|
||||
|
||||
ieee80211_request_internal_scan(sdata, ifibss->ssid, ifibss->ssid_len);
|
||||
ieee80211_request_internal_scan(sdata,
|
||||
ifibss->ssid, ifibss->ssid_len,
|
||||
ifibss->fixed_channel ? ifibss->channel : NULL);
|
||||
}
|
||||
|
||||
static 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)
|
||||
printk(KERN_DEBUG "%s: Trigger new scan to find an IBSS to "
|
||||
"join\n", sdata->name);
|
||||
|
||||
ieee80211_request_internal_scan(sdata, ifibss->ssid,
|
||||
ifibss->ssid_len);
|
||||
ieee80211_request_internal_scan(sdata,
|
||||
ifibss->ssid, ifibss->ssid_len,
|
||||
ifibss->fixed_channel ? ifibss->channel : NULL);
|
||||
} else {
|
||||
int interval = IEEE80211_SCAN_INTERVAL;
|
||||
|
||||
|
Reference in New Issue
Block a user