aboutsummaryrefslogtreecommitdiff
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 11682cbe752..149531c7793 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,
void *pdata_buf)
{
wlan_adapter *adapter = priv->adapter;
- struct cmd_ds_802_11_authenticate *pauthenticate =
- &cmd->params.auth;
+ struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
+ int ret = -1;
u8 *bssid = pdata_buf;
cmd->command = cpu_to_le16(cmd_802_11_authenticate);
- cmd->size =
- cpu_to_le16(sizeof(struct cmd_ds_802_11_authenticate)
- + S_DS_GEN);
+ cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_authenticate)
+ + S_DS_GEN);
+
+ /* translate auth mode to 802.11 defined wire value */
+ switch (adapter->secinfo.auth_mode) {
+ case IW_AUTH_ALG_OPEN_SYSTEM:
+ pauthenticate->authtype = 0x00;
+ break;
+ case IW_AUTH_ALG_SHARED_KEY:
+ pauthenticate->authtype = 0x01;
+ break;
+ case IW_AUTH_ALG_LEAP:
+ pauthenticate->authtype = 0x80;
+ break;
+ default:
+ lbs_pr_debug(1, "AUTH_CMD: invalid auth alg 0x%X\n",
+ adapter->secinfo.auth_mode);
+ goto out;
+ }
- pauthenticate->authtype = adapter->secinfo.authmode;
memcpy(pauthenticate->macaddr, bssid, ETH_ALEN);
lbs_pr_debug(1, "AUTH_CMD: Bssid is : %x:%x:%x:%x:%x:%x\n",
bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], bssid[5]);
+ ret = 0;
- return 0;
+out:
+ return ret;
}
int libertas_cmd_80211_deauthenticate(wlan_private * priv,