rtl8188eu: Remove dead code used for PLATFORM_WINDOWS, PLATFORM_OS_XP, and PLATFORM_OS_CE

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-10 20:46:15 -05:00
parent 285af1cf22
commit a3ca3380b5
36 changed files with 5 additions and 1748 deletions

View file

@ -127,15 +127,6 @@ _func_enter_;
pevtpriv->c2h_mem = pevtpriv->allocated_c2h_mem + 4\ pevtpriv->c2h_mem = pevtpriv->allocated_c2h_mem + 4\
- ( (u32)(pevtpriv->allocated_c2h_mem) & 3); - ( (u32)(pevtpriv->allocated_c2h_mem) & 3);
#ifdef PLATFORM_OS_XP
pevtpriv->pc2h_mdl= IoAllocateMdl((u8 *)pevtpriv->c2h_mem, C2H_MEM_SZ , false, false, NULL);
if (pevtpriv->pc2h_mdl == NULL){
res= _FAIL;
goto exit;
}
MmBuildMdlForNonPagedPool(pevtpriv->pc2h_mdl);
#endif
#endif /* end of CONFIG_SDIO_HCI */ #endif /* end of CONFIG_SDIO_HCI */
_rtw_init_queue(&(pevtpriv->evt_queue)); _rtw_init_queue(&(pevtpriv->evt_queue));

View file

@ -54,10 +54,6 @@ jackson@realtek.com.tw
#include <rtw_io.h> #include <rtw_io.h>
#include <osdep_intf.h> #include <osdep_intf.h>
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
#ifdef CONFIG_SDIO_HCI #ifdef CONFIG_SDIO_HCI
#include <sdio_ops.h> #include <sdio_ops.h>
#endif #endif

View file

@ -24,170 +24,3 @@
#include <drv_types.h> #include <drv_types.h>
#include <rtw_ioctl_query.h> #include <rtw_ioctl_query.h>
#include <wifi.h> #include <wifi.h>
#ifdef PLATFORM_WINDOWS
/* */
/* Added for WPA2-PSK, by Annie, 2005-09-20. */
/* */
u8
query_802_11_capability(
_adapter* Adapter,
u8* pucBuf,
u32 * pulOutLen
)
{
static NDIS_802_11_AUTHENTICATION_ENCRYPTION szAuthEnc[] =
{
{Ndis802_11AuthModeOpen, Ndis802_11EncryptionDisabled},
{Ndis802_11AuthModeOpen, Ndis802_11Encryption1Enabled},
{Ndis802_11AuthModeShared, Ndis802_11EncryptionDisabled},
{Ndis802_11AuthModeShared, Ndis802_11Encryption1Enabled},
{Ndis802_11AuthModeWPA, Ndis802_11Encryption2Enabled},
{Ndis802_11AuthModeWPA, Ndis802_11Encryption3Enabled},
{Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption2Enabled},
{Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption3Enabled},
{Ndis802_11AuthModeWPANone, Ndis802_11Encryption2Enabled},
{Ndis802_11AuthModeWPANone, Ndis802_11Encryption3Enabled},
{Ndis802_11AuthModeWPA2, Ndis802_11Encryption2Enabled},
{Ndis802_11AuthModeWPA2, Ndis802_11Encryption3Enabled},
{Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption2Enabled},
{Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption3Enabled}
};
static ULONG ulNumOfPairSupported = sizeof(szAuthEnc)/sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION);
NDIS_802_11_CAPABILITY * pCap = (NDIS_802_11_CAPABILITY *)pucBuf;
u8* pucAuthEncryptionSupported = (u8*) pCap->AuthenticationEncryptionSupported;
pCap->Length = sizeof(NDIS_802_11_CAPABILITY);
if (ulNumOfPairSupported > 1 )
pCap->Length += (ulNumOfPairSupported-1) * sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION);
pCap->Version = 2;
pCap->NoOfPMKIDs = NUM_PMKID_CACHE;
pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported;
if ( sizeof (szAuthEnc) <= 240 ) /* 240 = 256 - 4*4 SecurityInfo.szCapability: only 256 bytes in size. */
{
_rtw_memcpy( pucAuthEncryptionSupported, (u8*)szAuthEnc, sizeof (szAuthEnc) );
*pulOutLen = pCap->Length;
return true;
}
else
{
*pulOutLen = 0;
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("_query_802_11_capability(): szAuthEnc size is too large.\n"));
return false;
}
}
u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo)
{
struct wlan_network *tgt_network;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct security_priv *psecuritypriv=&(padapter->securitypriv);
WLAN_BSSID_EX *psecnetwork=(WLAN_BSSID_EX*)&(psecuritypriv->sec_bss);
u8 * pDest = (u8 *)pAssocInfo + sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
unsigned char i,*auth_ie,*supp_ie;
_rtw_memset(pAssocInfo, 0, sizeof(NDIS_802_11_ASSOCIATION_INFORMATION));
/* */
/* Association Request related information */
/* */
/* Req_1. AvailableRequestFixedIEs */
if (psecnetwork!=NULL){
pAssocInfo->AvailableRequestFixedIEs |= NDIS_802_11_AI_REQFI_CAPABILITIES|NDIS_802_11_AI_REQFI_CURRENTAPADDRESS;
pAssocInfo->RequestFixedIEs.Capabilities = (unsigned short)* & psecnetwork->IEs[10];
_rtw_memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress,
& psecnetwork->MacAddress, 6);
pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
if (check_fwstate( pmlmepriv, _FW_UNDER_LINKING|_FW_LINKED)==true)
{
if (psecuritypriv->ndisauthtype>=Ndis802_11AuthModeWPA2)
pDest[0] =48; /* RSN Information Element */
else
pDest[0] =221; /* WPA(SSN) Information Element */
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n Adapter->ndisauthtype==Ndis802_11AuthModeWPA)?0xdd:0x30 [%d]",pDest[0]));
supp_ie=&psecuritypriv->supplicant_ie[0];
for (i=0;i<supp_ie[0];i++)
{
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("IEs [%d] = 0x%x\n\n", i,supp_ie[i]));
}
i=13; /* 0~11 is fixed information element */
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("i= %d tgt_network->network.IELength=%d\n\n", i,(int)psecnetwork->IELength));
while ((i<supp_ie[0]) && (i<256)){
if ((unsigned char)supp_ie[i]==pDest[0]){
_rtw_memcpy((u8 *)(pDest),
&supp_ie[i],
supp_ie[1+i]+2);
break;
}
i=i+supp_ie[i+1]+2;
if (supp_ie[1+i]==0)
i=i+1;
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("iteration i=%d IEs [%d] = 0x%x\n\n", i,i,supp_ie[i+1]));
}
pAssocInfo->RequestIELength += (2 + supp_ie[1+i]);/* (2 + psecnetwork->IEs[1+i]+4); */
}
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n psecnetwork != NULL,fwstate==_FW_UNDER_LINKING\n"));
}
/* */
/* Association Response related information */
/* */
if (check_fwstate( pmlmepriv, _FW_LINKED)==true)
{
tgt_network =&(pmlmepriv->cur_network);
if (tgt_network!=NULL){
pAssocInfo->AvailableResponseFixedIEs =
NDIS_802_11_AI_RESFI_CAPABILITIES
|NDIS_802_11_AI_RESFI_ASSOCIATIONID
;
pAssocInfo->ResponseFixedIEs.Capabilities =(unsigned short)* & tgt_network->network.IEs[10];
pAssocInfo->ResponseFixedIEs.StatusCode = 0;
pAssocInfo->ResponseFixedIEs.AssociationId =(unsigned short) tgt_network->aid;
pDest = (u8 *)pAssocInfo + sizeof(NDIS_802_11_ASSOCIATION_INFORMATION)+pAssocInfo->RequestIELength;
auth_ie=&psecuritypriv->authenticator_ie[0];
for (i=0;i<auth_ie[0];i++)
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("IEs [%d] = 0x%x\n\n", i,auth_ie[i]));
i=auth_ie[0]-12;
if (i>0){
_rtw_memcpy((u8 *)&pDest[0],&auth_ie[1],i);
pAssocInfo->ResponseIELength =i;
}
pAssocInfo->OffsetResponseIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION) + pAssocInfo->RequestIELength;
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n tgt_network != NULL,fwstate==_FW_LINKED\n"));
}
}
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n exit query_802_11_association_information\n"));
_func_exit_;
return true;
}
#endif

View file

@ -209,100 +209,6 @@ _func_exit_;
return ret; return ret;
} }
#ifdef PLATFORM_WINDOWS
u8 rtw_pnp_set_power_wakeup(_adapter* padapter)
{
u8 res=_SUCCESS;
_func_enter_;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("==>rtw_pnp_set_power_wakeup!!!\n"));
res = rtw_setstandby_cmd(padapter, 0);
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("<==rtw_pnp_set_power_wakeup!!!\n"));
_func_exit_;
return res;
}
u8 rtw_pnp_set_power_sleep(_adapter* padapter)
{
u8 res=_SUCCESS;
_func_enter_;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("==>rtw_pnp_set_power_sleep!!!\n"));
res = rtw_setstandby_cmd(padapter, 1);
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("<==rtw_pnp_set_power_sleep!!!\n"));
_func_exit_;
return res;
}
u8 rtw_set_802_11_reload_defaults(_adapter * padapter, NDIS_802_11_RELOAD_DEFAULTS reloadDefaults)
{
_func_enter_;
switch ( reloadDefaults)
{
case Ndis802_11ReloadWEPKeys:
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("SetInfo OID_802_11_RELOAD_DEFAULTS : Ndis802_11ReloadWEPKeys\n"));
break;
}
/* 8711 CAM was not for En/Decrypt only */
/* so, we can't clear all keys. */
/* should we disable WPAcfg (ox0088) bit 1-2, instead of clear all CAM */
/* TO DO... */
_func_exit_;
return true;
}
u8 set_802_11_test(_adapter* padapter, NDIS_802_11_TEST *test)
{
u8 ret=true;
_func_enter_;
switch (test->Type)
{
case 1:
NdisMIndicateStatus(padapter->hndis_adapter, NDIS_STATUS_MEDIA_SPECIFIC_INDICATION, (void *)&test->AuthenticationEvent, test->Length - 8);
NdisMIndicateStatusComplete(padapter->hndis_adapter);
break;
case 2:
NdisMIndicateStatus(padapter->hndis_adapter, NDIS_STATUS_MEDIA_SPECIFIC_INDICATION, (void *)&test->RssiTrigger, sizeof(NDIS_802_11_RSSI));
NdisMIndicateStatusComplete(padapter->hndis_adapter);
break;
default:
ret=false;
break;
}
_func_exit_;
return ret;
}
u8 rtw_set_802_11_pmkid(_adapter* padapter, NDIS_802_11_PMKID *pmkid)
{
u8 ret=_SUCCESS;
return ret;
}
#endif
u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid) u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid)
{ {
_irqL irqL; _irqL irqL;
@ -492,32 +398,6 @@ _func_enter_;
} }
handle_tkip_countermeasure: handle_tkip_countermeasure:
#ifdef PLATFORM_WINDOWS
if (padapter->securitypriv.btkip_countermeasure==true)
{
LARGE_INTEGER sys_time;
u32 diff_time,cur_time ;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:padapter->securitypriv.btkip_countermeasure==true\n"));
NdisGetCurrentSystemTime(&sys_time);
cur_time=(u32)(sys_time.QuadPart/10); /* In micro-second. */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:cur_time=0x%x\n",cur_time));
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:psecuritypriv->last_mic_err_time=0x%x\n",padapter->securitypriv.btkip_countermeasure_time));
diff_time = cur_time -padapter->securitypriv.btkip_countermeasure_time; /* In micro-second. */
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid:diff_time=0x%x\n",diff_time));
if (diff_time > 60000000) {
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid(): countermeasure time >60s.\n"));
padapter->securitypriv.btkip_countermeasure=false;
/* Update MIC error time. */
padapter->securitypriv.btkip_countermeasure_time=0;
} else {
/* can't join in 60 seconds. */
status = _FAIL;
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_ssid(): countermeasure time <60s.\n"));
goto release_mlme_lock;
}
}
#endif
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
if (padapter->securitypriv.btkip_countermeasure == true) { if (padapter->securitypriv.btkip_countermeasure == true) {

View file

@ -279,17 +279,6 @@ _func_enter_;
if (!isfreeall) if (!isfreeall)
{ {
#ifdef PLATFORM_WINDOWS
delta_time = (curr_time -pnetwork->last_scanned)/10;
if (delta_time < lifetime*1000000)/* unit:usec */
{
goto exit;
}
#endif
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
delta_time = (curr_time -pnetwork->last_scanned)/HZ; delta_time = (curr_time -pnetwork->last_scanned)/HZ;
@ -745,13 +734,6 @@ static void update_current_network(_adapter *adapter, WLAN_BSSID_EX *pnetwork)
_func_enter_; _func_enter_;
#ifdef PLATFORM_OS_XP
if ((unsigned long)(&(pmlmepriv->cur_network.network)) < 0x7ffffff)
{
KeBugCheckEx(0x87111c1c, (ULONG_PTR)(&(pmlmepriv->cur_network.network)), 0, 0,0);
}
#endif
if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork))) if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork)))
{ {
update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, true); update_network(&(pmlmepriv->cur_network.network), pnetwork,adapter, true);
@ -789,9 +771,6 @@ _func_enter_;
if ((unsigned long)(pnetwork) < 0x7ffffff) if ((unsigned long)(pnetwork) < 0x7ffffff)
{ {
#ifdef PLATFORM_OS_XP
KeBugCheckEx(0x87111c1c, (ULONG_PTR)pnetwork, 0, 0,0);
#endif
} }
if (is_same_network(&(pnetwork->network), target)) if (is_same_network(&(pnetwork->network), target))

View file

@ -56,9 +56,6 @@ _func_exit_;
/* oid_rtl_seg_81_87_80 section start **************** */ /* oid_rtl_seg_81_87_80 section start **************** */
NDIS_STATUS oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
struct bb_reg_param *pbbreg; struct bb_reg_param *pbbreg;
u16 offset; u16 offset;
u32 value; u32 value;
@ -97,9 +94,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
struct bb_reg_param *pbbreg; struct bb_reg_param *pbbreg;
u16 offset; u16 offset;
u32 value; u32 value;
@ -138,9 +132,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
struct rf_reg_param *pbbreg; struct rf_reg_param *pbbreg;
u8 path; u8 path;
u8 offset; u8 offset;
@ -186,9 +177,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
struct rf_reg_param *pbbreg; struct rf_reg_param *pbbreg;
u8 path; u8 path;
u8 offset; u8 offset;
@ -239,9 +227,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 ratevalue;/* 4 */ u32 ratevalue;/* 4 */
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -276,9 +261,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 mode; u32 mode;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -317,9 +299,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -343,9 +322,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 Channel; u32 Channel;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -382,9 +358,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u16 bandwidth; u16 bandwidth;
u16 channel_offset; u16 channel_offset;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
@ -424,9 +397,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 antenna; u32 antenna;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -463,9 +433,6 @@ _func_exit_;
NDIS_STATUS oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 tx_pwr_idx; u32 tx_pwr_idx;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -624,9 +591,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -648,9 +612,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -679,9 +640,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -711,9 +669,6 @@ _func_exit_;
/* oid_rtl_seg_81_80_20 section end **************** */ /* oid_rtl_seg_81_80_20 section end **************** */
NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 bStartTest; u32 bStartTest;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -749,9 +704,6 @@ _func_exit_;
NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 bStartTest; u32 bStartTest;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -787,9 +739,6 @@ _func_exit_;
NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 bStartTest; u32 bStartTest;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -825,9 +774,6 @@ _func_exit_;
NDIS_STATUS oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u32 bStartTest; u32 bStartTest;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -858,10 +804,6 @@ NDIS_STATUS oid_rt_pro_set_modulation_hdl(struct oid_par_priv* poid_par_priv)
NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv)
{ {
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
_func_enter_; _func_enter_;
@ -885,9 +827,6 @@ NDIS_STATUS oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv)
/* */ /* */
NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
pRW_Reg RegRWStruct; pRW_Reg RegRWStruct;
u32 offset, width; u32 offset, width;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
@ -937,9 +876,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
pRW_Reg RegRWStruct; pRW_Reg RegRWStruct;
u32 offset, width, value; u32 offset, width, value;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
@ -1064,9 +1000,6 @@ NDIS_STATUS oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv)
{ {
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
_func_enter_; _func_enter_;
@ -1090,9 +1023,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_get_thermal_meter_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_get_thermal_meter_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
u8 thermal = 0; u8 thermal = 0;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -1126,9 +1056,6 @@ NDIS_STATUS oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv)
/* */ /* */
NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -1206,9 +1133,6 @@ NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
/* */ /* */
NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
PEFUSE_ACCESS_STRUCT pefuse; PEFUSE_ACCESS_STRUCT pefuse;
u8 *data; u8 *data;
u16 addr = 0, cnts = 0, max_available_size = 0; u16 addr = 0, cnts = 0, max_available_size = 0;
@ -1254,9 +1178,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
PEFUSE_ACCESS_STRUCT pefuse; PEFUSE_ACCESS_STRUCT pefuse;
u8 *data; u8 *data;
u16 addr = 0, cnts = 0, max_available_size = 0; u16 addr = 0, cnts = 0, max_available_size = 0;
@ -1297,9 +1218,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
PPGPKT_STRUCT ppgpkt; PPGPKT_STRUCT ppgpkt;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -1354,9 +1272,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u16 size; u16 size;
u8 ret; u8 ret;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
@ -1431,9 +1346,6 @@ _func_exit_;
/* */ /* */
NDIS_STATUS oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u8 *data; u8 *data;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
@ -1498,9 +1410,6 @@ NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv)
NDIS_STATUS oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
{ {
#ifdef PLATFORM_OS_XP
_irqL oldirql;
#endif
u8 rx_pkt_type; u8 rx_pkt_type;
NDIS_STATUS status = NDIS_STATUS_SUCCESS; NDIS_STATUS status = NDIS_STATUS_SUCCESS;

View file

@ -1321,10 +1321,6 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
_func_enter_; _func_enter_;
#ifdef PLATFORM_WINDOWS
pwrctrlpriv->pnp_current_pwr_state=NdisDeviceStateD0;
#endif
_init_pwrlock(&pwrctrlpriv->lock); _init_pwrlock(&pwrctrlpriv->lock);
pwrctrlpriv->rf_pwrstate = rf_on; pwrctrlpriv->rf_pwrstate = rf_on;
pwrctrlpriv->ips_enter_cnts=0; pwrctrlpriv->ips_enter_cnts=0;

View file

@ -112,8 +112,6 @@ _func_enter_;
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS #ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
_init_timer(&precvpriv->signal_stat_timer, padapter->pnetdev, RTW_TIMER_HDL_NAME(signal_stat), padapter); _init_timer(&precvpriv->signal_stat_timer, padapter->pnetdev, RTW_TIMER_HDL_NAME(signal_stat), padapter);
#elif defined(PLATFORM_OS_CE) || defined(PLATFORM_WINDOWS)
_init_timer(&precvpriv->signal_stat_timer, padapter->hndis_adapter, RTW_TIMER_HDL_NAME(signal_stat), padapter);
#endif #endif
precvpriv->signal_stat_sampling_interval = 1000; /* ms */ precvpriv->signal_stat_sampling_interval = 1000; /* ms */
@ -246,11 +244,6 @@ _func_enter_;
} }
#endif #endif
#ifdef PLATFORM_WINDOWS
rtw_os_read_port(padapter, precvframe->u.hdr.precvbuf);
#endif
#if defined(PLATFORM_LINUX) #if defined(PLATFORM_LINUX)
if (precvframe->u.hdr.pkt) if (precvframe->u.hdr.pkt)
@ -2297,24 +2290,6 @@ _func_enter_;
/* ptr -= 16; */ /* ptr -= 16; */
/* _rtw_memcpy(ptr, get_rxmem(precvframe), 16); */ /* _rtw_memcpy(ptr, get_rxmem(precvframe), 16); */
} }
else
{
#ifdef PLATFORM_OS_XP
NDIS_PACKET_8021Q_INFO VlanPriInfo;
UINT32 UserPriority = precvframe->u.hdr.attrib.priority;
UINT32 VlanID = (pvlan!=NULL ? get_vlan_id(pvlan) : 0 );
VlanPriInfo.Value = /* Get current value. */
NDIS_PER_PACKET_INFO_FROM_PACKET(precvframe->u.hdr.pkt, Ieee8021QInfo);
VlanPriInfo.TagHeader.UserPriority = UserPriority;
VlanPriInfo.TagHeader.VlanId = VlanID ;
VlanPriInfo.TagHeader.CanonicalFormatId = 0; /* Should be zero. */
VlanPriInfo.TagHeader.Reserved = 0; /* Should be zero. */
NDIS_PER_PACKET_INFO_FROM_PACKET(precvframe->u.hdr.pkt, Ieee8021QInfo) = VlanPriInfo.Value;
#endif
}
if (eth_type==0x8712)/* append rx status for mp test packets */ if (eth_type==0x8712)/* append rx status for mp test packets */
{ {
@ -2769,9 +2744,6 @@ exit:
return ret; return ret;
#else /* || defined (PLATFORM_LINUX) */ #else /* || defined (PLATFORM_LINUX) */
#ifdef PLATFORM_WINDOWS
_irqL irql;
#endif /* PLATFORM_WINDOWS */
unsigned char *ptr, *pdata, *pbuf, *psnap_type; unsigned char *ptr, *pdata, *pbuf, *psnap_type;
union recv_frame *pnrframe, *pnrframe_new; union recv_frame *pnrframe, *pnrframe_new;
int a_len, mv_len, padding_len; int a_len, mv_len, padding_len;
@ -2782,9 +2754,6 @@ exit:
struct recv_priv *precvpriv = &padapter->recvpriv; struct recv_priv *precvpriv = &padapter->recvpriv;
_queue *pfree_recv_queue = &(precvpriv->free_recv_queue); _queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
int ret = _SUCCESS; int ret = _SUCCESS;
#ifdef PLATFORM_WINDOWS
struct recv_buf *precvbuf = prframe->u.hdr.precvbuf;
#endif /* PLATFORM_WINDOWS */
a_len = prframe->u.hdr.len - prframe->u.hdr.attrib.hdrlen; a_len = prframe->u.hdr.len - prframe->u.hdr.attrib.hdrlen;
recvframe_pull(prframe, prframe->u.hdr.attrib.hdrlen); recvframe_pull(prframe, prframe->u.hdr.attrib.hdrlen);
@ -2890,26 +2859,6 @@ exit:
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("@@@===recv tcp len:%d @@@===\n", pnrframe->u.hdr.len)); RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("@@@===recv tcp len:%d @@@===\n", pnrframe->u.hdr.len));
} }
} }
#ifdef PLATFORM_OS_XP
else
{
NDIS_PACKET_8021Q_INFO VlanPriInfo;
UINT32 UserPriority = pnrframe->u.hdr.attrib.priority;
UINT32 VlanID = (pvlan!=NULL ? get_vlan_id(pvlan) : 0 );
VlanPriInfo.Value = /* Get current value. */
NDIS_PER_PACKET_INFO_FROM_PACKET(pnrframe->u.hdr.pkt, Ieee8021QInfo);
VlanPriInfo.TagHeader.UserPriority = UserPriority;
VlanPriInfo.TagHeader.VlanId = VlanID;
VlanPriInfo.TagHeader.CanonicalFormatId = 0; /* Should be zero. */
VlanPriInfo.TagHeader.Reserved = 0; /* Should be zero. */
NDIS_PER_PACKET_INFO_FROM_PACKET(pnrframe->u.hdr.pkt, Ieee8021QInfo) = VlanPriInfo.Value;
}
#endif /* PLATFORM_OS_XP */
pbuf = recvframe_pull(pnrframe, (mv_len-sizeof(struct ethhdr))); pbuf = recvframe_pull(pnrframe, (mv_len-sizeof(struct ethhdr)));
_rtw_memcpy(pbuf, pnrframe->u.hdr.attrib.dst, ETH_ALEN); _rtw_memcpy(pbuf, pnrframe->u.hdr.attrib.dst, ETH_ALEN);
@ -2952,18 +2901,6 @@ exit:
pdata += (type_len + ETH_HLEN + padding_len); pdata += (type_len + ETH_HLEN + padding_len);
pnrframe_new->u.hdr.rx_head = pnrframe_new->u.hdr.rx_data = pnrframe_new->u.hdr.rx_tail = pdata; pnrframe_new->u.hdr.rx_head = pnrframe_new->u.hdr.rx_data = pnrframe_new->u.hdr.rx_tail = pdata;
pnrframe_new->u.hdr.rx_end = pdata + a_len + padding_len;/* */ pnrframe_new->u.hdr.rx_end = pdata + a_len + padding_len;/* */
#ifdef PLATFORM_WINDOWS
pnrframe_new->u.hdr.precvbuf=precvbuf;
_enter_critical_bh(&precvbuf->recvbuf_lock, &irql);
precvbuf->ref_cnt++;
_exit_critical_bh(&precvbuf->recvbuf_lock, &irql);
#endif /* PLATFORM_WINDOWS */
}
else
{
/* panic("pnrframe_new=%x\n", pnrframe_new); */
} }
} }

View file

@ -2810,14 +2810,6 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
} }
#endif /* CONFIG_TDLS */ #endif /* CONFIG_TDLS */
#ifdef PLATFORM_WINDOWS
void rtw_use_tkipkey_handler (
void * SystemSpecific1,
void * FunctionContext,
void * SystemSpecific2,
void * SystemSpecific3
)
#endif
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
void rtw_use_tkipkey_handler(void *FunctionContext) void rtw_use_tkipkey_handler(void *FunctionContext)
#endif #endif

View file

@ -25,17 +25,8 @@
#include <recv_osdep.h> #include <recv_osdep.h>
#include <xmit_osdep.h> #include <xmit_osdep.h>
#include <mlme_osdep.h> #include <mlme_osdep.h>
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
#include <sta_info.h> #include <sta_info.h>
void _rtw_init_stainfo(struct sta_info *psta);
void _rtw_init_stainfo(struct sta_info *psta) void _rtw_init_stainfo(struct sta_info *psta)
{ {
@ -46,10 +37,6 @@ _func_enter_;
_rtw_spinlock_init(&psta->lock); _rtw_spinlock_init(&psta->lock);
_rtw_init_listhead(&psta->list); _rtw_init_listhead(&psta->list);
_rtw_init_listhead(&psta->hash_list); _rtw_init_listhead(&psta->hash_list);
/* _rtw_init_listhead(&psta->asoc_list); */
/* _rtw_init_listhead(&psta->sleep_list); */
/* _rtw_init_listhead(&psta->wakeup_list); */
_rtw_init_queue(&psta->sleep_q); _rtw_init_queue(&psta->sleep_q);
psta->sleepq_len = 0; psta->sleepq_len = 0;

View file

@ -2782,429 +2782,6 @@ phy_DigitalPredistortion(
bool is2T bool is2T
) )
{ {
#if ( RT_PLATFORM == PLATFORM_WINDOWS)
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
#endif
#if (DM_ODM_SUPPORT_TYPE == ODM_MP)
PDM_ODM_T pDM_Odm = &pHalData->DM_OutSrc;
#endif
#endif
u4Byte tmpReg, tmpReg2, index, i;
u1Byte path, pathbound = PATH_NUM;
u4Byte AFE_backup[IQK_ADDA_REG_NUM];
u4Byte AFE_REG[IQK_ADDA_REG_NUM] = {
rFPGA0_XCD_SwitchControl, rBlue_Tooth,
rRx_Wait_CCA, rTx_CCK_RFON,
rTx_CCK_BBON, rTx_OFDM_RFON,
rTx_OFDM_BBON, rTx_To_Rx,
rTx_To_Tx, rRx_CCK,
rRx_OFDM, rRx_Wait_RIFS,
rRx_TO_Rx, rStandby,
rSleep, rPMPD_ANAEN };
u4Byte BB_backup[DP_BB_REG_NUM];
u4Byte BB_REG[DP_BB_REG_NUM] = {
rOFDM0_TRxPathEnable, rFPGA0_RFMOD,
rOFDM0_TRMuxPar, rFPGA0_XCD_RFInterfaceSW,
rFPGA0_XAB_RFInterfaceSW, rFPGA0_XA_RFInterfaceOE,
rFPGA0_XB_RFInterfaceOE};
u4Byte BB_settings[DP_BB_REG_NUM] = {
0x00a05430, 0x02040000, 0x000800e4, 0x22208000,
0x0, 0x0, 0x0};
u4Byte RF_backup[DP_PATH_NUM][DP_RF_REG_NUM];
u4Byte RF_REG[DP_RF_REG_NUM] = {
RF_TXBIAS_A};
u4Byte MAC_backup[IQK_MAC_REG_NUM];
u4Byte MAC_REG[IQK_MAC_REG_NUM] = {
REG_TXPAUSE, REG_BCN_CTRL,
REG_BCN_CTRL_1, REG_GPIO_MUXCFG};
u4Byte Tx_AGC[DP_DPK_NUM][DP_DPK_VALUE_NUM] = {
{0x1e1e1e1e, 0x03901e1e},
{0x18181818, 0x03901818},
{0x0e0e0e0e, 0x03900e0e}
};
u4Byte AFE_on_off[PATH_NUM] = {
0x04db25a4, 0x0b1b25a4}; /* path A on path B off / path A off path B on */
u1Byte RetryCount = 0;
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("==>phy_DigitalPredistortion()\n"));
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_DigitalPredistortion for %s %s\n", (is2T ? "2T2R" : "1T1R")));
/* save BB default value */
for (index=0; index<DP_BB_REG_NUM; index++)
BB_backup[index] = ODM_GetBBReg(pDM_Odm, BB_REG[index], bMaskDWord);
/* save MAC default value */
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
_PHY_SaveMACRegisters(pAdapter, BB_REG, MAC_backup);
#else
_PHY_SaveMACRegisters(pDM_Odm, BB_REG, MAC_backup);
#endif
/* save RF default value */
for (path=0; path<DP_PATH_NUM; path++)
{
for (index=0; index<DP_RF_REG_NUM; index++)
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
RF_backup[path][index] = PHY_QueryRFReg(pAdapter, path, RF_REG[index], bMaskDWord);
#else
RF_backup[path][index] = ODM_GetRFReg(pAdapter, path, RF_REG[index], bMaskDWord);
#endif
}
/* save AFE default value */
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
_PHY_SaveADDARegisters(pAdapter, AFE_REG, AFE_backup, IQK_ADDA_REG_NUM);
#else
RF_backup[path][index] = ODM_GetRFReg(pAdapter, path, RF_REG[index], bMaskDWord);
#endif
/* Path A/B AFE all on */
for (index = 0; index < IQK_ADDA_REG_NUM ; index++)
ODM_SetBBReg(pDM_Odm, AFE_REG[index], bMaskDWord, 0x6fdb25a4);
/* BB register setting */
for (index = 0; index < DP_BB_REG_NUM; index++)
{
if (index < 4)
ODM_SetBBReg(pDM_Odm, BB_REG[index], bMaskDWord, BB_settings[index]);
else if (index == 4)
ODM_SetBBReg(pDM_Odm,BB_REG[index], bMaskDWord, BB_backup[index]|BIT10|BIT26);
else
ODM_SetBBReg(pDM_Odm, BB_REG[index], BIT10, 0x00);
}
/* MAC register setting */
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
_PHY_MACSettingCalibration(pAdapter, MAC_REG, MAC_backup);
#else
_PHY_MACSettingCalibration(pDM_Odm, MAC_REG, MAC_backup);
#endif
/* PAGE-E IQC setting */
ODM_SetBBReg(pDM_Odm, rTx_IQK_Tone_A, bMaskDWord, 0x01008c00);
ODM_SetBBReg(pDM_Odm, rRx_IQK_Tone_A, bMaskDWord, 0x01008c00);
ODM_SetBBReg(pDM_Odm, rTx_IQK_Tone_B, bMaskDWord, 0x01008c00);
ODM_SetBBReg(pDM_Odm, rRx_IQK_Tone_B, bMaskDWord, 0x01008c00);
/* path_A DPK */
/* Path B to standby mode */
ODM_SetRFReg(pDM_Odm, RF_PATH_B, RF_AC, bMaskDWord, 0x10000);
/* PA gain = 11 & PAD1 => tx_agc 1f ~11 */
/* PA gain = 11 & PAD2 => tx_agc 10~0e */
/* PA gain = 01 => tx_agc 0b~0d */
/* PA gain = 00 => tx_agc 0a~00 */
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x40000000);
ODM_SetBBReg(pDM_Odm, 0xbc0, bMaskDWord, 0x0005361f);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x00000000);
/* do inner loopback DPK 3 times */
for (i = 0; i < 3; i++)
{
/* PA gain = 11 & PAD2 => tx_agc = 0x0f/0x0c/0x07 */
for (index = 0; index < 3; index++)
ODM_SetBBReg(pDM_Odm, 0xe00+index*4, bMaskDWord, Tx_AGC[i][0]);
ODM_SetBBReg(pDM_Odm,0xe00+index*4, bMaskDWord, Tx_AGC[i][1]);
for (index = 0; index < 4; index++)
ODM_SetBBReg(pDM_Odm,0xe10+index*4, bMaskDWord, Tx_AGC[i][0]);
/* PAGE_B for Path-A inner loopback DPK setting */
ODM_SetBBReg(pDM_Odm,rPdp_AntA, bMaskDWord, 0x02097098);
ODM_SetBBReg(pDM_Odm,rPdp_AntA_4, bMaskDWord, 0xf76d9f84);
ODM_SetBBReg(pDM_Odm,rConfig_Pmpd_AntA, bMaskDWord, 0x0004ab87);
ODM_SetBBReg(pDM_Odm,rConfig_AntA, bMaskDWord, 0x00880000);
/* send one shot signal---- */
/* Path A */
ODM_SetBBReg(pDM_Odm,rConfig_Pmpd_AntA, bMaskDWord, 0x80047788);
ODM_delay_ms(1);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntA, bMaskDWord, 0x00047788);
ODM_delay_ms(50);
}
/* PA gain = 11 => tx_agc = 1a */
for (index = 0; index < 3; index++)
ODM_SetBBReg(pDM_Odm,0xe00+index*4, bMaskDWord, 0x34343434);
ODM_SetBBReg(pDM_Odm,0xe08+index*4, bMaskDWord, 0x03903434);
for (index = 0; index < 4; index++)
ODM_SetBBReg(pDM_Odm,0xe10+index*4, bMaskDWord, 0x34343434);
/* */
/* PAGE_B for Path-A DPK setting */
/* */
/* open inner loopback @ b00[19]:10 od 0xb00 0x01097018 */
ODM_SetBBReg(pDM_Odm,rPdp_AntA, bMaskDWord, 0x02017098);
ODM_SetBBReg(pDM_Odm,rPdp_AntA_4, bMaskDWord, 0xf76d9f84);
ODM_SetBBReg(pDM_Odm,rConfig_Pmpd_AntA, bMaskDWord, 0x0004ab87);
ODM_SetBBReg(pDM_Odm,rConfig_AntA, bMaskDWord, 0x00880000);
/* rf_lpbk_setup */
/* 1.rf 00:5205a, rf 0d:0e52c */
ODM_SetRFReg(pDM_Odm, RF_PATH_A, 0x0c, bMaskDWord, 0x8992b);
ODM_SetRFReg(pDM_Odm, RF_PATH_A, 0x0d, bMaskDWord, 0x0e52c);
ODM_SetRFReg(pDM_Odm, RF_PATH_A, 0x00, bMaskDWord, 0x5205a );
/* send one shot signal---- */
/* Path A */
ODM_SetBBReg(pDM_Odm,rConfig_Pmpd_AntA, bMaskDWord, 0x800477c0);
ODM_delay_ms(1);
ODM_SetBBReg(pDM_Odm,rConfig_Pmpd_AntA, bMaskDWord, 0x000477c0);
ODM_delay_ms(50);
while (RetryCount < DP_RETRY_LIMIT && !pDM_Odm->RFCalibrateInfo.bDPPathAOK)
{
/* read back measurement results---- */
ODM_SetBBReg(pDM_Odm, rPdp_AntA, bMaskDWord, 0x0c297018);
tmpReg = ODM_GetBBReg(pDM_Odm, 0xbe0, bMaskDWord);
ODM_delay_ms(10);
ODM_SetBBReg(pDM_Odm, rPdp_AntA, bMaskDWord, 0x0c29701f);
tmpReg2 = ODM_GetBBReg(pDM_Odm, 0xbe8, bMaskDWord);
ODM_delay_ms(10);
tmpReg = (tmpReg & bMaskHWord) >> 16;
tmpReg2 = (tmpReg2 & bMaskHWord) >> 16;
if (tmpReg < 0xf0 || tmpReg > 0x105 || tmpReg2 > 0xff )
{
ODM_SetBBReg(pDM_Odm, rPdp_AntA, bMaskDWord, 0x02017098);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x80000000);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x00000000);
ODM_delay_ms(1);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntA, bMaskDWord, 0x800477c0);
ODM_delay_ms(1);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntA, bMaskDWord, 0x000477c0);
ODM_delay_ms(50);
RetryCount++;
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("path A DPK RetryCount %d 0xbe0[31:16] %x 0xbe8[31:16] %x\n", RetryCount, tmpReg, tmpReg2));
}
else
{
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("path A DPK Sucess\n"));
pDM_Odm->RFCalibrateInfo.bDPPathAOK = true;
break;
}
}
RetryCount = 0;
/* DPP path A */
if (pDM_Odm->RFCalibrateInfo.bDPPathAOK)
{
/* DP settings */
ODM_SetBBReg(pDM_Odm, rPdp_AntA, bMaskDWord, 0x01017098);
ODM_SetBBReg(pDM_Odm, rPdp_AntA_4, bMaskDWord, 0x776d9f84);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntA, bMaskDWord, 0x0004ab87);
ODM_SetBBReg(pDM_Odm, rConfig_AntA, bMaskDWord, 0x00880000);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x40000000);
for (i=rPdp_AntA; i<=0xb3c; i+=4)
{
ODM_SetBBReg(pDM_Odm, i, bMaskDWord, 0x40004000);
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("path A ofsset = 0x%x\n", i));
}
/* pwsf */
ODM_SetBBReg(pDM_Odm, 0xb40, bMaskDWord, 0x40404040);
ODM_SetBBReg(pDM_Odm, 0xb44, bMaskDWord, 0x28324040);
ODM_SetBBReg(pDM_Odm, 0xb48, bMaskDWord, 0x10141920);
for (i=0xb4c; i<=0xb5c; i+=4)
{
ODM_SetBBReg(pDM_Odm, i, bMaskDWord, 0x0c0c0c0c);
}
/* TX_AGC boundary */
ODM_SetBBReg(pDM_Odm, 0xbc0, bMaskDWord, 0x0005361f);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x00000000);
}
else
{
ODM_SetBBReg(pDM_Odm, rPdp_AntA, bMaskDWord, 0x00000000);
ODM_SetBBReg(pDM_Odm, rPdp_AntA_4, bMaskDWord, 0x00000000);
}
/* DPK path B */
if (is2T)
{
/* Path A to standby mode */
ODM_SetRFReg(pDM_Odm, RF_PATH_A, RF_AC, bMaskDWord, 0x10000);
/* LUTs => tx_agc */
/* PA gain = 11 & PAD1, => tx_agc 1f ~11 */
/* PA gain = 11 & PAD2, => tx_agc 10 ~0e */
/* PA gain = 01 => tx_agc 0b ~0d */
/* PA gain = 00 => tx_agc 0a ~00 */
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x40000000);
ODM_SetBBReg(pDM_Odm, 0xbc4, bMaskDWord, 0x0005361f);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x00000000);
/* do inner loopback DPK 3 times */
for (i = 0; i < 3; i++)
{
/* PA gain = 11 & PAD2 => tx_agc = 0x0f/0x0c/0x07 */
for (index = 0; index < 4; index++)
ODM_SetBBReg(pDM_Odm, 0x830+index*4, bMaskDWord, Tx_AGC[i][0]);
for (index = 0; index < 2; index++)
ODM_SetBBReg(pDM_Odm, 0x848+index*4, bMaskDWord, Tx_AGC[i][0]);
for (index = 0; index < 2; index++)
ODM_SetBBReg(pDM_Odm, 0x868+index*4, bMaskDWord, Tx_AGC[i][0]);
/* PAGE_B for Path-A inner loopback DPK setting */
ODM_SetBBReg(pDM_Odm, rPdp_AntB, bMaskDWord, 0x02097098);
ODM_SetBBReg(pDM_Odm, rPdp_AntB_4, bMaskDWord, 0xf76d9f84);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x0004ab87);
ODM_SetBBReg(pDM_Odm, rConfig_AntB, bMaskDWord, 0x00880000);
/* send one shot signal---- */
/* Path B */
ODM_SetBBReg(pDM_Odm,rConfig_Pmpd_AntB, bMaskDWord, 0x80047788);
ODM_delay_ms(1);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x00047788);
ODM_delay_ms(50);
}
/* PA gain = 11 => tx_agc = 1a */
for (index = 0; index < 4; index++)
ODM_SetBBReg(pDM_Odm, 0x830+index*4, bMaskDWord, 0x34343434);
for (index = 0; index < 2; index++)
ODM_SetBBReg(pDM_Odm, 0x848+index*4, bMaskDWord, 0x34343434);
for (index = 0; index < 2; index++)
ODM_SetBBReg(pDM_Odm, 0x868+index*4, bMaskDWord, 0x34343434);
/* PAGE_B for Path-B DPK setting */
ODM_SetBBReg(pDM_Odm, rPdp_AntB, bMaskDWord, 0x02017098);
ODM_SetBBReg(pDM_Odm, rPdp_AntB_4, bMaskDWord, 0xf76d9f84);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x0004ab87);
ODM_SetBBReg(pDM_Odm, rConfig_AntB, bMaskDWord, 0x00880000);
/* RF lpbk switches on */
ODM_SetBBReg(pDM_Odm, 0x840, bMaskDWord, 0x0101000f);
ODM_SetBBReg(pDM_Odm, 0x840, bMaskDWord, 0x01120103);
/* Path-B RF lpbk */
ODM_SetRFReg(pDM_Odm, RF_PATH_B, 0x0c, bMaskDWord, 0x8992b);
ODM_SetRFReg(pDM_Odm, RF_PATH_B, 0x0d, bMaskDWord, 0x0e52c);
ODM_SetRFReg(pDM_Odm, RF_PATH_B, RF_AC, bMaskDWord, 0x5205a);
/* send one shot signal---- */
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x800477c0);
ODM_delay_ms(1);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x000477c0);
ODM_delay_ms(50);
while (RetryCount < DP_RETRY_LIMIT && !pDM_Odm->RFCalibrateInfo.bDPPathBOK)
{
/* read back measurement results---- */
ODM_SetBBReg(pDM_Odm, rPdp_AntB, bMaskDWord, 0x0c297018);
tmpReg = ODM_GetBBReg(pDM_Odm, 0xbf0, bMaskDWord);
ODM_SetBBReg(pDM_Odm, rPdp_AntB, bMaskDWord, 0x0c29701f);
tmpReg2 = ODM_GetBBReg(pDM_Odm, 0xbf8, bMaskDWord);
tmpReg = (tmpReg & bMaskHWord) >> 16;
tmpReg2 = (tmpReg2 & bMaskHWord) >> 16;
if (tmpReg < 0xf0 || tmpReg > 0x105 || tmpReg2 > 0xff)
{
ODM_SetBBReg(pDM_Odm, rPdp_AntB, bMaskDWord, 0x02017098);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x80000000);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x00000000);
ODM_delay_ms(1);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x800477c0);
ODM_delay_ms(1);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x000477c0);
ODM_delay_ms(50);
RetryCount++;
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("path B DPK RetryCount %d 0xbf0[31:16] %x, 0xbf8[31:16] %x\n", RetryCount , tmpReg, tmpReg2));
}
else
{
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("path B DPK Success\n"));
pDM_Odm->RFCalibrateInfo.bDPPathBOK = true;
break;
}
}
/* DPP path B */
if (pDM_Odm->RFCalibrateInfo.bDPPathBOK)
{
/* DP setting */
/* LUT by SRAM */
ODM_SetBBReg(pDM_Odm, rPdp_AntB, bMaskDWord, 0x01017098);
ODM_SetBBReg(pDM_Odm, rPdp_AntB_4, bMaskDWord, 0x776d9f84);
ODM_SetBBReg(pDM_Odm, rConfig_Pmpd_AntB, bMaskDWord, 0x0004ab87);
ODM_SetBBReg(pDM_Odm, rConfig_AntB, bMaskDWord, 0x00880000);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x40000000);
for (i=0xb60; i<=0xb9c; i+=4)
{
ODM_SetBBReg(pDM_Odm, i, bMaskDWord, 0x40004000);
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("path B ofsset = 0x%x\n", i));
}
/* PWSF */
ODM_SetBBReg(pDM_Odm, 0xba0, bMaskDWord, 0x40404040);
ODM_SetBBReg(pDM_Odm, 0xba4, bMaskDWord, 0x28324050);
ODM_SetBBReg(pDM_Odm, 0xba8, bMaskDWord, 0x0c141920);
for (i=0xbac; i<=0xbbc; i+=4)
{
ODM_SetBBReg(pDM_Odm, i, bMaskDWord, 0x0c0c0c0c);
}
/* tx_agc boundary */
ODM_SetBBReg(pDM_Odm, 0xbc4, bMaskDWord, 0x0005361f);
ODM_SetBBReg(pDM_Odm, rFPGA0_IQK, bMaskDWord, 0x00000000);
}
else
{
ODM_SetBBReg(pDM_Odm, rPdp_AntB, bMaskDWord, 0x00000000);
ODM_SetBBReg(pDM_Odm, rPdp_AntB_4, bMaskDWord, 0x00000000);
}
}
/* reload BB default value */
for (index=0; index<DP_BB_REG_NUM; index++)
ODM_SetBBReg(pDM_Odm, BB_REG[index], bMaskDWord, BB_backup[index]);
/* reload RF default value */
for (path = 0; path<DP_PATH_NUM; path++)
{
for ( i = 0 ; i < DP_RF_REG_NUM ; i++){
ODM_SetRFReg(pDM_Odm, path, RF_REG[i], bMaskDWord, RF_backup[path][i]);
}
}
ODM_SetRFReg(pDM_Odm, RF_PATH_A, RF_MODE1, bMaskDWord, 0x1000f); /* standby mode */
ODM_SetRFReg(pDM_Odm, RF_PATH_A, RF_MODE2, bMaskDWord, 0x20101); /* RF lpbk switches off */
/* reload AFE default value */
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
_PHY_ReloadADDARegisters(pAdapter, AFE_REG, AFE_backup, IQK_ADDA_REG_NUM);
/* reload MAC default value */
_PHY_ReloadMACRegisters(pAdapter, MAC_REG, MAC_backup);
#else
_PHY_ReloadADDARegisters(pDM_Odm, AFE_REG, AFE_backup, IQK_ADDA_REG_NUM);
/* reload MAC default value */
_PHY_ReloadMACRegisters(pDM_Odm, MAC_REG, MAC_backup);
#endif
pDM_Odm->RFCalibrateInfo.bDPdone = true;
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("<==phy_DigitalPredistortion()\n"));
#endif
} }
void void

View file

@ -28,13 +28,6 @@
#include <ethernet.h> #include <ethernet.h>
#include <usb_ops.h> #include <usb_ops.h>
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
#include <wifi.h> #include <wifi.h>
#include <circ_buf.h> #include <circ_buf.h>

View file

@ -27,10 +27,6 @@
#include <usb_ops.h> #include <usb_ops.h>
#include <rtl8188e_hal.h> #include <rtl8188e_hal.h>
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
s32 rtl8188eu_init_xmit_priv(_adapter *padapter) s32 rtl8188eu_init_xmit_priv(_adapter *padapter)
{ {
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;

View file

@ -31,12 +31,6 @@
#include <rtw_iol.h> #include <rtw_iol.h>
#endif #endif
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
#ifndef CONFIG_USB_HCI #ifndef CONFIG_USB_HCI
#error "CONFIG_USB_HCI shall be on!\n" #error "CONFIG_USB_HCI shall be on!\n"

View file

@ -28,12 +28,6 @@
#include <recv_osdep.h> #include <recv_osdep.h>
#include <rtl8188e_hal.h> #include <rtl8188e_hal.h>
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 index, void *pdata, u16 len, u8 requesttype) static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
{ {
_adapter *padapter = pintfhdl->padapter; _adapter *padapter = pintfhdl->padapter;

View file

@ -21,12 +21,6 @@
#define __DRV_CONF_H__ #define __DRV_CONF_H__
#include "autoconf.h" #include "autoconf.h"
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
//Older Android kernel doesn't has CONFIG_ANDROID defined, //Older Android kernel doesn't has CONFIG_ANDROID defined,
//add this to force CONFIG_ANDROID defined //add this to force CONFIG_ANDROID defined
#ifdef CONFIG_PLATFORM_ANDROID #ifdef CONFIG_PLATFORM_ANDROID

View file

@ -31,15 +31,6 @@
#include <osdep_service.h> #include <osdep_service.h>
#include <wlan_bssdef.h> #include <wlan_bssdef.h>
#ifdef PLATFORM_OS_XP
#include <drv_types_xp.h>
#endif
#ifdef PLATFORM_OS_CE
#include <drv_types_ce.h>
#endif
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
#include <drv_types_linux.h> #include <drv_types_linux.h>
#endif #endif
@ -288,31 +279,6 @@ struct dvobj_priv
u8 * usb_vendor_req_buf; u8 * usb_vendor_req_buf;
#endif #endif
#ifdef PLATFORM_WINDOWS
//related device objects
PDEVICE_OBJECT pphysdevobj;//pPhysDevObj;
PDEVICE_OBJECT pfuncdevobj;//pFuncDevObj;
PDEVICE_OBJECT pnextdevobj;//pNextDevObj;
u8 nextdevstacksz;//unsigned char NextDeviceStackSize; //= (CHAR)CEdevice->pUsbDevObj->StackSize + 1;
//urb for control diescriptor request
#ifdef PLATFORM_OS_XP
struct _URB_CONTROL_DESCRIPTOR_REQUEST descriptor_urb;
PUSB_CONFIGURATION_DESCRIPTOR pconfig_descriptor;//UsbConfigurationDescriptor;
#endif
#ifdef PLATFORM_OS_CE
WCHAR active_path[MAX_ACTIVE_REG_PATH]; // adapter regpath
USB_EXTENSION usb_extension;
_nic_hdl pipehdls_r8192c[0x10];
#endif
u32 config_descriptor_len;//ULONG UsbConfigurationDescriptorLength;
#endif//PLATFORM_WINDOWS
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
struct usb_interface *pusbintf; struct usb_interface *pusbintf;
struct usb_device *pusbdev; struct usb_device *pusbdev;
@ -539,17 +505,6 @@ struct _ADAPTER{
void (*intf_start)(_adapter * adapter); void (*intf_start)(_adapter * adapter);
void (*intf_stop)(_adapter * adapter); void (*intf_stop)(_adapter * adapter);
#ifdef PLATFORM_WINDOWS
_nic_hdl hndis_adapter;//hNdisAdapter(NDISMiniportAdapterHandle);
_nic_hdl hndis_config;//hNdisConfiguration;
NDIS_STRING fw_img;
u32 NdisPacketFilter;
u8 MCList[MAX_MCAST_LIST_NUM][6];
u32 MCAddrCount;
#endif //end of PLATFORM_WINDOWS
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
_nic_hdl pnetdev; _nic_hdl pnetdev;

View file

@ -28,9 +28,6 @@
#include <drv_types.h> #include <drv_types.h>
#include "wifi.h" #include "wifi.h"
#if defined PLATFORM_OS_XP
#include <ntstrsafe.h>
#endif
#if defined PLATFORM_LINUX #if defined PLATFORM_LINUX
#include <linux/wireless.h> #include <linux/wireless.h>
#endif #endif
@ -368,54 +365,6 @@ struct eapol {
#endif #endif
#ifdef PLATFORM_WINDOWS
#pragma pack(1)
struct rtw_ieee80211_hdr {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctl;
u8 addr4[ETH_ALEN];
};
struct rtw_ieee80211_hdr_3addr {
u16 frame_ctl;
u16 duration_id;
u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN];
u16 seq_ctl;
};
struct rtw_ieee80211_hdr_qos {
struct rtw_ieee80211_hdr wlan_hdr;
u16 qc;
};
struct rtw_ieee80211_hdr_3addr_qos {
struct rtw_ieee80211_hdr_3addr wlan_hdr;
u16 qc;
};
struct eapol {
u8 snap[6];
u16 ethertype;
u8 version;
u8 type;
u16 length;
};
#pragma pack()
#endif
enum eap_type { enum eap_type {
EAP_PACKET = 0, EAP_PACKET = 0,
EAPOL_START, EAPOL_START,
@ -537,22 +486,6 @@ struct ieee80211_snap_hdr {
#endif #endif
#ifdef PLATFORM_WINDOWS
#pragma pack(1)
struct ieee80211_snap_hdr {
u8 dsap; /* always 0xAA */
u8 ssap; /* always 0xAA */
u8 ctrl; /* always 0x03 */
u8 oui[P80211_OUI_LEN]; /* organizational universal id */
};
#pragma pack()
#endif
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr) #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
#define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE) #define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE)
@ -838,24 +771,6 @@ struct ieee80211_security {
#endif #endif
#ifdef PLATFORM_WINDOWS
#pragma pack(1)
struct ieee80211_security {
u16 active_key:2,
enabled:1,
auth_mode:2,
auth_algo:4,
unicast_uses_group:1;
u8 key_sizes[WEP_KEYS];
u8 keys[WEP_KEYS][WEP_KEY_LEN];
u8 level;
u16 flags;
} ;
#pragma pack()
#endif
/* /*
802.11 data frame from AP 802.11 data frame from AP
@ -910,24 +825,6 @@ struct ieee80211_info_element {
} __attribute__ ((packed)); } __attribute__ ((packed));
#endif #endif
#ifdef PLATFORM_WINDOWS
#pragma pack(1)
struct ieee80211_info_element_hdr {
u8 id;
u8 len;
} ;
struct ieee80211_info_element {
u8 id;
u8 len;
u8 data[0];
} ;
#pragma pack()
#endif
/* /*
* These are the data types that can make up management packets * These are the data types that can make up management packets
* *
@ -991,57 +888,6 @@ struct ieee80211_assoc_response_frame {
} __attribute__ ((packed)); } __attribute__ ((packed));
#endif #endif
#ifdef PLATFORM_WINDOWS
#pragma pack(1)
struct ieee80211_authentication {
struct ieee80211_header_data header;
u16 algorithm;
u16 transaction;
u16 status;
//struct ieee80211_info_element_hdr info_element;
} ;
struct ieee80211_probe_response {
struct ieee80211_header_data header;
u32 time_stamp[2];
u16 beacon_interval;
u16 capability;
struct ieee80211_info_element info_element;
} ;
struct ieee80211_probe_request {
struct ieee80211_header_data header;
/*struct ieee80211_info_element info_element;*/
} ;
struct ieee80211_assoc_request_frame {
struct rtw_ieee80211_hdr_3addr header;
u16 capability;
u16 listen_interval;
//u8 current_ap[ETH_ALEN];
struct ieee80211_info_element_hdr info_element;
} ;
struct ieee80211_assoc_response_frame {
struct rtw_ieee80211_hdr_3addr header;
u16 capability;
u16 status;
u16 aid;
// struct ieee80211_info_element info_element; /* supported rates */
};
#pragma pack()
#endif
struct ieee80211_txb { struct ieee80211_txb {
u8 nr_frags; u8 nr_frags;
u8 encrypted; u8 encrypted;

View file

@ -105,27 +105,6 @@ struct wme_parameter_element {
#endif #endif
#ifdef PLATFORM_WINDOWS
#pragma pack(1)
struct wpa_ie_hdr {
u8 elem_id;
u8 len;
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
u8 version[2]; /* little endian */
};
struct rsn_ie_hdr {
u8 elem_id; /* WLAN_EID_RSN */
u8 len;
u8 version[2]; /* little endian */
};
#pragma pack()
#endif
#define WPA_PUT_LE16(a, val) \ #define WPA_PUT_LE16(a, val) \
do { \ do { \
(a)[1] = ((u16) (val)) >> 8; \ (a)[1] = ((u16) (val)) >> 8; \
@ -315,109 +294,7 @@ struct ieee80211_mgmt {
#endif #endif
#ifdef PLATFORM_WINDOWS
#pragma pack(1)
struct ieee80211_mgmt {
u16 frame_control;
u16 duration;
u8 da[6];
u8 sa[6];
u8 bssid[6];
u16 seq_ctrl;
union {
struct {
u16 auth_alg;
u16 auth_transaction;
u16 status_code;
/* possibly followed by Challenge text */
u8 variable[0];
} auth;
struct {
u16 reason_code;
} deauth;
struct {
u16 capab_info;
u16 listen_interval;
/* followed by SSID and Supported rates */
u8 variable[0];
} assoc_req;
struct {
u16 capab_info;
u16 status_code;
u16 aid;
/* followed by Supported rates */
u8 variable[0];
} assoc_resp, reassoc_resp;
struct {
u16 capab_info;
u16 listen_interval;
u8 current_ap[6];
/* followed by SSID and Supported rates */
u8 variable[0];
} reassoc_req;
struct {
u16 reason_code;
} disassoc;
struct {
u8 category;
union {
struct {
u8 action_code;
u8 dialog_token;
u8 status_code;
u8 variable[0];
} wme_action;
struct{
u8 action_code;
u8 dialog_token;
u16 capab;
u16 timeout;
u16 start_seq_num;
} addba_req;
struct{
u8 action_code;
u8 dialog_token;
u16 status;
u16 capab;
u16 timeout;
} addba_resp;
struct{
u8 action_code;
u16 params;
u16 reason_code;
} delba;
struct{
u8 action_code;
/* capab_info for open and confirm,
* reason for close
*/
u16 aux;
/* Followed in plink_confirm by status
* code, AID and supported rates,
* and directly by supported rates in
* plink_open and plink_close
*/
u8 variable[0];
} plink_action;
struct{
u8 action_code;
u8 variable[0];
} mesh_action;
} u;
} action;
} u;
} ;
#pragma pack()
#endif
/* mgmt header + 1 byte category code */ /* mgmt header + 1 byte category code */
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u) #define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
#endif #endif

View file

@ -24,10 +24,6 @@
#include <osdep_service.h> #include <osdep_service.h>
#include <drv_types.h> #include <drv_types.h>
#if defined(PLATFORM_WINDOWS) || defined(PLATFORM_MPIXEL)
extern int time_after(u32 now, u32 old);
#endif
extern void rtw_init_mlme_timer(_adapter *padapter); extern void rtw_init_mlme_timer(_adapter *padapter);
extern void rtw_os_indicate_disconnect( _adapter *adapter ); extern void rtw_os_indicate_disconnect( _adapter *adapter );
extern void rtw_os_indicate_connect( _adapter *adapter ); extern void rtw_os_indicate_connect( _adapter *adapter );

View file

@ -64,27 +64,6 @@ The protection mechanism is through the pending queue.
u8 bio_timer_cancel; u8 bio_timer_cancel;
#endif #endif
#endif #endif
#ifdef PLATFORM_OS_XP
#ifdef CONFIG_SDIO_HCI
// below is for io_rwmem...
PMDL pmdl;
PSDBUS_REQUEST_PACKET sdrp;
PSDBUS_REQUEST_PACKET recv_sdrp;
PSDBUS_REQUEST_PACKET xmit_sdrp;
PIRP piorw_irp;
#endif
#ifdef CONFIG_USB_HCI
PURB piorw_urb;
PIRP piorw_irp;
u8 io_irp_cnt;
u8 bio_irp_pending;
_sema io_retevt;
#endif
#endif
}; };

View file

@ -239,8 +239,6 @@ __inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
#define RTW_TIMER_HDL_ARGS void *FunctionContext #define RTW_TIMER_HDL_ARGS void *FunctionContext
#elif defined(PLATFORM_OS_CE) || defined(PLATFORM_WINDOWS)
#define RTW_TIMER_HDL_ARGS void * SystemSpecific1, void * FunctionContext, PVOID SystemSpecific2, PVOID SystemSpecific3
#endif #endif
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl

View file

@ -39,11 +39,7 @@
#define MAX_RSPSZ 512 #define MAX_RSPSZ 512
#define MAX_EVTSZ 1024 #define MAX_EVTSZ 1024
#ifdef PLATFORM_OS_CE
#define CMDBUFF_ALIGN_SZ 4
#else
#define CMDBUFF_ALIGN_SZ 512 #define CMDBUFF_ALIGN_SZ 512
#endif
struct cmd_obj { struct cmd_obj {
_adapter *padapter; _adapter *padapter;
@ -112,9 +108,6 @@
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
u8 *c2h_mem; u8 *c2h_mem;
u8 *allocated_c2h_mem; u8 *allocated_c2h_mem;
#ifdef PLATFORM_OS_XP
PMDL pc2h_mdl;
#endif
#endif #endif
}; };

View file

@ -61,9 +61,6 @@
#define NUM_IOREQ 8 #define NUM_IOREQ 8
#ifdef PLATFORM_WINDOWS
#define MAX_PROT_SZ 64
#endif
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
#define MAX_PROT_SZ (64-16) #define MAX_PROT_SZ (64-16)
#endif #endif
@ -171,48 +168,12 @@ struct io_req {
u8 *pbuf; u8 *pbuf;
_sema sema; _sema sema;
#ifdef PLATFORM_OS_CE
#ifdef CONFIG_USB_HCI
// URB handler for rtw_write_mem
USB_TRANSFER usb_transfer_write_mem;
#endif
#endif
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt); void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt);
u8 *cnxt; u8 *cnxt;
#ifdef PLATFORM_OS_XP
PMDL pmdl;
PIRP pirp;
#ifdef CONFIG_SDIO_HCI
PSDBUS_REQUEST_PACKET sdrp;
#endif
#endif
}; };
struct intf_hdl { struct intf_hdl {
/*
u32 intf_option;
u32 bus_status;
u32 do_flush;
u8 *adapter;
u8 *intf_dev;
struct intf_priv *pintfpriv;
u8 cnt;
void (*intf_hdl_init)(u8 *priv);
void (*intf_hdl_unload)(u8 *priv);
void (*intf_hdl_open)(u8 *priv);
void (*intf_hdl_close)(u8 *priv);
struct _io_ops io_ops;
//u8 intf_status;//moved to struct intf_priv
u16 len;
u16 done_len;
*/
_adapter *padapter; _adapter *padapter;
struct dvobj_priv *pintf_dev;// pointer to &(padapter->dvobjpriv); struct dvobj_priv *pintf_dev;// pointer to &(padapter->dvobjpriv);

View file

@ -103,8 +103,7 @@ struct oid_obj_priv {
NDIS_STATUS (*oidfuns)(struct oid_par_priv *poid_par_priv); NDIS_STATUS (*oidfuns)(struct oid_par_priv *poid_par_priv);
}; };
#if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_)) || \ #if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_))
(defined(PLATFORM_WINDOWS) && defined(_RTW_IOCTL_RTL_C_))
static NDIS_STATUS oid_null_function(struct oid_par_priv* poid_par_priv) static NDIS_STATUS oid_null_function(struct oid_par_priv* poid_par_priv)
{ {
_func_enter_; _func_enter_;
@ -113,136 +112,6 @@ static NDIS_STATUS oid_null_function(struct oid_par_priv* poid_par_priv)
} }
#endif #endif
#ifdef PLATFORM_WINDOWS
int TranslateNdisPsToRtPs(NDIS_802_11_POWER_MODE ndisPsMode);
//OID Handler for Segment 1
NDIS_STATUS oid_gen_supported_list_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_hardware_status_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_media_supported_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_media_in_use_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_maximum_lookahead_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_maximum_frame_size_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_link_speed_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_transmit_buffer_space_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_receive_buffer_space_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_transmit_block_size_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_receive_block_size_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_vendor_id_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_vendor_description_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_current_packet_filter_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_current_lookahead_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_driver_version_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_maximum_total_size_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_protocol_options_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_mac_options_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_media_connect_status_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_maximum_send_packets_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_vendor_driver_version_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 2
NDIS_STATUS oid_gen_physical_medium_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 3
NDIS_STATUS oid_gen_xmit_ok_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_rcv_ok_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_xmit_error_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_rcv_error_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_gen_rcv_no_buffer_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 4
NDIS_STATUS oid_802_3_permanent_address_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_current_address_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_multicast_list_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_maximum_list_size_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_mac_options_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 5
NDIS_STATUS oid_802_3_rcv_error_alignment_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_xmit_one_collision_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_xmit_more_collisions_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 6
NDIS_STATUS oid_802_3_xmit_deferred_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_xmit_max_collisions_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_rcv_overrun_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_xmit_underrun_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_xmit_heartbeat_failure_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_xmit_times_crs_lost_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_3_xmit_late_collisions_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 7
NDIS_STATUS oid_pnp_capabilities_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_pnp_set_power_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_pnp_query_power_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_pnp_add_wake_up_pattern_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_pnp_remove_wake_up_pattern_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_pnp_wake_up_pattern_list_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_pnp_enable_wake_up_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 8
NDIS_STATUS oid_802_11_bssid_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_ssid_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_infrastructure_mode_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_add_wep_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_remove_wep_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_disassociate_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_authentication_mode_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_privacy_filter_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_bssid_list_scan_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_encryption_status_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_reload_defaults_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_add_key_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_remove_key_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_association_information_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_test_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_media_stream_mode_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_capability_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_pmkid_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 9
NDIS_STATUS oid_802_11_network_types_supported_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_network_type_in_use_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_tx_power_level_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_rssi_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_rssi_trigger_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_fragmentation_threshold_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_rts_threshold_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_number_of_antennas_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_rx_antenna_selected_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_tx_antenna_selected_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_supported_rates_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_desired_rates_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_configuration_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_power_mode_hdl(struct oid_par_priv* poid_par_priv);
NDIS_STATUS oid_802_11_bssid_list_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment 10
NDIS_STATUS oid_802_11_statistics_hdl(struct oid_par_priv* poid_par_priv);
//OID Handler for Segment ED
NDIS_STATUS oid_rt_mh_vender_id_hdl(struct oid_par_priv* poid_par_priv);
void Set_802_3_MULTICAST_LIST(ADAPTER *pAdapter, UCHAR *MCListbuf, ULONG MCListlen, bool bAcceptAllMulticast);
#endif// end of PLATFORM_WINDOWS
#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT) #if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT)
extern struct iw_handler_def rtw_handlers_def; extern struct iw_handler_def rtw_handlers_def;
#endif #endif

View file

@ -23,13 +23,4 @@
#include <drv_conf.h> #include <drv_conf.h>
#include <drv_types.h> #include <drv_types.h>
#ifdef PLATFORM_WINDOWS
u8 query_802_11_capability(_adapter* padapter,u8* pucBuf,u32 * pulOutLen);
u8 query_802_11_association_information (_adapter * padapter, PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo);
#endif
#endif #endif

View file

@ -597,25 +597,6 @@ void indicate_wx_scan_complete_event(_adapter *padapter);
void rtw_indicate_wx_assoc_event(_adapter *padapter); void rtw_indicate_wx_assoc_event(_adapter *padapter);
void rtw_indicate_wx_disassoc_event(_adapter *padapter); void rtw_indicate_wx_disassoc_event(_adapter *padapter);
#ifdef PLATFORM_WINDOWS
extern thread_return event_thread(void *context);
extern void rtw_join_timeout_handler (
void * SystemSpecific1,
void * FunctionContext,
void * SystemSpecific2,
void * SystemSpecific3
);
extern void _rtw_scan_timeout_handler (
void * SystemSpecific1,
void * FunctionContext,
void * SystemSpecific2,
void * SystemSpecific3
);
#endif
#if defined (PLATFORM_LINUX) #if defined (PLATFORM_LINUX)
extern int event_thread(void *context); extern int event_thread(void *context);
extern void rtw_join_timeout_handler(void* FunctionContext); extern void rtw_join_timeout_handler(void* FunctionContext);

View file

@ -20,7 +20,6 @@
#ifndef _RTW_MP_H_ #ifndef _RTW_MP_H_
#define _RTW_MP_H_ #define _RTW_MP_H_
#ifndef PLATFORM_WINDOWS
// 00 - Success // 00 - Success
// 11 - Error // 11 - Error
#define STATUS_SUCCESS (0x00000000L) #define STATUS_SUCCESS (0x00000000L)
@ -80,7 +79,6 @@
#define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L) // cause 49 #define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L) // cause 49
#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L) // cause 93 #define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L) // cause 93
#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L) // cause 3 #define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L) // cause 3
#endif /* #ifndef PLATFORM_WINDOWS */
typedef enum _ANTENNA_PATH{ typedef enum _ANTENNA_PATH{
ANTENNA_NONE = 0x00, ANTENNA_NONE = 0x00,
@ -125,14 +123,10 @@ struct mp_xmit_frame
u8 *mem_addr; u8 *mem_addr;
u32 sz[8]; u32 sz[8];
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) #if defined(PLATFORM_LINUX)
PURB pxmit_urb[8]; PURB pxmit_urb[8];
#endif #endif
#ifdef PLATFORM_OS_XP
PIRP pxmit_irp[8];
#endif
u8 bpending[8]; u8 bpending[8];
sint ac_tag[8]; sint ac_tag[8];
sint last[8]; sint last[8];
@ -153,22 +147,6 @@ struct mp_wiparam
typedef void(*wi_act_func)(void* padapter); typedef void(*wi_act_func)(void* padapter);
#ifdef PLATFORM_WINDOWS
struct mp_wi_cntx
{
u8 bmpdrv_unload;
// Work Item
NDIS_WORK_ITEM mp_wi;
NDIS_EVENT mp_wi_evt;
_lock mp_wi_lock;
u8 bmp_wi_progress;
wi_act_func curractfunc;
// Variable needed in each implementation of CurrActFunc.
struct mp_wiparam param;
};
#endif
struct mp_tx struct mp_tx
{ {
u8 stop; u8 stop;
@ -405,31 +383,6 @@ struct mp_priv
struct wlan_network mp_network; struct wlan_network mp_network;
NDIS_802_11_MAC_ADDRESS network_macaddr; NDIS_802_11_MAC_ADDRESS network_macaddr;
#ifdef PLATFORM_WINDOWS
u32 rx_testcnt;
u32 rx_testcnt1;
u32 rx_testcnt2;
u32 tx_testcnt;
u32 tx_testcnt1;
struct mp_wi_cntx wi_cntx;
u8 h2c_result;
u8 h2c_seqnum;
u16 h2c_cmdcode;
u8 h2c_resp_parambuf[512];
_lock h2c_lock;
_lock wkitm_lock;
u32 h2c_cmdcnt;
NDIS_EVENT h2c_cmd_evt;
NDIS_EVENT c2h_set;
NDIS_EVENT h2c_clr;
NDIS_EVENT cpwm_int;
NDIS_EVENT scsir_full_evt;
NDIS_EVENT scsiw_empty_evt;
#endif
u8 *pallocated_mp_xmitframe_buf; u8 *pallocated_mp_xmitframe_buf;
u8 *pmp_xmtframe_buf; u8 *pmp_xmtframe_buf;
_queue free_mp_xmitqueue; _queue free_mp_xmitqueue;

View file

@ -77,26 +77,7 @@ typedef struct _DR_VARIABLE_STRUCT_ {
//int mp_start_joinbss(_adapter *padapter, NDIS_802_11_SSID *pssid); //int mp_start_joinbss(_adapter *padapter, NDIS_802_11_SSID *pssid);
//void _irqlevel_changed_(_irqL *irqlevel, /*bool*/unsigned char bLower); //void _irqlevel_changed_(_irqL *irqlevel, /*bool*/unsigned char bLower);
#ifdef PLATFORM_OS_XP
static void _irqlevel_changed_(_irqL *irqlevel, u8 bLower)
{
if (bLower == LOWER) {
*irqlevel = KeGetCurrentIrql();
if (*irqlevel > PASSIVE_LEVEL) {
KeLowerIrql(PASSIVE_LEVEL);
}
} else {
if (KeGetCurrentIrql() == PASSIVE_LEVEL) {
KeRaiseIrql(DISPATCH_LEVEL, irqlevel);
}
}
}
#else
#define _irqlevel_changed_(a,b) #define _irqlevel_changed_(a,b)
#endif
//oid_rtl_seg_81_80_00 //oid_rtl_seg_81_80_00
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv* poid_par_priv); NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv* poid_par_priv);

View file

@ -226,31 +226,13 @@ struct recv_priv
_sema recv_sema; _sema recv_sema;
_sema terminate_recvthread_sema; _sema terminate_recvthread_sema;
#endif #endif
//_queue blk_strms[MAX_RX_NUMBLKS]; // keeping the block ack frame until return ack
_queue free_recv_queue; _queue free_recv_queue;
_queue recv_pending_queue; _queue recv_pending_queue;
_queue uc_swdec_pending_queue; _queue uc_swdec_pending_queue;
u8 *pallocated_frame_buf; u8 *pallocated_frame_buf;
u8 *precv_frame_buf; u8 *precv_frame_buf;
uint free_recvframe_cnt; uint free_recvframe_cnt;
_adapter *adapter; _adapter *adapter;
#ifdef PLATFORM_WINDOWS
_nic_hdl RxPktPoolHdl;
_nic_hdl RxBufPoolHdl;
#ifdef PLATFORM_OS_XP
PMDL pbytecnt_mdl;
#endif
uint counter; //record the number that up-layer will return to drv; only when counter==0 can we release recv_priv
NDIS_EVENT recv_resource_evt ;
#endif
u32 bIsAnyNonBEPkts; u32 bIsAnyNonBEPkts;
u64 rx_bytes; u64 rx_bytes;
u64 rx_pkts; u64 rx_pkts;
@ -375,20 +357,12 @@ struct recv_buf
#ifdef CONFIG_USB_HCI #ifdef CONFIG_USB_HCI
#if defined(PLATFORM_OS_XP)||defined(PLATFORM_LINUX) #if defined(PLATFORM_LINUX)
PURB purb; PURB purb;
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
u32 alloc_sz; u32 alloc_sz;
#endif #endif
#ifdef PLATFORM_OS_XP
PIRP pirp;
#endif
#ifdef PLATFORM_OS_CE
USB_TRANSFER usb_transfer_read_port;
#endif
u8 irp_pending; u8 irp_pending;
int transfer_len; int transfer_len;
@ -622,10 +596,6 @@ __inline static _buffer * get_rxbuf_desc(union recv_frame *precvframe)
if (precvframe==NULL) if (precvframe==NULL)
return NULL; return NULL;
#ifdef PLATFORM_WINDOWS
NdisQueryPacket(precvframe->u.hdr.pkt, NULL, NULL, &buf_desc, NULL);
#endif
return buf_desc; return buf_desc;
} }
@ -645,13 +615,6 @@ __inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
u8 * buf_star; u8 * buf_star;
union recv_frame * precv_frame; union recv_frame * precv_frame;
#ifdef PLATFORM_WINDOWS
_buffer * buf_desc;
uint len;
NdisQueryPacket(pkt, NULL, NULL, &buf_desc, &len);
NdisQueryBufferSafe(buf_desc, &buf_star, &len, HighPagePriority);
#endif
precv_frame = rxmem_to_recvframe((unsigned char*)buf_star); precv_frame = rxmem_to_recvframe((unsigned char*)buf_star);
return precv_frame; return precv_frame;

View file

@ -166,10 +166,6 @@ struct security_priv
WLAN_BSSID_EX sec_bss; //for joinbss (h2c buffer) usage WLAN_BSSID_EX sec_bss; //for joinbss (h2c buffer) usage
NDIS_802_11_WEP ndiswep; NDIS_802_11_WEP ndiswep;
#ifdef PLATFORM_WINDOWS
u8 KeyMaterial[16];// variable length depending on above field.
#endif
u8 assoc_info[600]; u8 assoc_info[600];
u8 szofcapability[256]; //for wpa2 usage u8 szofcapability[256]; //for wpa2 usage
u8 oidassociation[512]; //for wpa/wpa2 usage u8 oidassociation[512]; //for wpa/wpa2 usage
@ -428,14 +424,6 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie); u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie);
#endif //CONFIG_TDLS #endif //CONFIG_TDLS
#ifdef PLATFORM_WINDOWS
void rtw_use_tkipkey_handler (
void * SystemSpecific1,
void * FunctionContext,
void * SystemSpecific2,
void * SystemSpecific3
);
#endif
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
void rtw_use_tkipkey_handler(void* FunctionContext); void rtw_use_tkipkey_handler(void* FunctionContext);
#endif #endif

View file

@ -60,15 +60,11 @@
#define NR_XMITBUFF (128) #define NR_XMITBUFF (128)
#endif #endif
#ifdef PLATFORM_OS_CE
#define XMITBUF_ALIGN_SZ 4
#else
#ifdef CONFIG_PCI_HCI #ifdef CONFIG_PCI_HCI
#define XMITBUF_ALIGN_SZ 4 #define XMITBUF_ALIGN_SZ 4
#else #else
#define XMITBUF_ALIGN_SZ 512 #define XMITBUF_ALIGN_SZ 512
#endif #endif
#endif
// xmit extension buff defination // xmit extension buff defination
#define MAX_XMIT_EXTBUF_SZ (1536) #define MAX_XMIT_EXTBUF_SZ (1536)
@ -322,18 +318,11 @@ struct xmit_buf
//u32 sz[8]; //u32 sz[8];
u32 ff_hwaddr; u32 ff_hwaddr;
#if defined(PLATFORM_OS_XP)||defined(PLATFORM_LINUX) #if defined(PLATFORM_LINUX)
PURB pxmit_urb[8]; PURB pxmit_urb[8];
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
#endif #endif
#ifdef PLATFORM_OS_XP
PIRP pxmit_irp[8];
#endif
#ifdef PLATFORM_OS_CE
USB_TRANSFER usb_transfer_write_port;
#endif
u8 bpending[8]; u8 bpending[8];
@ -349,11 +338,6 @@ struct xmit_buf
u32 ff_hwaddr; u32 ff_hwaddr;
u8 pg_num; u8 pg_num;
u8 agg_num; u8 agg_num;
#ifdef PLATFORM_OS_XP
PMDL pxmitbuf_mdl;
PIRP pxmitbuf_irp;
PSDBUS_REQUEST_PACKET pxmitbuf_sdrp;
#endif
#endif #endif
#if defined(DBG_XMIT_BUF )|| defined(DBG_XMIT_BUF_EXT) #if defined(DBG_XMIT_BUF )|| defined(DBG_XMIT_BUF_EXT)
@ -505,10 +489,6 @@ struct xmit_priv {
_sema tx_retevt;//all tx return event; _sema tx_retevt;//all tx return event;
u8 txirp_cnt;// u8 txirp_cnt;//
#ifdef PLATFORM_OS_CE
USB_TRANSFER usb_transfer_write_port;
// USB_TRANSFER usb_transfer_write_mem;
#endif
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
struct tasklet_struct xmit_tasklet; struct tasklet_struct xmit_tasklet;
#endif #endif

View file

@ -755,80 +755,6 @@ struct ADDBA_request
#endif
#ifdef PLATFORM_WINDOWS
#pragma pack(1)
struct rtw_ieee80211_ht_cap {
unsigned short cap_info;
unsigned char ampdu_params_info;
unsigned char supp_mcs_set[16];
unsigned short extended_ht_cap_info;
unsigned int tx_BF_cap_info;
unsigned char antenna_selection_info;
};
struct ieee80211_ht_addt_info {
unsigned char control_chan;
unsigned char ht_param;
unsigned short operation_mode;
unsigned short stbc_param;
unsigned char basic_set[16];
};
struct HT_caps_element
{
union
{
struct
{
__le16 HT_caps_info;
unsigned char AMPDU_para;
unsigned char MCS_rate[16];
unsigned short HT_ext_caps;
unsigned int Beamforming_caps;
unsigned char ASEL_caps;
} HT_cap_element;
unsigned char HT_cap[26];
};
};
struct HT_info_element
{
unsigned char primary_channel;
unsigned char infos[5];
unsigned char MCS_rate[16];
};
struct AC_param
{
unsigned char ACI_AIFSN;
unsigned char CW;
__le16 TXOP_limit;
};
struct WMM_para_element
{
unsigned char QoS_info;
unsigned char reserved;
struct AC_param ac_param[4];
};
struct ADDBA_request
{
unsigned char dialog_token;
unsigned short BA_para_set;
unsigned short BA_timeout_value;
unsigned short BA_starting_seqctrl;
};
#pragma pack()
#endif #endif
typedef enum _HT_CAP_AMPDU_FACTOR { typedef enum _HT_CAP_AMPDU_FACTOR {

View file

@ -299,10 +299,6 @@ typedef struct _WLAN_BCN_INFO
/* temporally add #pragma pack for structure alignment issue of /* temporally add #pragma pack for structure alignment issue of
* WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz() * WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz()
*/ */
#ifdef PLATFORM_WINDOWS
#pragma pack(push)
#pragma pack(1)
#endif
typedef struct _WLAN_BSSID_EX typedef struct _WLAN_BSSID_EX
{ {
ULONG Length; ULONG Length;
@ -318,14 +314,8 @@ typedef struct _WLAN_BSSID_EX
WLAN_PHY_INFO PhyInfo; WLAN_PHY_INFO PhyInfo;
ULONG IELength; ULONG IELength;
UCHAR IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information) UCHAR IEs[MAX_IE_SZ]; //(timestamp, beacon interval, and capability information)
} } __attribute__((packed))
#ifndef PLATFORM_WINDOWS
__attribute__((packed))
#endif
WLAN_BSSID_EX, *PWLAN_BSSID_EX; WLAN_BSSID_EX, *PWLAN_BSSID_EX;
#ifdef PLATFORM_WINDOWS
#pragma pack(pop)
#endif
__inline static uint get_WLAN_BSSID_EX_sz(WLAN_BSSID_EX *bss) __inline static uint get_WLAN_BSSID_EX_sz(WLAN_BSSID_EX *bss)
{ {
@ -341,10 +331,6 @@ struct wlan_network {
int join_res; int join_res;
WLAN_BSSID_EX network; //must be the last item WLAN_BSSID_EX network; //must be the last item
WLAN_BCN_INFO BcnInfo; WLAN_BCN_INFO BcnInfo;
#ifdef PLATFORM_WINDOWS
unsigned char iebuf[MAX_IE_SZ];
#endif
}; };
enum VRTL_CARRIER_SENSE enum VRTL_CARRIER_SENSE
@ -388,7 +374,6 @@ enum UAPSD_MAX_SP
* WPA2 * WPA2
*/ */
#ifndef PLATFORM_OS_CE
typedef struct _PMKID_CANDIDATE { typedef struct _PMKID_CANDIDATE {
NDIS_802_11_MAC_ADDRESS BSSID; NDIS_802_11_MAC_ADDRESS BSSID;
ULONG Flags; ULONG Flags;
@ -418,7 +403,6 @@ typedef struct _NDIS_802_11_CAPABILITY
NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1]; NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY; } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
#endif
u8 key_2char2num(u8 hch, u8 lch); u8 key_2char2num(u8 hch, u8 lch);
u8 key_char2num(u8 ch); u8 key_char2num(u8 ch);

View file

@ -21,12 +21,6 @@
#include <drv_conf.h> #include <drv_conf.h>
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
#include <osdep_service.h> #include <osdep_service.h>
#include <drv_types.h> #include <drv_types.h>
#include <xmit_osdep.h> #include <xmit_osdep.h>

View file

@ -38,12 +38,6 @@
#include <asm/io.h> #include <asm/io.h>
#endif #endif
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
#error "Shall be Linux or Windows, but not both!\n"
#endif
#ifdef CONFIG_GLOBAL_UI_PID #ifdef CONFIG_GLOBAL_UI_PID
int ui_pid[3] = {0, 0, 0}; int ui_pid[3] = {0, 0, 0};
#endif #endif