aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/join.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-10 22:56:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-05-11 14:54:54 -0400
commit6affe785aaf983253b27e71e67bf5fceaee6ff88 (patch)
treeeb4614822ddf8f3658d4e6716527af17a0031b24 /drivers/net/wireless/libertas/join.c
parent43631e15c1cd056a76272047c6ebe9edbaa06f25 (diff)
[PATCH] libertas: remove WLAN_802_11_AUTHENTICATION_MODE
Remove WLAN_802_11_AUTHENTICATION_MODE enum and use IW_AUTH_ALG_* instead. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/join.c')
-rw-r--r--drivers/net/wireless/libertas/join.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c
index 11682cbe752b..149531c77938 100644
--- a/drivers/net/wireless/libertas/join.c
+++ b/drivers/net/wireless/libertas/join.c
@@ -398,22 +398,39 @@ int libertas_cmd_80211_authenticate(wlan_private * priv,
398 void *pdata_buf) 398 void *pdata_buf)
399{ 399{
400 wlan_adapter *adapter = priv->adapter; 400 wlan_adapter *adapter = priv->adapter;
401 struct cmd_ds_802_11_authenticate *pauthenticate = 401 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
402 &cmd->params.auth; 402 int ret = -1;
403 u8 *bssid = pdata_buf; 403 u8 *bssid = pdata_buf;
404 404
405 cmd->command = cpu_to_le16(cmd_802_11_authenticate); 405 cmd->command = cpu_to_le16(cmd_802_11_authenticate);
406 cmd->size = 406 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_authenticate)
407 cpu_to_le16(sizeof(struct cmd_ds_802_11_authenticate) 407 + S_DS_GEN);
408 + S_DS_GEN); 408
409 /* translate auth mode to 802.11 defined wire value */
410 switch (adapter->secinfo.auth_mode) {
411 case IW_AUTH_ALG_OPEN_SYSTEM:
412 pauthenticate->authtype = 0x00;
413 break;
414 case IW_AUTH_ALG_SHARED_KEY:
415 pauthenticate->authtype = 0x01;
416 break;
417 case IW_AUTH_ALG_LEAP:
418 pauthenticate->authtype = 0x80;
419 break;
420 default:
421 lbs_pr_debug(1, "AUTH_CMD: invalid auth alg 0x%X\n",
422 adapter->secinfo.auth_mode);
423 goto out;
424 }
409 425
410 pauthenticate->authtype = adapter->secinfo.authmode;
411 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN); 426 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN);
412 427
413 lbs_pr_debug(1, "AUTH_CMD: Bssid is : %x:%x:%x:%x:%x:%x\n", 428 lbs_pr_debug(1, "AUTH_CMD: Bssid is : %x:%x:%x:%x:%x:%x\n",
414 bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]); 429 bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]);
430 ret = 0;
415 431
416 return 0; 432out:
433 return ret;
417} 434}
418 435
419int libertas_cmd_80211_deauthenticate(wlan_private * priv, 436int libertas_cmd_80211_deauthenticate(wlan_private * priv,