* scan. The cfg80211 does not give us the encryption
* mode at this stage so just setting it to WEP here.
*/
- wpa_enabled = 0;
- auth_type = MWIFIEX_AUTH_MODE_OPEN;
- ret = mwifiex_set_auth(priv,
- MWIFIEX_ENCRYPTION_MODE_WEP104,
- auth_type, wpa_enabled);
+ priv->sec_info.encryption_mode =
+ MWIFIEX_ENCRYPTION_MODE_WEP104;
+ priv->sec_info.authentication_mode =
+ MWIFIEX_AUTH_MODE_OPEN;
}
goto done;
if (sme->crypto.n_ciphers_pairwise) {
pairwise_encrypt_mode = mwifiex_get_mwifiex_cipher(sme->crypto.
ciphers_pairwise[0], &wpa_enabled);
- ret = mwifiex_set_auth(priv, pairwise_encrypt_mode, auth_type,
- wpa_enabled);
+ priv->sec_info.encryption_mode = pairwise_encrypt_mode;
+ priv->sec_info.authentication_mode = auth_type;
}
if (sme->crypto.cipher_group) {
group_encrypt_mode = mwifiex_get_mwifiex_cipher(sme->crypto.
cipher_group, &wpa_enabled);
- ret = mwifiex_set_auth(priv, group_encrypt_mode, auth_type,
- wpa_enabled);
+ priv->sec_info.encryption_mode = group_encrypt_mode;
+ priv->sec_info.authentication_mode = auth_type;
}
if (sme->ie)
ret = mwifiex_set_gen_ie(priv, sme->ie, sme->ie_len);
enum {
MWIFIEX_AUTH_MODE_OPEN = 0x00,
MWIFIEX_AUTH_MODE_SHARED = 0x01,
- MWIFIEX_AUTH_MODE_NETWORKEAP = 0x80,
- MWIFIEX_AUTH_MODE_AUTO = 0xFF,
};
enum {
dev_dbg(priv->adapter->dev, "info: ASSOC_CMD: rates size = %d\n",
rates_size);
- /* Add the Authentication type to be used for Auth frames if needed */
- if (priv->sec_info.authentication_mode != MWIFIEX_AUTH_MODE_AUTO) {
- auth_tlv = (struct mwifiex_ie_types_auth_type *) pos;
- auth_tlv->header.type = cpu_to_le16(TLV_TYPE_AUTH_TYPE);
- auth_tlv->header.len = cpu_to_le16(sizeof(auth_tlv->auth_type));
- if (priv->sec_info.wep_status == MWIFIEX_802_11_WEP_ENABLED)
- auth_tlv->auth_type = cpu_to_le16((u16) priv->sec_info.
- authentication_mode);
- else
- auth_tlv->auth_type =
- cpu_to_le16(MWIFIEX_AUTH_MODE_OPEN);
- pos += sizeof(auth_tlv->header) +
- le16_to_cpu(auth_tlv->header.len);
- }
+ /* Add the Authentication type to be used for Auth frames */
+ auth_tlv = (struct mwifiex_ie_types_auth_type *) pos;
+ auth_tlv->header.type = cpu_to_le16(TLV_TYPE_AUTH_TYPE);
+ auth_tlv->header.len = cpu_to_le16(sizeof(auth_tlv->auth_type));
+ if (priv->sec_info.wep_status == MWIFIEX_802_11_WEP_ENABLED)
+ auth_tlv->auth_type = cpu_to_le16(
+ (u16) priv->sec_info.authentication_mode);
+ else
+ auth_tlv->auth_type = cpu_to_le16(MWIFIEX_AUTH_MODE_OPEN);
+
+ pos += sizeof(auth_tlv->header) + le16_to_cpu(auth_tlv->header.len);
if (IS_SUPPORT_MULTI_BANDS(priv->adapter)
&& !(ISSUPP_11NENABLED(priv->adapter->fw_cap_info)
int mwifiex_get_scan_table(struct mwifiex_private *priv,
u8 wait_option,
struct mwifiex_scan_resp *scanresp);
-int mwifiex_get_auth_mode(struct mwifiex_private *priv,
- u8 wait_option, u32 *auth_mode);
-int mwifiex_get_encrypt_mode(struct mwifiex_private *priv,
- u8 wait_option,
- u32 *encrypt_mode);
int mwifiex_enable_wep_key(struct mwifiex_private *priv, u8 wait_option);
int mwifiex_find_best_bss(struct mwifiex_private *priv, u8 wait_option,
struct mwifiex_ssid_bssid *ssid_bssid);
int mwifiex_drv_change_adhoc_chan(struct mwifiex_private *priv, int channel);
-int mwifiex_set_auth(struct mwifiex_private *priv, int encrypt_mode,
- int auth_mode, int wpa_enabled);
-
int mwifiex_set_encode(struct mwifiex_private *priv, const u8 *key,
int key_len, u8 key_index, int disable);
return ret;
}
-/*
- * IOCTL request handler to set/get authentication mode.
- */
-static int mwifiex_set_auth_mode(struct mwifiex_private *priv, u32 auth_mode)
-{
- int ret = 0;
-
- priv->sec_info.authentication_mode = auth_mode;
- if (priv->sec_info.authentication_mode == MWIFIEX_AUTH_MODE_NETWORKEAP)
- ret = mwifiex_set_wpa_ie_helper(priv, NULL, 0);
-
- return ret;
-}
-
/*
* IOCTL request handler to set WEP network key.
*
return status;
}
-/*
- * Sends IOCTL request to set encryption mode.
- *
- * This function allocates the IOCTL request buffer, fills it
- * with requisite parameters and calls the IOCTL handler.
- */
-static int mwifiex_set_encrypt_mode(struct mwifiex_private *priv,
- u8 wait_option, u32 encrypt_mode)
-{
- priv->sec_info.encryption_mode = encrypt_mode;
- return 0;
-}
-
-/*
- * This function set the authentication parameters. It sets both encryption
- * mode and authentication mode, and also enables WPA if required.
- */
-int
-mwifiex_set_auth(struct mwifiex_private *priv, int encrypt_mode,
- int auth_mode, int wpa_enabled)
-{
- if (mwifiex_set_encrypt_mode(priv, MWIFIEX_IOCTL_WAIT, encrypt_mode))
- return -EFAULT;
-
- if (mwifiex_set_auth_mode(priv, auth_mode))
- return -EFAULT;
-
- return 0;
-}
-
/*
* Sends IOCTL request to set encoding parameters.
*