rtl8188eu: Remove CONFIG_WAPI_SUPPORT

This symbol is not defined.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-03-02 11:12:58 -06:00
parent 1d52d1060a
commit 4b61fd5bf7
17 changed files with 7 additions and 591 deletions

View file

@ -21,7 +21,6 @@ CONFIG_USB_HCI = y
CONFIG_POWER_SAVING = y CONFIG_POWER_SAVING = y
CONFIG_USB_AUTOSUSPEND = n CONFIG_USB_AUTOSUSPEND = n
CONFIG_BT_COEXIST = n CONFIG_BT_COEXIST = n
CONFIG_WAPI_SUPPORT = n
CONFIG_EFUSE_CONFIG_FILE = n CONFIG_EFUSE_CONFIG_FILE = n
CONFIG_EXT_CLK = n CONFIG_EXT_CLK = n
CONFIG_WOWLAN = n CONFIG_WOWLAN = n
@ -103,14 +102,6 @@ ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
endif endif
ifeq ($(CONFIG_RTL8192CU_REDEFINE_1X1), y)
EXTRA_CFLAGS += -DRTL8192C_RECONFIG_TO_1T1R
endif
ifeq ($(CONFIG_WAPI_SUPPORT), y)
EXTRA_CFLAGS += -DCONFIG_WAPI_SUPPORT
endif
ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y) ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE
endif endif
@ -179,9 +170,6 @@ rtk_core := core/rtw_cmd.o \
8188eu-y += $(rtk_core) 8188eu-y += $(rtk_core)
8188eu-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \
core/rtw_wapi_sms4.o
8188eu-y += core/rtw_efuse.o 8188eu-y += core/rtw_efuse.o
8188eu-y += $(_HAL_INTFS_FILES) 8188eu-y += $(_HAL_INTFS_FILES)

View file

@ -746,61 +746,14 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
} }
return ret; return ret;
} }
#ifdef CONFIG_WAPI_SUPPORT
int rtw_get_wapi_ie(u8 *in_ie,uint in_len,u8 *wapi_ie,u16 *wapi_len)
{
u8 authmode, i;
uint cnt;
u8 wapi_oui1[4]={0x0,0x14,0x72,0x01};
u8 wapi_oui2[4]={0x0,0x14,0x72,0x02};
;
cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
while(cnt<in_len)
{
authmode=in_ie[cnt];
/* if(authmode==_WAPI_IE_) */
if(authmode==_WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt+6], wapi_oui1,4)==true ||
_rtw_memcmp(&in_ie[cnt+6], wapi_oui2,4)==true))
{
if (wapi_ie) {
memcpy(wapi_ie, &in_ie[cnt],in_ie[cnt+1]+2);
for(i=0;i<(in_ie[cnt+1]+2);i=i+8){
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n %2x,%2x,%2x,%2x,%2x,%2x,%2x,%2x\n",
wapi_ie[i],wapi_ie[i+1],wapi_ie[i+2],wapi_ie[i+3],wapi_ie[i+4],
wapi_ie[i+5],wapi_ie[i+6],wapi_ie[i+7]));
}
}
*wapi_len=in_ie[cnt+1]+2;
cnt+=in_ie[cnt+1]+2; /* get next */
}
else
{
cnt+=in_ie[cnt+1]+2; /* get next */
}
}
return *wapi_len;
;
}
#endif
int rtw_get_sec_ie(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len) int rtw_get_sec_ie(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len)
{ {
u8 authmode, sec_idx, i; u8 authmode, sec_idx, i;
u8 wpa_oui[4]={0x0,0x50,0xf2,0x01}; u8 wpa_oui[4]={0x0,0x50,0xf2,0x01};
uint cnt; uint cnt;
;
/* Search required WPA or WPA2 IE and copy to sec_ie[ ] */ /* Search required WPA or WPA2 IE and copy to sec_ie[ ] */
cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_); cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);

View file

@ -657,11 +657,6 @@ u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, NDIS_802_11_AUTH
if(psecuritypriv->ndisauthtype>3) if(psecuritypriv->ndisauthtype>3)
psecuritypriv->dot11AuthAlgrthm=dot11AuthAlgrthm_8021X; psecuritypriv->dot11AuthAlgrthm=dot11AuthAlgrthm_8021X;
#ifdef CONFIG_WAPI_SUPPORT
if(psecuritypriv->ndisauthtype == 6)
psecuritypriv->dot11AuthAlgrthm=dot11AuthAlgrthm_WAPI;
#endif
res=rtw_set_auth(padapter,psecuritypriv); res=rtw_set_auth(padapter,psecuritypriv);
if(res==_SUCCESS) if(res==_SUCCESS)
@ -669,8 +664,6 @@ u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, NDIS_802_11_AUTH
else else
ret=false; ret=false;
;
return ret; return ret;
} }

View file

@ -1397,19 +1397,6 @@ void rtw_indicate_disconnect( struct adapter *padapter )
if(rtw_to_roaming(padapter) > 0) if(rtw_to_roaming(padapter) > 0)
_clr_fwstate_(pmlmepriv, _FW_LINKED); _clr_fwstate_(pmlmepriv, _FW_LINKED);
#ifdef CONFIG_WAPI_SUPPORT
psta = rtw_get_stainfo(pstapriv,cur_network->MacAddress);
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
{
rtw_wapi_return_one_sta_info(padapter, psta->hwaddr);
}
else if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) ||
check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
{
rtw_wapi_return_all_sta_info(padapter);
}
#endif
if(check_fwstate(&padapter->mlmepriv, _FW_LINKED) if(check_fwstate(&padapter->mlmepriv, _FW_LINKED)
|| (rtw_to_roaming(padapter) <= 0) || (rtw_to_roaming(padapter) <= 0)
) )
@ -3191,10 +3178,6 @@ void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network)
pmlmepriv->assoc_by_bssid = false; pmlmepriv->assoc_by_bssid = false;
#ifdef CONFIG_WAPI_SUPPORT
rtw_wapi_return_all_sta_info(padapter);
#endif
while(1) { while(1) {
if( _SUCCESS==(do_join_r=rtw_do_join(padapter)) ) { if( _SUCCESS==(do_join_r=rtw_do_join(padapter)) ) {
break; break;

View file

@ -1990,7 +1990,7 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
{ {
WMM_param_handler(padapter, pIE); WMM_param_handler(padapter, pIE);
} }
#if defined(CONFIG_P2P) && defined(CONFIG_P2P) #if defined(CONFIG_P2P)
else if ( _rtw_memcmp(pIE->data, WFD_OUI, 4)) /* WFD */ else if ( _rtw_memcmp(pIE->data, WFD_OUI, 4)) /* WFD */
{ {
DBG_871X( "[%s] Found WFD IE\n", __FUNCTION__ ); DBG_871X( "[%s] Found WFD IE\n", __FUNCTION__ );
@ -1998,13 +1998,6 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
} }
#endif #endif
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case _WAPI_IE_:
pWapiIE = pIE;
break;
#endif
case _HT_CAPABILITY_IE_: /* HT caps */ case _HT_CAPABILITY_IE_: /* HT caps */
HT_caps_handler(padapter, pIE); HT_caps_handler(padapter, pIE);
break; break;
@ -2023,10 +2016,6 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
i += (pIE->Length + 2); i += (pIE->Length + 2);
} }
#ifdef CONFIG_WAPI_SUPPORT
rtw_wapi_on_assoc_ok(padapter, pIE);
#endif
pmlmeinfo->state &= (~WIFI_FW_ASSOC_STATE); pmlmeinfo->state &= (~WIFI_FW_ASSOC_STATE);
pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS; pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS;
@ -6949,15 +6938,7 @@ void issue_assocreq(struct adapter *padapter)
} }
if (pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_REALTEK) if (pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_REALTEK)
{
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 6 , REALTEK_96B_IE, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 6 , REALTEK_96B_IE, &(pattrib->pktlen));
}
#ifdef CONFIG_WAPI_SUPPORT
rtw_build_assoc_req_wapi_ie(padapter, pframe, pattrib);
#endif
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
@ -8654,13 +8635,6 @@ void start_clnt_join(struct adapter* padapter)
val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf; val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf;
#ifdef CONFIG_WAPI_SUPPORT
if (padapter->wapiInfo.bWapiEnable && pmlmeinfo->auth_algo == dot11AuthAlgrthm_WAPI)
{
/* Disable TxUseDefaultKey, RxUseDefaultKey, RxBroadcastUseDefaultKey. */
val8 = 0x4c;
}
#endif
rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8));
/* Because of AP's not receiving deauth before */ /* Because of AP's not receiving deauth before */
@ -10107,10 +10081,6 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
rtw_antenna_select_cmd(padapter, pparm->network.PhyInfo.Optimum_antenna, false); rtw_antenna_select_cmd(padapter, pparm->network.PhyInfo.Optimum_antenna, false);
#ifdef CONFIG_WAPI_SUPPORT
rtw_wapi_clear_all_cam_entry(padapter);
#endif
rtw_joinbss_reset(padapter); rtw_joinbss_reset(padapter);
pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20;

View file

@ -613,11 +613,6 @@ static union recv_frame *decryptor(struct adapter *padapter,union recv_frame *pr
case _AES_: case _AES_:
res = rtw_aes_decrypt(padapter, (u8 * )precv_frame); res = rtw_aes_decrypt(padapter, (u8 * )precv_frame);
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case _SMS4_:
rtw_sms4_decrypt(padapter, (u8 * )precv_frame);
break;
#endif
default: default:
break; break;
} }
@ -2021,16 +2016,6 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
struct tdls_info *ptdlsinfo = &adapter->tdlsinfo; struct tdls_info *ptdlsinfo = &adapter->tdlsinfo;
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
#ifdef CONFIG_WAPI_SUPPORT
PRT_WAPI_T pWapiInfo = &adapter->wapiInfo;
struct recv_frame_hdr *phdr = &precv_frame->u.hdr;
u8 wai_pkt = 0;
u16 sc;
u8 external_len = 0;
#endif
;
#ifdef CONFIG_AP_MODE #ifdef CONFIG_AP_MODE
if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) { if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
@ -2081,11 +2066,7 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
pattrib->mdata = GetMData(ptr); pattrib->mdata = GetMData(ptr);
pattrib->privacy = GetPrivacy(ptr); pattrib->privacy = GetPrivacy(ptr);
pattrib->order = GetOrder(ptr); pattrib->order = GetOrder(ptr);
#ifdef CONFIG_WAPI_SUPPORT
sc = (pattrib->seq_num<<4) | pattrib->frag_num;
#endif
#if 1 /* Dump rx packets */
{ {
u8 bDumpRxPkt; u8 bDumpRxPkt;
rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt)); rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
@ -2121,7 +2102,6 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
} }
} }
} }
#endif
switch (type) switch (type)
{ {
case WIFI_MGT_TYPE: /* mgnt */ case WIFI_MGT_TYPE: /* mgnt */
@ -2149,38 +2129,6 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
retval = _FAIL; /* only data frame return _SUCCESS */ retval = _FAIL; /* only data frame return _SUCCESS */
break; break;
case WIFI_DATA_TYPE: /* data */ case WIFI_DATA_TYPE: /* data */
#ifdef CONFIG_WAPI_SUPPORT
if(pattrib->qos)
external_len = 2;
else
external_len= 0;
wai_pkt = rtw_wapi_is_wai_packet(adapter,ptr);
phdr->bIsWaiPacket = wai_pkt;
if(wai_pkt !=0){
if(sc != adapter->wapiInfo.wapiSeqnumAndFragNum)
{
adapter->wapiInfo.wapiSeqnumAndFragNum = sc;
}
else
{
retval = _FAIL;
break;
}
}
else{
if(rtw_wapi_drop_for_key_absent(adapter,GetAddr2Ptr(ptr))){
retval=_FAIL;
WAPI_TRACE(WAPI_RX,"drop for key absent for rx \n");
break;
}
}
#endif
rtw_led_control(adapter, LED_CTL_RX); rtw_led_control(adapter, LED_CTL_RX);
pattrib->qos = (subtype & BIT(7))? 1:0; pattrib->qos = (subtype & BIT(7))? 1:0;
retval = validate_recv_data_frame(adapter, precv_frame); retval = validate_recv_data_frame(adapter, precv_frame);
@ -3372,10 +3320,6 @@ static int recv_func_posthandle(struct adapter *padapter, union recv_frame *prfr
count_rx_stats(padapter, prframe, NULL); count_rx_stats(padapter, prframe, NULL);
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
#ifdef CONFIG_WAPI_SUPPORT
rtw_wapi_update_info(padapter, prframe);
#endif
ret = process_recv_indicatepkts(padapter, prframe); ret = process_recv_indicatepkts(padapter, prframe);
if (ret != _SUCCESS) if (ret != _SUCCESS)
{ {

View file

@ -124,11 +124,6 @@ static void sreset_restore_security_station(struct adapter *padapter)
if (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X) { if (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X) {
val8 = 0xcc; val8 = 0xcc;
#ifdef CONFIG_WAPI_SUPPORT
} else if (padapter->wapiInfo.bWapiEnable && pmlmeinfo->auth_algo == dot11AuthAlgrthm_WAPI) {
/* Disable TxUseDefaultKey, RxUseDefaultKey, RxBroadcastUseDefaultKey. */
val8 = 0x4c;
#endif
} else { } else {
val8 = 0xcf; val8 = 0xcf;
} }

View file

@ -684,14 +684,8 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
} }
/* If EAPOL , ARP , OR DHCP packet, driver must be in active mode. */ /* If EAPOL , ARP , OR DHCP packet, driver must be in active mode. */
#ifdef CONFIG_WAPI_SUPPORT
if ( (pattrib->ether_type == 0x88B4) || (pattrib->ether_type == 0x0806) || (pattrib->ether_type == 0x888e) || (pattrib->dhcp_pkt == 1) )
#else
if ( (pattrib->ether_type == 0x0806) || (pattrib->ether_type == 0x888e) || (pattrib->dhcp_pkt == 1) ) if ( (pattrib->ether_type == 0x0806) || (pattrib->ether_type == 0x888e) || (pattrib->dhcp_pkt == 1) )
#endif
{
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SPECIAL_PACKET, 1); rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SPECIAL_PACKET, 1);
}
bmcast = IS_MCAST(pattrib->ra); bmcast = IS_MCAST(pattrib->ra);
@ -776,11 +770,6 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
{ {
GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, bmcast); GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, bmcast);
#ifdef CONFIG_WAPI_SUPPORT
if(pattrib->ether_type == 0x88B4)
pattrib->encrypt=_NO_PRIVACY_;
#endif
switch(psecuritypriv->dot11AuthAlgrthm) switch(psecuritypriv->dot11AuthAlgrthm)
{ {
case dot11AuthAlgrthm_Open: case dot11AuthAlgrthm_Open:
@ -830,14 +819,6 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
pattrib->iv_len = 8; pattrib->iv_len = 8;
pattrib->icv_len = 8; pattrib->icv_len = 8;
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case _SMS4_:
pattrib->iv_len = 18;
pattrib->icv_len = 16;
break;
#endif
default: default:
pattrib->iv_len = 0; pattrib->iv_len = 0;
pattrib->icv_len = 0; pattrib->icv_len = 0;
@ -859,10 +840,6 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
pattrib->bswenc = false; pattrib->bswenc = false;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=false\n")); RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=false\n"));
} }
#ifdef CONFIG_WAPI_SUPPORT
if(pattrib->encrypt == _SMS4_)
pattrib->bswenc = false;
#endif
rtw_set_tx_chksum_offload(pkt, pattrib); rtw_set_tx_chksum_offload(pkt, pattrib);
update_attrib_phy_info(pattrib, psta); update_attrib_phy_info(pattrib, psta);
@ -1035,10 +1012,6 @@ static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmi
case _AES_: case _AES_:
rtw_aes_encrypt(padapter, (u8 * )pxmitframe); rtw_aes_encrypt(padapter, (u8 * )pxmitframe);
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case _SMS4_:
rtw_sms4_encrypt(padapter, (u8 * )pxmitframe);
#endif
default: default:
break; break;
} }
@ -1742,11 +1715,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_fram
else else
AES_IV(pattrib->iv, psta->dot11txpn, 0); AES_IV(pattrib->iv, psta->dot11txpn, 0);
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case _SMS4_:
rtw_wapi_get_iv(padapter,pattrib->ra,pattrib->iv);
break;
#endif
} }
} }
@ -3150,16 +3118,6 @@ s32 rtw_xmit(struct adapter *padapter, _pkt **ppkt)
res = update_attrib(padapter, *ppkt, &pxmitframe->attrib); res = update_attrib(padapter, *ppkt, &pxmitframe->attrib);
#ifdef CONFIG_WAPI_SUPPORT
if(pxmitframe->attrib.ether_type != 0x88B4)
{
if(rtw_wapi_drop_for_key_absent(padapter, pxmitframe->attrib.ra))
{
WAPI_TRACE(WAPI_RX,"drop for key absend when tx \n");
res = _FAIL;
}
}
#endif
if (res == _FAIL) { if (res == _FAIL) {
RT_TRACE(_module_xmit_osdep_c_, _drv_err_, ("rtw_xmit: update attrib fail\n")); RT_TRACE(_module_xmit_osdep_c_, _drv_err_, ("rtw_xmit: update attrib fail\n"));
#ifdef DBG_TX_DROP_FRAME #ifdef DBG_TX_DROP_FRAME

View file

@ -611,11 +611,6 @@ static void ConstructARPResponse(
case _AES_: case _AES_:
EncryptionHeadOverhead = 8; EncryptionHeadOverhead = 8;
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case _SMS4_:
EncryptionHeadOverhead = 18;
break;
#endif
default: default:
EncryptionHeadOverhead = 0; EncryptionHeadOverhead = 0;
} }
@ -864,13 +859,8 @@ static void SetFwRsvdPagePkt(struct adapter *padapter, BOOLEAN bDLFinished)
case _AES_: case _AES_:
ReservedPagePacket[BufIndex-TxDescLen+6] |= BIT(6)|BIT(7); ReservedPagePacket[BufIndex-TxDescLen+6] |= BIT(6)|BIT(7);
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case _SMS4_:
ReservedPagePacket[BufIndex-TxDescLen+6] |= BIT(7);
break;
#endif
default: default:
; break;
} }
PageNeed = (u8)PageNum_128(TxDescLen + ARPLegnth); PageNeed = (u8)PageNum_128(TxDescLen + ARPLegnth);

View file

@ -137,12 +137,6 @@ static void fill_txdesc_sectype(struct pkt_attrib *pattrib, struct tx_desc *ptxd
ptxdesc->txdw1 |= cpu_to_le32((0x01<<SEC_TYPE_SHT)&0x00c00000); ptxdesc->txdw1 |= cpu_to_le32((0x01<<SEC_TYPE_SHT)&0x00c00000);
ptxdesc->txdw2 |= cpu_to_le32(0x7 << AMPDU_DENSITY_SHT); ptxdesc->txdw2 |= cpu_to_le32(0x7 << AMPDU_DENSITY_SHT);
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case _SMS4_:
ptxdesc->txdw1 |= cpu_to_le32((0x02<<SEC_TYPE_SHT)&0x00c00000);
ptxdesc->txdw2 |= cpu_to_le32(0x7 << AMPDU_DENSITY_SHT);
break;
#endif
case _AES_: case _AES_:
ptxdesc->txdw1 |= cpu_to_le32((0x03<<SEC_TYPE_SHT)&0x00c00000); ptxdesc->txdw1 |= cpu_to_le32((0x03<<SEC_TYPE_SHT)&0x00c00000);
ptxdesc->txdw2 |= cpu_to_le32(0x7 << AMPDU_DENSITY_SHT); ptxdesc->txdw2 |= cpu_to_le32(0x7 << AMPDU_DENSITY_SHT);
@ -156,8 +150,6 @@ static void fill_txdesc_sectype(struct pkt_attrib *pattrib, struct tx_desc *ptxd
static void fill_txdesc_vcs(struct pkt_attrib *pattrib, __le32 *pdw) static void fill_txdesc_vcs(struct pkt_attrib *pattrib, __le32 *pdw)
{ {
/* DBG_8192C("cvs_mode=%d\n", pattrib->vcs_mode); */
switch(pattrib->vcs_mode) switch(pattrib->vcs_mode)
{ {
case RTS_CTS: case RTS_CTS:

View file

@ -67,10 +67,6 @@ enum _NIC_VERSION {
#include <rtw_ap.h> #include <rtw_ap.h>
#include <rtw_odm.h> #include <rtw_odm.h>
#ifdef CONFIG_WAPI_SUPPORT
#include <rtw_wapi.h>
#endif
#ifdef CONFIG_DRVEXT_MODULE #ifdef CONFIG_DRVEXT_MODULE
#include <drvext_api.h> #include <drvext_api.h>
#endif #endif
@ -381,13 +377,6 @@ struct adapter {
#ifdef CONFIG_TDLS #ifdef CONFIG_TDLS
struct tdls_info tdlsinfo; struct tdls_info tdlsinfo;
#endif //CONFIG_TDLS #endif //CONFIG_TDLS
#ifdef CONFIG_WAPI_SUPPORT
u8 WapiSupport;
RT_WAPI_T wapiInfo;
#endif
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
struct wifi_display_info wfd_info; struct wifi_display_info wfd_info;
#endif //CONFIG_P2P #endif //CONFIG_P2P

View file

@ -378,31 +378,16 @@ struct recv_frame_hdr
//for A-MPDU Rx reordering buffer control //for A-MPDU Rx reordering buffer control
struct recv_reorder_ctrl *preorder_ctrl; struct recv_reorder_ctrl *preorder_ctrl;
#ifdef CONFIG_WAPI_SUPPORT
u8 UserPriority;
u8 WapiTempPN[16];
u8 WapiSrcAddr[6];
u8 bWapiCheckPNInDecrypt;
u8 bIsWaiPacket;
#endif
}; };
union recv_frame{ union recv_frame{
union{ union{
_list list; _list list;
struct recv_frame_hdr hdr; struct recv_frame_hdr hdr;
uint mem[RECVFRAME_HDR_ALIGN>>2]; uint mem[RECVFRAME_HDR_ALIGN>>2];
}u; }u;
//uint mem[MAX_RXSZ>>2];
}; };
extern union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue extern union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue
extern union recv_frame *rtw_alloc_recvframe (_queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue extern union recv_frame *rtw_alloc_recvframe (_queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue
extern void rtw_init_recvframe(union recv_frame *precvframe ,struct recv_priv *precvpriv); extern void rtw_init_recvframe(union recv_frame *precvframe ,struct recv_priv *precvpriv);

View file

@ -1071,19 +1071,4 @@ enum P2P_PS_MODE {
#define IP_MCAST_MAC(mac) ((mac[0]==0x01)&&(mac[1]==0x00)&&(mac[2]==0x5e)) #define IP_MCAST_MAC(mac) ((mac[0]==0x01)&&(mac[1]==0x00)&&(mac[2]==0x5e))
#define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff)) #define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff))
#ifdef CONFIG_WAPI_SUPPORT
#ifndef IW_AUTH_WAPI_VERSION_1
#define IW_AUTH_WAPI_VERSION_1 0x00000008
#endif
#ifndef IW_AUTH_KEY_MGMT_WAPI_PSK
#define IW_AUTH_KEY_MGMT_WAPI_PSK 0x04
#endif
#ifndef IW_AUTH_WAPI_ENABLED
#define IW_AUTH_WAPI_ENABLED 0x20
#endif
#ifndef IW_ENCODE_ALG_SM4
#define IW_ENCODE_ALG_SM4 0x20
#endif
#endif
#endif /* _WIFI_H_ */ #endif /* _WIFI_H_ */

View file

@ -37,30 +37,6 @@
#define RTW_CH_MAX_2G_CHANNEL 14 /* Max channel in 2G band */ #define RTW_CH_MAX_2G_CHANNEL 14 /* Max channel in 2G band */
#ifdef CONFIG_WAPI_SUPPORT
#ifndef WLAN_CIPHER_SUITE_SMS4
#define WLAN_CIPHER_SUITE_SMS4 0x00147201
#endif
#ifndef WLAN_AKM_SUITE_WAPI_PSK
#define WLAN_AKM_SUITE_WAPI_PSK 0x000FAC04
#endif
#ifndef WLAN_AKM_SUITE_WAPI_CERT
#define WLAN_AKM_SUITE_WAPI_CERT 0x000FAC12
#endif
#ifndef NL80211_WAPI_VERSION_1
#define NL80211_WAPI_VERSION_1 (1 << 2)
#endif
#endif
static const u32 rtw_cipher_suites[] = { static const u32 rtw_cipher_suites[] = {
WLAN_CIPHER_SUITE_WEP40, WLAN_CIPHER_SUITE_WEP40,
WLAN_CIPHER_SUITE_WEP104, WLAN_CIPHER_SUITE_WEP104,
@ -1235,14 +1211,9 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
goto exit; goto exit;
} }
} else { } else {
#ifdef CONFIG_WAPI_SUPPORT
if (strcmp(param->u.crypt.alg, "SMS4"))
#endif
{
ret = -EINVAL; ret = -EINVAL;
goto exit; goto exit;
} }
}
if (strcmp(param->u.crypt.alg, "WEP") == 0) if (strcmp(param->u.crypt.alg, "WEP") == 0)
{ {
@ -1402,79 +1373,10 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
} }
} }
#ifdef CONFIG_WAPI_SUPPORT
if (strcmp(param->u.crypt.alg, "SMS4") == 0)
{
PRT_WAPI_T pWapiInfo = &padapter->wapiInfo;
PRT_WAPI_STA_INFO pWapiSta;
u8 WapiASUEPNInitialValueSrc[16] = {0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C} ;
u8 WapiAEPNInitialValueSrc[16] = {0x37,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C} ;
u8 WapiAEMultiCastPNInitialValueSrc[16] = {0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C} ;
if(param->u.crypt.set_tx == 1)
{
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
if(_rtw_memcmp(pWapiSta->PeerMacAddr,param->sta_addr,6))
{
memcpy(pWapiSta->lastTxUnicastPN,WapiASUEPNInitialValueSrc,16);
pWapiSta->wapiUsk.bSet = true;
memcpy(pWapiSta->wapiUsk.dataKey,param->u.crypt.key,16);
memcpy(pWapiSta->wapiUsk.micKey,param->u.crypt.key+16,16);
pWapiSta->wapiUsk.keyId = param->u.crypt.idx ;
pWapiSta->wapiUsk.bTxEnable = true;
memcpy(pWapiSta->lastRxUnicastPNBEQueue,WapiAEPNInitialValueSrc,16);
memcpy(pWapiSta->lastRxUnicastPNBKQueue,WapiAEPNInitialValueSrc,16);
memcpy(pWapiSta->lastRxUnicastPNVIQueue,WapiAEPNInitialValueSrc,16);
memcpy(pWapiSta->lastRxUnicastPNVOQueue,WapiAEPNInitialValueSrc,16);
memcpy(pWapiSta->lastRxUnicastPN,WapiAEPNInitialValueSrc,16);
pWapiSta->wapiUskUpdate.bTxEnable = false;
pWapiSta->wapiUskUpdate.bSet = false;
if (psecuritypriv->sw_encrypt== false || psecuritypriv->sw_decrypt == false)
{
/* set unicast key for ASUE */
rtw_wapi_set_key(padapter, &pWapiSta->wapiUsk, pWapiSta, false, false);
}
}
}
}
else
{
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
if(_rtw_memcmp(pWapiSta->PeerMacAddr,get_bssid(pmlmepriv),6))
{
pWapiSta->wapiMsk.bSet = true;
memcpy(pWapiSta->wapiMsk.dataKey,param->u.crypt.key,16);
memcpy(pWapiSta->wapiMsk.micKey,param->u.crypt.key+16,16);
pWapiSta->wapiMsk.keyId = param->u.crypt.idx ;
pWapiSta->wapiMsk.bTxEnable = false;
if(!pWapiSta->bSetkeyOk)
pWapiSta->bSetkeyOk = true;
pWapiSta->bAuthenticateInProgress = false;
memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16);
if (psecuritypriv->sw_decrypt == false)
{
/* set rx broadcast key for ASUE */
rtw_wapi_set_key(padapter, &pWapiSta->wapiMsk, pWapiSta, true, false);
}
}
}
}
}
#endif
exit: exit:
DBG_8192C("%s, ret=%d\n", __func__, ret); DBG_8192C("%s, ret=%d\n", __func__, ret);
;
return ret; return ret;
} }
@ -1534,22 +1436,6 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
alg_name = "BIP"; alg_name = "BIP";
break; break;
#endif /* CONFIG_IEEE80211W */ #endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_WAPI_SUPPORT
case WLAN_CIPHER_SUITE_SMS4:
alg_name= "SMS4";
if(pairwise == NL80211_KEYTYPE_PAIRWISE) {
if (key_index != 0 && key_index != 1) {
ret = -ENOTSUPP;
goto addkey_end;
}
memcpy((void*)param->sta_addr, (void*)mac_addr, ETH_ALEN);
} else {
DBG_871X("mac_addr is null \n");
}
DBG_871X("rtw_wx_set_enc_ext: SMS4 case \n");
break;
#endif
default: default:
ret = -ENOTSUPP; ret = -ENOTSUPP;
goto addkey_end; goto addkey_end;
@ -2315,20 +2201,12 @@ static int rtw_cfg80211_set_auth_type(struct security_priv *psecuritypriv,
if(psecuritypriv->ndisauthtype>Ndis802_11AuthModeWPA) if(psecuritypriv->ndisauthtype>Ndis802_11AuthModeWPA)
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
#ifdef CONFIG_WAPI_SUPPORT
if(psecuritypriv->ndisauthtype == Ndis802_11AuthModeWAPI)
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_WAPI;
#endif
break; break;
case NL80211_AUTHTYPE_SHARED_KEY: case NL80211_AUTHTYPE_SHARED_KEY:
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Shared; psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Shared;
psecuritypriv->ndisencryptstatus = Ndis802_11Encryption1Enabled; psecuritypriv->ndisencryptstatus = Ndis802_11Encryption1Enabled;
break; break;
default: default:
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open; psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
@ -2359,12 +2237,6 @@ static int rtw_cfg80211_set_cipher(struct security_priv *psecuritypriv, u32 ciph
case IW_AUTH_CIPHER_NONE: case IW_AUTH_CIPHER_NONE:
*profile_cipher = _NO_PRIVACY_; *profile_cipher = _NO_PRIVACY_;
ndisencryptstatus = Ndis802_11EncryptionDisabled; ndisencryptstatus = Ndis802_11EncryptionDisabled;
#ifdef CONFIG_WAPI_SUPPORT
if(psecuritypriv->dot11PrivacyAlgrthm ==_SMS4_ )
{
*profile_cipher = _SMS4_;
}
#endif
break; break;
case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP40:
*profile_cipher = _WEP40_; *profile_cipher = _WEP40_;
@ -2382,12 +2254,6 @@ static int rtw_cfg80211_set_cipher(struct security_priv *psecuritypriv, u32 ciph
*profile_cipher = _AES_; *profile_cipher = _AES_;
ndisencryptstatus = Ndis802_11Encryption3Enabled; ndisencryptstatus = Ndis802_11Encryption3Enabled;
break; break;
#ifdef CONFIG_WAPI_SUPPORT
case WLAN_CIPHER_SUITE_SMS4:
*profile_cipher = _SMS4_;
ndisencryptstatus = Ndis802_11_EncrypteionWAPI;
break;
#endif
default: default:
DBG_8192C("Unsupported cipher: 0x%x\n", cipher); DBG_8192C("Unsupported cipher: 0x%x\n", cipher);
return -ENOTSUPP; return -ENOTSUPP;
@ -2413,18 +2279,7 @@ static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv, u32 key
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
else if (key_mgt == WLAN_AKM_SUITE_PSK) { else if (key_mgt == WLAN_AKM_SUITE_PSK) {
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
} } else {
#ifdef CONFIG_WAPI_SUPPORT
else if(key_mgt ==WLAN_AKM_SUITE_WAPI_PSK){
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_WAPI;
}
else if(key_mgt ==WLAN_AKM_SUITE_WAPI_CERT){
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_WAPI;
}
#endif
else {
DBG_8192C("Invalid key mgt: 0x%x\n", key_mgt); DBG_8192C("Invalid key mgt: 0x%x\n", key_mgt);
/* return -EINVAL; */ /* return -EINVAL; */
} }
@ -2815,31 +2670,12 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open; /* open system */ psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open; /* open system */
psecuritypriv->ndisauthtype = Ndis802_11AuthModeOpen; psecuritypriv->ndisauthtype = Ndis802_11AuthModeOpen;
#ifdef CONFIG_WAPI_SUPPORT
padapter->wapiInfo.bWapiEnable = false;
#endif
ret = rtw_cfg80211_set_wpa_version(psecuritypriv, sme->crypto.wpa_versions); ret = rtw_cfg80211_set_wpa_version(psecuritypriv, sme->crypto.wpa_versions);
if (ret < 0) if (ret < 0)
goto exit; goto exit;
#ifdef CONFIG_WAPI_SUPPORT
if(sme->crypto.wpa_versions & NL80211_WAPI_VERSION_1)
{
padapter->wapiInfo.bWapiEnable = true;
padapter->wapiInfo.extra_prefix_len = WAPI_EXT_LEN;
padapter->wapiInfo.extra_postfix_len = SMS4_MIC_LEN;
}
#endif
ret = rtw_cfg80211_set_auth_type(psecuritypriv, sme->auth_type); ret = rtw_cfg80211_set_auth_type(psecuritypriv, sme->auth_type);
#ifdef CONFIG_WAPI_SUPPORT
if(psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_WAPI)
padapter->mlmeextpriv.mlmext_info.auth_algo = psecuritypriv->dot11AuthAlgrthm;
#endif
if (ret < 0) if (ret < 0)
goto exit; goto exit;
@ -2927,15 +2763,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
goto exit; goto exit;
} }
#ifdef CONFIG_WAPI_SUPPORT
if(sme->crypto.akm_suites[0] ==WLAN_AKM_SUITE_WAPI_PSK){
padapter->wapiInfo.bWapiPSK = true;
}
else if(sme->crypto.akm_suites[0] ==WLAN_AKM_SUITE_WAPI_CERT){
padapter->wapiInfo.bWapiPSK = false;
}
#endif
authmode = psecuritypriv->ndisauthtype; authmode = psecuritypriv->ndisauthtype;
rtw_set_802_11_authentication_mode(padapter, authmode); rtw_set_802_11_authentication_mode(padapter, authmode);

View file

@ -529,48 +529,6 @@ static char *translate_scan(struct adapter *padapter,
} }
} }
#ifdef CONFIG_WAPI_SUPPORT
{
sint out_len_wapi=0;
/* here use static for stack size */
static u8 buf_wapi[MAX_WAPI_IE_LEN];
static u8 wapi_ie[MAX_WAPI_IE_LEN];
u16 wapi_len=0;
u16 i;
memset(buf_wapi, 0, MAX_WAPI_IE_LEN);
memset(wapi_ie, 0, MAX_WAPI_IE_LEN);
out_len_wapi=rtw_get_wapi_ie(pnetwork->network.IEs ,pnetwork->network.IELength,wapi_ie,&wapi_len);
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: ssid=%s\n",pnetwork->network.Ssid.Ssid));
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: wapi_len=%d \n",wapi_len));
DBG_871X("rtw_wx_get_scan: %s ",pnetwork->network.Ssid.Ssid);
DBG_871X("rtw_wx_get_scan: ssid = %d ",wapi_len);
if (wapi_len > 0)
{
p=buf_wapi;
memset(buf_wapi, 0, MAX_WAPI_IE_LEN);
p += sprintf(p, "wapi_ie=");
for (i = 0; i < wapi_len; i++) {
p += sprintf(p, "%02x", wapi_ie[i]);
}
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
iwe.u.data.length = strlen(buf_wapi);
start = iwe_stream_add_point(info, start, stop, &iwe,buf_wapi);
memset(&iwe, 0, sizeof(iwe));
iwe.cmd =IWEVGENIE;
iwe.u.data.length = wapi_len;
start = iwe_stream_add_point(info, start, stop, &iwe, wapi_ie);
}
}
#endif /* CONFIG_WAPI_SUPPORT */
{ {
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
u8 ss, sq; u8 ss, sq;
@ -724,20 +682,12 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
ret = -EINVAL; ret = -EINVAL;
goto exit; goto exit;
} }
} } else {
else
{
#ifdef CONFIG_WAPI_SUPPORT
if (strcmp(param->u.crypt.alg, "SMS4"))
#endif
{
ret = -EINVAL; ret = -EINVAL;
goto exit; goto exit;
} }
}
if (strcmp(param->u.crypt.alg, "WEP") == 0) if (strcmp(param->u.crypt.alg, "WEP") == 0) {
{
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("wpa_set_encryption, crypt.alg = WEP\n")); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("wpa_set_encryption, crypt.alg = WEP\n"));
DBG_871X("wpa_set_encryption, crypt.alg = WEP\n"); DBG_871X("wpa_set_encryption, crypt.alg = WEP\n");
@ -909,70 +859,6 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
} }
} }
#ifdef CONFIG_WAPI_SUPPORT
if (strcmp(param->u.crypt.alg, "SMS4") == 0)
{
PRT_WAPI_T pWapiInfo = &padapter->wapiInfo;
PRT_WAPI_STA_INFO pWapiSta;
u8 WapiASUEPNInitialValueSrc[16] = {0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C} ;
u8 WapiAEPNInitialValueSrc[16] = {0x37,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C} ;
u8 WapiAEMultiCastPNInitialValueSrc[16] = {0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C,0x36,0x5C} ;
if(param->u.crypt.set_tx == 1)
{
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
if(_rtw_memcmp(pWapiSta->PeerMacAddr,param->sta_addr,6))
{
memcpy(pWapiSta->lastTxUnicastPN,WapiASUEPNInitialValueSrc,16);
pWapiSta->wapiUsk.bSet = true;
memcpy(pWapiSta->wapiUsk.dataKey,param->u.crypt.key,16);
memcpy(pWapiSta->wapiUsk.micKey,param->u.crypt.key+16,16);
pWapiSta->wapiUsk.keyId = param->u.crypt.idx ;
pWapiSta->wapiUsk.bTxEnable = true;
memcpy(pWapiSta->lastRxUnicastPNBEQueue,WapiAEPNInitialValueSrc,16);
memcpy(pWapiSta->lastRxUnicastPNBKQueue,WapiAEPNInitialValueSrc,16);
memcpy(pWapiSta->lastRxUnicastPNVIQueue,WapiAEPNInitialValueSrc,16);
memcpy(pWapiSta->lastRxUnicastPNVOQueue,WapiAEPNInitialValueSrc,16);
memcpy(pWapiSta->lastRxUnicastPN,WapiAEPNInitialValueSrc,16);
pWapiSta->wapiUskUpdate.bTxEnable = false;
pWapiSta->wapiUskUpdate.bSet = false;
if (psecuritypriv->sw_encrypt== false || psecuritypriv->sw_decrypt == false)
{
/* set unicast key for ASUE */
rtw_wapi_set_key(padapter, &pWapiSta->wapiUsk, pWapiSta, false, false);
}
}
}
} else {
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
if(_rtw_memcmp(pWapiSta->PeerMacAddr,get_bssid(pmlmepriv),6))
{
pWapiSta->wapiMsk.bSet = true;
memcpy(pWapiSta->wapiMsk.dataKey,param->u.crypt.key,16);
memcpy(pWapiSta->wapiMsk.micKey,param->u.crypt.key+16,16);
pWapiSta->wapiMsk.keyId = param->u.crypt.idx ;
pWapiSta->wapiMsk.bTxEnable = false;
if(!pWapiSta->bSetkeyOk)
pWapiSta->bSetkeyOk = true;
pWapiSta->bAuthenticateInProgress = false;
memcpy(pWapiSta->lastRxMulticastPN, WapiAEMultiCastPNInitialValueSrc, 16);
if (psecuritypriv->sw_decrypt == false)
{
/* set rx broadcast key for ASUE */
rtw_wapi_set_key(padapter, &pWapiSta->wapiMsk, pWapiSta, true, false);
}
}
}
}
}
#endif
exit: exit:
if (pwep) if (pwep)

View file

@ -943,11 +943,6 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
rtw_hal_sreset_init(padapter); rtw_hal_sreset_init(padapter);
#endif #endif
#ifdef CONFIG_WAPI_SUPPORT
padapter->WapiSupport = true; /* set true temp, will revise according to Efuse or Registry value later. */
rtw_wapi_init(padapter);
#endif
#ifdef CONFIG_BR_EXT #ifdef CONFIG_BR_EXT
_rtw_spinlock_init(&padapter->br_ext_lock); _rtw_spinlock_init(&padapter->br_ext_lock);
#endif /* CONFIG_BR_EXT */ #endif /* CONFIG_BR_EXT */
@ -1021,10 +1016,6 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
RT_TRACE(_module_os_intfs_c_,_drv_info_,("==>rtw_free_drv_sw")); RT_TRACE(_module_os_intfs_c_,_drv_info_,("==>rtw_free_drv_sw"));
#ifdef CONFIG_WAPI_SUPPORT
rtw_wapi_free(padapter);
#endif
/* we can call rtw_p2p_enable here, but: */ /* we can call rtw_p2p_enable here, but: */
/* 1. rtw_p2p_enable may have IO operation */ /* 1. rtw_p2p_enable may have IO operation */
/* 2. rtw_p2p_enable is bundled with wext interface */ /* 2. rtw_p2p_enable is bundled with wext interface */
@ -1526,15 +1517,10 @@ static int netdev_close(struct net_device *pnetdev)
wdev_to_priv(padapter->rtw_wdev)->bandroid_scan = false; wdev_to_priv(padapter->rtw_wdev)->bandroid_scan = false;
padapter->rtw_wdev->iftype = NL80211_IFTYPE_MONITOR; /* set this at the end */ padapter->rtw_wdev->iftype = NL80211_IFTYPE_MONITOR; /* set this at the end */
#ifdef CONFIG_WAPI_SUPPORT
rtw_wapi_disable_tx(padapter);
#endif
RT_TRACE(_module_os_intfs_c_,_drv_info_,("-871x_drv - drv_close\n")); RT_TRACE(_module_os_intfs_c_,_drv_info_,("-871x_drv - drv_close\n"));
DBG_871X("-871x_drv - drv_close, bup=%d\n", padapter->bup); DBG_871X("-871x_drv - drv_close, bup=%d\n", padapter->bup);
return 0; return 0;
} }
void rtw_ndev_destructor(struct net_device *ndev) void rtw_ndev_destructor(struct net_device *ndev)

View file

@ -217,14 +217,6 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame
} }
#endif #endif
#ifdef CONFIG_WAPI_SUPPORT
if (rtw_wapi_check_for_drop(padapter,precv_frame))
{
WAPI_TRACE(WAPI_ERR, "%s(): Rx Reorder Drop case!!\n", __FUNCTION__);
goto _recv_indicatepkt_drop;
}
#endif
skb = precv_frame->u.hdr.pkt; skb = precv_frame->u.hdr.pkt;
if(skb == NULL) if(skb == NULL)
{ {