aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/scan.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-25 17:09:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-06-11 14:28:42 -0400
commite76850d620a0a26fa807b4fa189c64a94789461e (patch)
treeca251090429ebfb75da58af966254d547ba703f6 /drivers/net/wireless/libertas/scan.c
parentef9a264b7a288a07c43ddb244c4f9ab0e8df90e4 (diff)
[PATCH] libertas: make association paths consistent
The BSS to associate with (in either Infrastructure or IBSS join operations) is now stored in _one_ place in the association request (the bss member), not two places as before (pattemptedbss and curbssparams->bssdescriptor). Association requests are passed to the necessary association functions to (a) give them access to the bss member and (b) ensure that association/join/start setup uses settings from the request, not the current adapter settings (which may not be valid for the requested settings). Because the 'bss' member of the association request is used now, the command return functions from associate and adhoc join/start need access to the in-progress association request to update curbssparams when everything is done. The association worker moves the request from pending to in-progress for the duration of the association attempt. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r--drivers/net/wireless/libertas/scan.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 437a1e98671..334da0c5c5a 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -235,24 +235,10 @@ static void wlan_scan_process_results(wlan_private * priv)
wlan_adapter *adapter = priv->adapter;
struct bss_descriptor * iter_bss;
- mutex_lock(&adapter->lock);
-
- if (adapter->connect_status != libertas_connected)
- goto debug_print;
-
- /* try to find the current BSSID in the scan list */
- list_for_each_entry (iter_bss, &adapter->network_list, list) {
- if (libertas_SSID_cmp(&iter_bss->ssid, &adapter->curbssparams.ssid))
- continue;
- if (memcmp(adapter->curbssparams.bssid, iter_bss->bssid, ETH_ALEN))
- continue;
- /* Make a copy of current BSSID descriptor */
- memcpy(&adapter->curbssparams.bssdescriptor, iter_bss,
- sizeof(struct bss_descriptor));
- break;
- }
+ if (adapter->connect_status == libertas_connected)
+ return;
-debug_print:
+ mutex_lock(&adapter->lock);
list_for_each_entry (iter_bss, &adapter->network_list, list) {
lbs_deb_scan("Scan:(%02d) " MAC_FMT ", RSSI[%03d], SSID[%s]\n",
i++,
@@ -260,7 +246,6 @@ debug_print:
iter_bss->bssid[3], iter_bss->bssid[4], iter_bss->bssid[5],
(s32) iter_bss->rssi, iter_bss->ssid.ssid);
}
-
mutex_unlock(&adapter->lock);
}