Updated to v4.3.8_12406.20140929

This commit is contained in:
CGarces
2017-05-11 20:35:20 +02:00
parent 1387cf623d
commit 9dde4572b4
229 changed files with 35553 additions and 24316 deletions

View File

@@ -44,6 +44,63 @@ const char *security_type_str(u8 value)
return NULL;
}
#ifdef DBG_SW_SEC_CNT
#define WEP_SW_ENC_CNT_INC(sec, ra) \
if (is_broadcast_mac_addr(ra)) \
sec->wep_sw_enc_cnt_bc++; \
else if (is_multicast_mac_addr(ra)) \
sec->wep_sw_enc_cnt_mc++; \
else \
sec->wep_sw_enc_cnt_uc++;
#define WEP_SW_DEC_CNT_INC(sec, ra) \
if (is_broadcast_mac_addr(ra)) \
sec->wep_sw_dec_cnt_bc++; \
else if (is_multicast_mac_addr(ra)) \
sec->wep_sw_dec_cnt_mc++; \
else \
sec->wep_sw_dec_cnt_uc++;
#define TKIP_SW_ENC_CNT_INC(sec, ra) \
if (is_broadcast_mac_addr(ra)) \
sec->tkip_sw_enc_cnt_bc++; \
else if (is_multicast_mac_addr(ra)) \
sec->tkip_sw_enc_cnt_mc++; \
else \
sec->tkip_sw_enc_cnt_uc++;
#define TKIP_SW_DEC_CNT_INC(sec, ra) \
if (is_broadcast_mac_addr(ra)) \
sec->tkip_sw_dec_cnt_bc++; \
else if (is_multicast_mac_addr(ra)) \
sec->tkip_sw_dec_cnt_mc++; \
else \
sec->tkip_sw_dec_cnt_uc++;
#define AES_SW_ENC_CNT_INC(sec, ra) \
if (is_broadcast_mac_addr(ra)) \
sec->aes_sw_enc_cnt_bc++; \
else if (is_multicast_mac_addr(ra)) \
sec->aes_sw_enc_cnt_mc++; \
else \
sec->aes_sw_enc_cnt_uc++;
#define AES_SW_DEC_CNT_INC(sec, ra) \
if (is_broadcast_mac_addr(ra)) \
sec->aes_sw_dec_cnt_bc++; \
else if (is_multicast_mac_addr(ra)) \
sec->aes_sw_dec_cnt_mc++; \
else \
sec->aes_sw_dec_cnt_uc++;
#else
#define WEP_SW_ENC_CNT_INC(sec, ra)
#define WEP_SW_DEC_CNT_INC(sec, ra)
#define TKIP_SW_ENC_CNT_INC(sec, ra)
#define TKIP_SW_DEC_CNT_INC(sec, ra)
#define AES_SW_ENC_CNT_INC(sec, ra)
#define AES_SW_DEC_CNT_INC(sec, ra)
#endif /* DBG_SW_SEC_CNT */
//=====WEP related=====
#define CRC32_POLY 0x04c11db7
@@ -251,7 +308,8 @@ _func_enter_;
}
}
WEP_SW_ENC_CNT_INC(psecuritypriv, pattrib->ra);
}
_func_exit_;
@@ -299,8 +357,9 @@ _func_enter_;
{
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("rtw_wep_decrypt:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
crc[3],payload[length-1],crc[2],payload[length-2],crc[1],payload[length-3],crc[0],payload[length-4]));
}
}
WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
}
_func_exit_;
@@ -775,7 +834,7 @@ _func_enter_;
}
}
TKIP_SW_ENC_CNT_INC(psecuritypriv,pattrib->ra);
}
/*
else{
@@ -867,7 +926,6 @@ _func_enter_;
}
else
{
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("rtw_tkip_decrypt: stainfo!=NULL!!!\n"));
prwskey=&stainfo->dot118021x_UncstKey.skey[0];
prwskeylen=16;
}
@@ -897,8 +955,8 @@ _func_enter_;
crc[3],payload[length-1],crc[2],payload[length-2],crc[1],payload[length-3],crc[0],payload[length-4]));
res=_FAIL;
}
TKIP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
}
else{
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("rtw_tkip_decrypt: stainfo==NULL!!!\n"));
@@ -1706,7 +1764,7 @@ _func_enter_;
}
}
AES_SW_ENC_CNT_INC(psecuritypriv, pattrib->ra);
}
/*
else{
@@ -1714,7 +1772,7 @@ _func_enter_;
DBG_871X("%s, psta==NUL\n", __func__);
res=_FAIL;
}
*/
*/
}
@@ -2031,7 +2089,6 @@ _func_enter_;
static u32 no_gkey_bc_cnt = 0;
static u32 no_gkey_mc_cnt = 0;
//in concurrent we should use sw descrypt in group key, so we remove this message
//DBG_871X("rx bc/mc packets, to perform sw rtw_aes_decrypt\n");
//prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
if(psecuritypriv->binstallGrpkey==_FALSE)
@@ -2107,10 +2164,10 @@ _func_enter_;
res= aes_decipher(prwskey,prxattrib->hdrlen,pframe, length);
AES_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
}
else{
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("rtw_aes_encrypt: stainfo==NULL!!!\n"));
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("rtw_aes_decrypt: stainfo==NULL!!!\n"));
res=_FAIL;
}
@@ -3141,9 +3198,9 @@ void rtw_sec_restore_wep_key(_adapter *adapter)
for(keyid=0;keyid<4;keyid++){
if(securitypriv->key_mask & BIT(keyid)){
if(keyid == securitypriv->dot11PrivacyKeyIndex)
rtw_set_key(adapter,securitypriv, keyid, 1, _TRUE);
rtw_set_key(adapter,securitypriv, keyid, 1, _FALSE);
else
rtw_set_key(adapter,securitypriv, keyid, 0, _TRUE);
rtw_set_key(adapter,securitypriv, keyid, 0, _FALSE);
}
}
}