aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmdresp.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/cmdresp.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/cmdresp.c')
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 45459d4ba684..6bf50c1eeb93 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -67,25 +67,19 @@ void libertas_mac_event_disconnected(wlan_private * priv)
67 lbs_deb_cmd("Previous SSID=%s, ssid length=%u\n", 67 lbs_deb_cmd("Previous SSID=%s, ssid length=%u\n",
68 adapter->previousssid.ssid, adapter->previousssid.ssidlength); 68 adapter->previousssid.ssid, adapter->previousssid.ssidlength);
69 69
70 /* reset internal flags */
71 adapter->secinfo.WPAenabled = 0;
72 adapter->secinfo.WPA2enabled = 0;
73 adapter->wpa_ie_len = 0;
74
75 adapter->connect_status = libertas_disconnected; 70 adapter->connect_status = libertas_disconnected;
76 71
77 /* 72 /* Save previous SSID and BSSID for possible reassociation */
78 * memorize the previous SSID and BSSID
79 * it could be used for re-assoc
80 */
81 memcpy(&adapter->previousssid, 73 memcpy(&adapter->previousssid,
82 &adapter->curbssparams.ssid, sizeof(struct WLAN_802_11_SSID)); 74 &adapter->curbssparams.ssid, sizeof(struct WLAN_802_11_SSID));
83 memcpy(adapter->previousbssid, 75 memcpy(adapter->previousbssid,
84 adapter->curbssparams.bssid, ETH_ALEN); 76 adapter->curbssparams.bssid, ETH_ALEN);
85 77
86 /* need to erase the current SSID and BSSID info */ 78 /* Clear out associated SSID and BSSID since connection is
87 adapter->pattemptedbssdesc = NULL; 79 * no longer valid.
88 memset(&adapter->curbssparams, 0, sizeof(adapter->curbssparams)); 80 */
81 memset(&adapter->curbssparams.bssid, 0, ETH_ALEN);
82 memset(&adapter->curbssparams.ssid, 0, sizeof(struct WLAN_802_11_SSID));
89 83
90 if (adapter->psstate != PS_STATE_FULL_POWER) { 84 if (adapter->psstate != PS_STATE_FULL_POWER) {
91 /* make firmware to exit PS mode */ 85 /* make firmware to exit PS mode */