aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/assoc.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-18 00:47:17 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:50 -0500
commit4f59abf190b15350167bec5382dda205030ac9d0 (patch)
treecf9b66dfceafa12202b9db1d5d426b922d107d9c /drivers/net/wireless/libertas/assoc.c
parentf70dd4515a8ad9c9d59ebb8c1d1fa2c610fb4020 (diff)
libertas: convert ENABLE_RSN to a direct command
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r--drivers/net/wireless/libertas/assoc.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index e91cd6724de7..c622e9b63cd1 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -305,8 +305,8 @@ static int assoc_helper_secinfo(struct lbs_private *priv,
305 struct assoc_request * assoc_req) 305 struct assoc_request * assoc_req)
306{ 306{
307 int ret = 0; 307 int ret = 0;
308 u32 do_wpa; 308 uint16_t do_wpa;
309 u32 rsn = 0; 309 uint16_t rsn = 0;
310 310
311 lbs_deb_enter(LBS_DEB_ASSOC); 311 lbs_deb_enter(LBS_DEB_ASSOC);
312 312
@@ -323,28 +323,19 @@ static int assoc_helper_secinfo(struct lbs_private *priv,
323 */ 323 */
324 324
325 /* Get RSN enabled/disabled */ 325 /* Get RSN enabled/disabled */
326 ret = lbs_prepare_and_send_command(priv, 326 ret = lbs_cmd_802_11_enable_rsn(priv, CMD_ACT_GET, &rsn);
327 CMD_802_11_ENABLE_RSN,
328 CMD_ACT_GET,
329 CMD_OPTION_WAITFORRSP,
330 0, &rsn);
331 if (ret) { 327 if (ret) {
332 lbs_deb_assoc("Failed to get RSN status: %d\n", ret); 328 lbs_deb_assoc("Failed to get RSN status: %d\n", ret);
333 goto out; 329 goto out;
334 } 330 }
335 331
336 /* Don't re-enable RSN if it's already enabled */ 332 /* Don't re-enable RSN if it's already enabled */
337 do_wpa = (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled); 333 do_wpa = assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled;
338 if (do_wpa == rsn) 334 if (do_wpa == rsn)
339 goto out; 335 goto out;
340 336
341 /* Set RSN enabled/disabled */ 337 /* Set RSN enabled/disabled */
342 rsn = do_wpa; 338 ret = lbs_cmd_802_11_enable_rsn(priv, CMD_ACT_SET, &do_wpa);
343 ret = lbs_prepare_and_send_command(priv,
344 CMD_802_11_ENABLE_RSN,
345 CMD_ACT_SET,
346 CMD_OPTION_WAITFORRSP,
347 0, &rsn);
348 339
349out: 340out:
350 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret); 341 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);