#include "osdep_service.h"
#include "drv_types.h"
#include "mlme_osdep.h"
+#include "rtl871x_security.h"
static void sitesurvey_ctrl_handler(struct timer_list *t)
{
r8712_indicate_wx_disassoc_event(adapter);
netif_carrier_off(adapter->pnetdev);
- if (adapter->securitypriv.auth_algorithm == 2) { /*/802.1x*/
+ if (adapter->securitypriv.auth_algorithm == _AUTH_8021x_) {
/* We have to backup the PMK information for WiFi PMK Caching
* test item. Backup the btkip_countermeasure information.
* When the countermeasure is trigger, the driver have to
} else { /*reset values in securitypriv*/
struct security_priv *sec_priv = &adapter->securitypriv;
- sec_priv->auth_algorithm = 0; /*open system*/
+ sec_priv->auth_algorithm = _AUTH_OPEN_SYSTEM_;
sec_priv->privacy_algorithm = _NO_PRIVACY_;
sec_priv->PrivacyKeyIndex = 0;
sec_priv->XGrpPrivacy = _NO_PRIVACY_;
#include "rtl871x_ioctl.h"
#include "rtl871x_ioctl_set.h"
#include "rtl871x_mp_ioctl.h"
+#include "rtl871x_security.h"
#include "mlme_osdep.h"
#include <linux/wireless.h>
#include <linux/module.h>
Ndis802_11Encryption1Enabled;
padapter->securitypriv.ndisauthtype =
Ndis802_11AuthModeAutoSwitch;
- padapter->securitypriv.auth_algorithm = 3;
+ padapter->securitypriv.auth_algorithm = _AUTH_AUTHSWITCH_;
} else if (value & AUTH_ALG_SHARED_KEY) {
padapter->securitypriv.ndisencryptstatus =
Ndis802_11Encryption1Enabled;
padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeShared;
- padapter->securitypriv.auth_algorithm = 1;
+ padapter->securitypriv.auth_algorithm = _AUTH_SHARED_SYSTEM_;
} else if (value & AUTH_ALG_OPEN_SYSTEM) {
if (padapter->securitypriv.ndisauthtype <
Ndis802_11AuthModeWPAPSK) {
padapter->securitypriv.ndisauthtype =
Ndis802_11AuthModeOpen;
- padapter->securitypriv.auth_algorithm = 0;
+ padapter->securitypriv.auth_algorithm = _AUTH_OPEN_SYSTEM_;
}
} else {
ret = -EINVAL;
}
goto exit;
}
- if (padapter->securitypriv.auth_algorithm == 2) { /* 802_1x */
+ if (padapter->securitypriv.auth_algorithm == _AUTH_8021x_) {
struct sta_info *psta, *pbcmc_sta;
struct sta_priv *pstapriv = &padapter->stapriv;
struct security_priv *spriv = &padapter->securitypriv;
}
if (r8712_parse_wpa_ie(buf, ielen, &group_cipher,
&pairwise_cipher) == 0) {
- padapter->securitypriv.auth_algorithm = 2;
+ padapter->securitypriv.auth_algorithm = _AUTH_8021x_;
padapter->securitypriv.ndisauthtype =
Ndis802_11AuthModeWPAPSK;
}
if (r8712_parse_wpa2_ie(buf, ielen, &group_cipher,
&pairwise_cipher) == 0) {
- padapter->securitypriv.auth_algorithm = 2;
+ padapter->securitypriv.auth_algorithm = _AUTH_8021x_;
padapter->securitypriv.ndisauthtype =
Ndis802_11AuthModeWPA2PSK;
}
Ndis802_11EncryptionDisabled;
padapter->securitypriv.privacy_algorithm = _NO_PRIVACY_;
padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
- padapter->securitypriv.auth_algorithm = 0; /* open system */
+ padapter->securitypriv.auth_algorithm = _AUTH_OPEN_SYSTEM_;
authmode = Ndis802_11AuthModeOpen;
padapter->securitypriv.ndisauthtype = authmode;
return 0;
netdev_info(dev, "r8712u: %s: IW_ENCODE_OPEN\n", __func__);
padapter->securitypriv.ndisencryptstatus =
Ndis802_11Encryption1Enabled;
- padapter->securitypriv.auth_algorithm = 0; /* open system */
+ padapter->securitypriv.auth_algorithm = _AUTH_OPEN_SYSTEM_;
padapter->securitypriv.privacy_algorithm = _NO_PRIVACY_;
padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
authmode = Ndis802_11AuthModeOpen;
"r8712u: %s: IW_ENCODE_RESTRICTED\n", __func__);
padapter->securitypriv.ndisencryptstatus =
Ndis802_11Encryption1Enabled;
- padapter->securitypriv.auth_algorithm = 1; /* shared system */
+ padapter->securitypriv.auth_algorithm = _AUTH_SHARED_SYSTEM_;
padapter->securitypriv.privacy_algorithm = _WEP40_;
padapter->securitypriv.XGrpPrivacy = _WEP40_;
authmode = Ndis802_11AuthModeShared;
} else {
padapter->securitypriv.ndisencryptstatus =
Ndis802_11Encryption1Enabled;
- padapter->securitypriv.auth_algorithm = 0; /* open system */
+ padapter->securitypriv.auth_algorithm = _AUTH_OPEN_SYSTEM_;
padapter->securitypriv.privacy_algorithm = _NO_PRIVACY_;
padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
authmode = Ndis802_11AuthModeOpen;
_NO_PRIVACY_;
padapter->securitypriv.XGrpPrivacy =
_NO_PRIVACY_;
- padapter->securitypriv.auth_algorithm = 0;
+ padapter->securitypriv.auth_algorithm = _AUTH_OPEN_SYSTEM_;
padapter->securitypriv.ndisauthtype =
Ndis802_11AuthModeOpen;
}
switch (name) {
case IEEE_PARAM_WPA_ENABLED:
- padapter->securitypriv.auth_algorithm = 2; /* 802.1x */
+ padapter->securitypriv.auth_algorithm = _AUTH_8021x_;
switch ((value) & 0xff) {
case 1: /* WPA */
padapter->securitypriv.ndisauthtype =
#include "recv_osdep.h"
#include "xmit_osdep.h"
#include "mlme_osdep.h"
+#include "rtl871x_security.h"
#include "sta_info.h"
#include "wifi.h"
#include "wlan_bssdef.h"
ptarget_sta->aid = pnetwork->join_res;
ptarget_sta->qos_option = 1;
ptarget_sta->mac_id = 5;
- if (adapter->securitypriv.auth_algorithm == 2) {
+ if (adapter->securitypriv.auth_algorithm == _AUTH_8021x_) {
adapter->securitypriv.binstallGrpkey = false;
adapter->securitypriv.busetkipkey = false;
adapter->securitypriv.bgrpkey_handshake = false;
psta->mac_id = le32_to_cpu(pstassoc->cam_id);
/* psta->aid = (uint)pstassoc->cam_id; */
- if (adapter->securitypriv.auth_algorithm == 2)
+ if (adapter->securitypriv.auth_algorithm == _AUTH_8021x_)
psta->XPrivacy = adapter->securitypriv.privacy_algorithm;
psta->ieee8021x_blocked = false;
spin_lock_irqsave(&pmlmepriv->lock, irqL);
ret = -ENOMEM;
goto err_free_cmd;
}
- if (psecuritypriv->auth_algorithm == 2) { /* 802.1X */
+ if (psecuritypriv->auth_algorithm == _AUTH_8021x_) {
psetkeyparm->algorithm =
(u8)psecuritypriv->XGrpPrivacy;
} else { /* WEP */