mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 15:39:38 +00:00
rtl8188eu: Remove code used only for Windows
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
2caee63170
commit
a68c6cc26e
42 changed files with 9 additions and 1912 deletions
|
@ -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
|
||||||
|
|
|
@ -26,171 +26,4 @@
|
||||||
#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;
|
|
||||||
|
|
||||||
//NdisZeroMemory(pAssocInfo, sizeof(NDIS_802_11_ASSOCIATION_INFORMATION));
|
|
||||||
_rtw_memset(pAssocInfo, 0, sizeof(NDIS_802_11_ASSOCIATION_INFORMATION));
|
|
||||||
//pAssocInfo->Length = 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
|
|
||||||
|
|
||||||
|
|
|
@ -237,102 +237,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"));
|
|
||||||
//DbgPrint("+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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// SecClearAllKeys(Adapter);
|
|
||||||
// 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, (PVOID)&test->AuthenticationEvent, test->Length - 8);
|
|
||||||
NdisMIndicateStatusComplete(padapter->hndis_adapter);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
NdisMIndicateStatus(padapter->hndis_adapter, NDIS_STATUS_MEDIA_SPECIFIC_INDICATION, (PVOID)&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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -1438,10 +1438,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;
|
||||||
|
|
|
@ -35,12 +35,6 @@
|
||||||
#include <rtl8723a_hal.h>
|
#include <rtl8723a_hal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#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>
|
||||||
|
|
||||||
|
@ -136,8 +130,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
|
||||||
|
@ -272,10 +264,6 @@ _func_enter_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
rtw_os_read_port(padapter, precvframe->u.hdr.precvbuf);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
||||||
|
|
||||||
if(precvframe->u.hdr.pkt)
|
if(precvframe->u.hdr.pkt)
|
||||||
|
@ -3112,9 +3100,6 @@ exit:
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
#else // || defined (PLATFORM_LINUX) || defined (PLATFORM_FREEBSD)
|
#else // || defined (PLATFORM_LINUX) || defined (PLATFORM_FREEBSD)
|
||||||
#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;
|
||||||
|
@ -3125,9 +3110,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);
|
||||||
|
@ -3363,14 +3345,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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -3079,14 +3079,6 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
||||||
}
|
}
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
void rtw_use_tkipkey_handler (
|
|
||||||
IN PVOID SystemSpecific1,
|
|
||||||
IN PVOID FunctionContext,
|
|
||||||
IN PVOID SystemSpecific2,
|
|
||||||
IN PVOID SystemSpecific3
|
|
||||||
)
|
|
||||||
#endif
|
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
void rtw_use_tkipkey_handler(void *FunctionContext)
|
void rtw_use_tkipkey_handler(void *FunctionContext)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,12 +27,6 @@
|
||||||
#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);
|
||||||
|
|
|
@ -28,14 +28,6 @@
|
||||||
#include <circ_buf.h>
|
#include <circ_buf.h>
|
||||||
#include <ip.h>
|
#include <ip.h>
|
||||||
|
|
||||||
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
|
||||||
#error "Shall be Linux or Windows, but not both!\n"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
#include <if_ether.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_USB_HCI
|
#ifdef CONFIG_USB_HCI
|
||||||
#include <usb_ops.h>
|
#include <usb_ops.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -807,7 +807,6 @@ typedef enum tag_DBGP_Flag_Type_Definition
|
||||||
|
|
||||||
// Please add new OS's print API by yourself
|
// Please add new OS's print API by yourself
|
||||||
|
|
||||||
//#if (RT_PLATFORM==PLATFORM_WINDOWS)
|
|
||||||
#if (DEBUG_PRINT == 1) && DBG
|
#if (DEBUG_PRINT == 1) && DBG
|
||||||
#define RTPRINT(dbgtype, dbgflag, printstr)\
|
#define RTPRINT(dbgtype, dbgflag, printstr)\
|
||||||
{\
|
{\
|
||||||
|
|
|
@ -2912,429 +2912,6 @@ phy_DigitalPredistortion(
|
||||||
IN BOOLEAN is2T
|
IN BOOLEAN 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
|
||||||
|
|
|
@ -21,10 +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 <drv_types.h>
|
#include <drv_types.h>
|
||||||
#include <recv_osdep.h>
|
#include <recv_osdep.h>
|
||||||
#include <rtl8188e_hal.h>
|
#include <rtl8188e_hal.h>
|
||||||
|
|
|
@ -29,12 +29,6 @@
|
||||||
|
|
||||||
#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>
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,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;
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -38,45 +38,6 @@
|
||||||
#define _FALSE FALSE
|
#define _FALSE FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
typedef signed char s8;
|
|
||||||
typedef unsigned char u8;
|
|
||||||
|
|
||||||
typedef signed short s16;
|
|
||||||
typedef unsigned short u16;
|
|
||||||
|
|
||||||
typedef signed long s32;
|
|
||||||
typedef unsigned long u32;
|
|
||||||
|
|
||||||
typedef unsigned int uint;
|
|
||||||
typedef signed int sint;
|
|
||||||
|
|
||||||
|
|
||||||
typedef signed long long s64;
|
|
||||||
typedef unsigned long long u64;
|
|
||||||
|
|
||||||
#ifdef NDIS50_MINIPORT
|
|
||||||
|
|
||||||
#define NDIS_MAJOR_VERSION 5
|
|
||||||
#define NDIS_MINOR_VERSION 0
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NDIS51_MINIPORT
|
|
||||||
|
|
||||||
#define NDIS_MAJOR_VERSION 5
|
|
||||||
#define NDIS_MINOR_VERSION 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef NDIS_PROC proc_t;
|
|
||||||
|
|
||||||
typedef LONG atomic_t;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
|
@ -97,8 +97,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_WINDOWS) || defined(PLATFORM_MPIXEL) || defined(PLATFORM_FREEBSD)
|
|
||||||
/*
|
/*
|
||||||
* inside the kernel, we can use nicknames;
|
* inside the kernel, we can use nicknames;
|
||||||
* outside of it, we must avoid POSIX namespace pollution...
|
* outside of it, we must avoid POSIX namespace pollution...
|
||||||
|
@ -139,8 +137,6 @@
|
||||||
#define be32_to_cpus __be32_to_cpus
|
#define be32_to_cpus __be32_to_cpus
|
||||||
#define cpu_to_be16s __cpu_to_be16s
|
#define cpu_to_be16s __cpu_to_be16s
|
||||||
#define be16_to_cpus __be16_to_cpus
|
#define be16_to_cpus __be16_to_cpus
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle ntohl and suches. These have various compatibility
|
* Handle ntohl and suches. These have various compatibility
|
||||||
|
@ -198,16 +194,4 @@ extern unsigned short int htons(unsigned short int);
|
||||||
|
|
||||||
#endif /* OPTIMIZE */
|
#endif /* OPTIMIZE */
|
||||||
|
|
||||||
|
|
||||||
#if defined (PLATFORM_WINDOWS)
|
|
||||||
|
|
||||||
#define htonl(x) __cpu_to_be32(x)
|
|
||||||
#define ntohl(x) __be32_to_cpu(x)
|
|
||||||
#define htons(x) __cpu_to_be16(x)
|
|
||||||
#define ntohs(x) __be16_to_cpu(x)
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _LINUX_BYTEORDER_GENERIC_H */
|
#endif /* _LINUX_BYTEORDER_GENERIC_H */
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,6 @@ __inline static const __u32 __fswab32(__u32 x)
|
||||||
return __arch__swab32(x);
|
return __arch__swab32(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_WINDOWS)
|
|
||||||
#define swab16 __swab16
|
#define swab16 __swab16
|
||||||
#define swab32 __swab32
|
#define swab32 __swab32
|
||||||
#define swab64 __swab64
|
#define swab64 __swab64
|
||||||
|
@ -135,7 +134,6 @@ __inline static const __u32 __fswab32(__u32 x)
|
||||||
#define swab16s __swab16s
|
#define swab16s __swab16s
|
||||||
#define swab32s __swab32s
|
#define swab32s __swab32s
|
||||||
#define swab64s __swab64s
|
#define swab64s __swab64s
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _LINUX_BYTEORDER_SWAB_H */
|
#endif /* _LINUX_BYTEORDER_SWAB_H */
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -323,31 +323,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;
|
||||||
|
@ -562,17 +537,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;
|
||||||
|
|
||||||
|
|
|
@ -368,54 +368,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 +489,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)
|
||||||
|
@ -842,24 +778,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
|
||||||
|
@ -914,24 +832,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
|
||||||
*
|
*
|
||||||
|
@ -995,57 +895,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;
|
||||||
|
@ -1055,7 +904,6 @@ struct ieee80211_txb {
|
||||||
struct sk_buff *fragments[0];
|
struct sk_buff *fragments[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* SWEEP TABLE ENTRIES NUMBER*/
|
/* SWEEP TABLE ENTRIES NUMBER*/
|
||||||
#define MAX_SWEEP_TAB_ENTRIES 42
|
#define MAX_SWEEP_TAB_ENTRIES 42
|
||||||
#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7
|
#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7
|
||||||
|
|
|
@ -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; \
|
||||||
|
@ -331,143 +310,6 @@ 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;
|
|
||||||
#if 0
|
|
||||||
struct {
|
|
||||||
__le64 timestamp;
|
|
||||||
u16 beacon_int;
|
|
||||||
u16 capab_info;
|
|
||||||
/* followed by some of SSID, Supported rates,
|
|
||||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
|
||||||
u8 variable[0];
|
|
||||||
} beacon;
|
|
||||||
struct {
|
|
||||||
/* only variable items: SSID, Supported rates */
|
|
||||||
u8 variable[0];
|
|
||||||
} probe_req;
|
|
||||||
|
|
||||||
struct {
|
|
||||||
__le64 timestamp;
|
|
||||||
u16 beacon_int;
|
|
||||||
u16 capab_info;
|
|
||||||
/* followed by some of SSID, Supported rates,
|
|
||||||
* FH Params, DS Params, CF Params, IBSS Params */
|
|
||||||
u8 variable[0];
|
|
||||||
} probe_resp;
|
|
||||||
#endif
|
|
||||||
struct {
|
|
||||||
u8 category;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u8 status_code;
|
|
||||||
u8 variable[0];
|
|
||||||
} wme_action;
|
|
||||||
/*
|
|
||||||
struct{
|
|
||||||
u8 action_code;
|
|
||||||
u8 element_id;
|
|
||||||
u8 length;
|
|
||||||
struct ieee80211_channel_sw_ie sw_elem;
|
|
||||||
} chan_switch;
|
|
||||||
struct{
|
|
||||||
u8 action_code;
|
|
||||||
u8 dialog_token;
|
|
||||||
u8 element_id;
|
|
||||||
u8 length;
|
|
||||||
struct ieee80211_msrment_ie msr_elem;
|
|
||||||
} measurement;
|
|
||||||
*/
|
|
||||||
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)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
#if defined(PLATFORM_WINDOWS) || defined(PLATFORM_MPIXEL)
|
#if defined(PLATFORM_MPIXEL)
|
||||||
extern int time_after(u32 now, u32 old);
|
extern int time_after(u32 now, u32 old);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -973,8 +973,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 IN PVOID SystemSpecific1, IN PVOID FunctionContext, IN PVOID SystemSpecific2, IN PVOID SystemSpecific3
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
|
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
|
||||||
|
@ -1499,13 +1497,6 @@ __inline static unsigned char _cancel_timer_ex(_timer *ptimer)
|
||||||
_cancel_timer(ptimer,0);
|
_cancel_timer(ptimer,0);
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
u8 bcancelled;
|
|
||||||
|
|
||||||
_cancel_timer(ptimer, &bcancelled);
|
|
||||||
|
|
||||||
return bcancelled;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
|
@ -1544,16 +1535,6 @@ __inline static _OS_STATUS res_to_status(sint res)
|
||||||
#if defined (PLATFORM_LINUX) || defined (PLATFORM_MPIXEL) || defined (PLATFORM_FREEBSD)
|
#if defined (PLATFORM_LINUX) || defined (PLATFORM_MPIXEL) || defined (PLATFORM_FREEBSD)
|
||||||
return res;
|
return res;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
if (res == _SUCCESS)
|
|
||||||
return NDIS_STATUS_SUCCESS;
|
|
||||||
else
|
|
||||||
return NDIS_STATUS_FAILURE;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void rtw_dump_stack(void)
|
__inline static void rtw_dump_stack(void)
|
||||||
|
@ -1655,8 +1636,6 @@ __inline static u32 bitshift(u32 bitmask)
|
||||||
// limitation of path length
|
// limitation of path length
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
#define PATH_LENGTH_MAX PATH_MAX
|
#define PATH_LENGTH_MAX PATH_MAX
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
#define PATH_LENGTH_MAX MAX_PATH
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -1678,8 +1657,6 @@ extern void rtw_lock_ext_suspend_timeout(u32 timeout_ms);
|
||||||
//Atomic integer operations
|
//Atomic integer operations
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
#define ATOMIC_T atomic_t
|
#define ATOMIC_T atomic_t
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
#define ATOMIC_T LONG
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
typedef uint32_t ATOMIC_T ;
|
typedef uint32_t ATOMIC_T ;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -160,32 +160,13 @@ extern void rtl871x_cedbg(const char *fmt, ...);
|
||||||
#define _func_exit_ do{}while(0)
|
#define _func_exit_ do{}while(0)
|
||||||
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) do{}while(0)
|
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) do{}while(0)
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
#define DBG_871X do {} while(0)
|
|
||||||
#define MSG_8192C do {} while(0)
|
|
||||||
#define DBG_8192C do {} while(0)
|
|
||||||
#define DBG_871X_LEVEL do {} while(0)
|
|
||||||
#else
|
|
||||||
#define DBG_871X(x, ...) do {} while(0)
|
#define DBG_871X(x, ...) do {} while(0)
|
||||||
#define MSG_8192C(x, ...) do {} while(0)
|
#define MSG_8192C(x, ...) do {} while(0)
|
||||||
#define DBG_8192C(x,...) do {} while(0)
|
#define DBG_8192C(x,...) do {} while(0)
|
||||||
#define DBG_871X_LEVEL(x,...) do {} while(0)
|
#define DBG_871X_LEVEL(x,...) do {} while(0)
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef _dbgdump
|
#undef _dbgdump
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
#ifdef PLATFORM_OS_XP
|
|
||||||
#define _dbgdump DbgPrint
|
|
||||||
#elif defined PLATFORM_OS_CE
|
|
||||||
#define _dbgdump rtl871x_cedbg
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined PLATFORM_LINUX
|
|
||||||
#define _dbgdump printk
|
#define _dbgdump printk
|
||||||
#elif defined PLATFORM_FREEBSD
|
|
||||||
#define _dbgdump printf
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DRIVER_PREFIX "RTL871X: "
|
#define DRIVER_PREFIX "RTL871X: "
|
||||||
#define DEBUG_LEVEL (_drv_err_)
|
#define DEBUG_LEVEL (_drv_err_)
|
||||||
|
|
|
@ -52,9 +52,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
|
||||||
|
|
|
@ -103,136 +103,6 @@ struct oid_obj_priv {
|
||||||
NDIS_STATUS (*oidfuns)(struct oid_par_priv *poid_par_priv);
|
NDIS_STATUS (*oidfuns)(struct oid_par_priv *poid_par_priv);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
int TranslateNdisPsToRtPs(IN 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, BOOLEAN 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
|
||||||
|
|
|
@ -24,13 +24,5 @@
|
||||||
#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
|
||||||
|
|
||||||
|
|
|
@ -32,28 +32,6 @@ typedef struct _BSSIDInfo {
|
||||||
} BSSIDInfo, *PBSSIDInfo;
|
} BSSIDInfo, *PBSSIDInfo;
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_OS_XP
|
|
||||||
typedef struct _NDIS_802_11_PMKID {
|
|
||||||
u32 Length;
|
|
||||||
u32 BSSIDInfoCount;
|
|
||||||
BSSIDInfo BSSIDInfo[1];
|
|
||||||
} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
u8 rtw_set_802_11_reload_defaults(_adapter * padapter, NDIS_802_11_RELOAD_DEFAULTS reloadDefaults);
|
|
||||||
u8 rtw_set_802_11_test(_adapter * padapter, NDIS_802_11_TEST * test);
|
|
||||||
u8 rtw_set_802_11_pmkid(_adapter *pdapter, NDIS_802_11_PMKID *pmkid);
|
|
||||||
|
|
||||||
u8 rtw_pnp_set_power_sleep(_adapter* padapter);
|
|
||||||
u8 rtw_pnp_set_power_wakeup(_adapter* padapter);
|
|
||||||
|
|
||||||
void rtw_pnp_resume_wk(void *context);
|
|
||||||
void rtw_pnp_sleep_wk(void * context);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
u8 rtw_set_802_11_add_key(_adapter * padapter, NDIS_802_11_KEY * key);
|
u8 rtw_set_802_11_add_key(_adapter * padapter, NDIS_802_11_KEY * key);
|
||||||
u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode);
|
u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode);
|
||||||
u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid);
|
u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid);
|
||||||
|
|
|
@ -630,25 +630,6 @@ extern void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf);
|
||||||
extern void rtw_atimdone_event_callback(_adapter *adapter, u8 *pbuf);
|
extern void rtw_atimdone_event_callback(_adapter *adapter, u8 *pbuf);
|
||||||
extern void rtw_cpwm_event_callback(_adapter *adapter, u8 *pbuf);
|
extern void rtw_cpwm_event_callback(_adapter *adapter, u8 *pbuf);
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
extern thread_return event_thread(void *context);
|
|
||||||
|
|
||||||
extern void rtw_join_timeout_handler (
|
|
||||||
IN PVOID SystemSpecific1,
|
|
||||||
IN PVOID FunctionContext,
|
|
||||||
IN PVOID SystemSpecific2,
|
|
||||||
IN PVOID SystemSpecific3
|
|
||||||
);
|
|
||||||
|
|
||||||
extern void _rtw_scan_timeout_handler (
|
|
||||||
IN PVOID SystemSpecific1,
|
|
||||||
IN PVOID FunctionContext,
|
|
||||||
IN PVOID SystemSpecific2,
|
|
||||||
IN PVOID SystemSpecific3
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (PLATFORM_LINUX)|| defined (PLATFORM_FREEBSD)
|
#if defined (PLATFORM_LINUX)|| defined (PLATFORM_FREEBSD)
|
||||||
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);
|
||||||
|
|
|
@ -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,40 +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 */
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define MPT_NOOP 0
|
|
||||||
#define MPT_READ_MAC_1BYTE 1
|
|
||||||
#define MPT_READ_MAC_2BYTE 2
|
|
||||||
#define MPT_READ_MAC_4BYTE 3
|
|
||||||
#define MPT_WRITE_MAC_1BYTE 4
|
|
||||||
#define MPT_WRITE_MAC_2BYTE 5
|
|
||||||
#define MPT_WRITE_MAC_4BYTE 6
|
|
||||||
#define MPT_READ_BB_CCK 7
|
|
||||||
#define MPT_WRITE_BB_CCK 8
|
|
||||||
#define MPT_READ_BB_OFDM 9
|
|
||||||
#define MPT_WRITE_BB_OFDM 10
|
|
||||||
#define MPT_READ_RF 11
|
|
||||||
#define MPT_WRITE_RF 12
|
|
||||||
#define MPT_READ_EEPROM_1BYTE 13
|
|
||||||
#define MPT_WRITE_EEPROM_1BYTE 14
|
|
||||||
#define MPT_READ_EEPROM_2BYTE 15
|
|
||||||
#define MPT_WRITE_EEPROM_2BYTE 16
|
|
||||||
#define MPT_SET_CSTHRESHOLD 21
|
|
||||||
#define MPT_SET_INITGAIN 22
|
|
||||||
#define MPT_SWITCH_BAND 23
|
|
||||||
#define MPT_SWITCH_CHANNEL 24
|
|
||||||
#define MPT_SET_DATARATE 25
|
|
||||||
#define MPT_SWITCH_ANTENNA 26
|
|
||||||
#define MPT_SET_TX_POWER 27
|
|
||||||
#define MPT_SET_CONT_TX 28
|
|
||||||
#define MPT_SET_SINGLE_CARRIER 29
|
|
||||||
#define MPT_SET_CARRIER_SUPPRESSION 30
|
|
||||||
#define MPT_GET_RATE_TABLE 31
|
|
||||||
#define MPT_READ_TSSI 32
|
|
||||||
#define MPT_GET_THERMAL_METER 33
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum _ANTENNA_PATH{
|
typedef enum _ANTENNA_PATH{
|
||||||
ANTENNA_NONE = 0x00,
|
ANTENNA_NONE = 0x00,
|
||||||
|
@ -186,22 +151,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;
|
||||||
|
@ -458,31 +407,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;
|
||||||
|
|
|
@ -272,17 +272,6 @@ struct recv_priv
|
||||||
|
|
||||||
_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;
|
||||||
|
@ -674,10 +663,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -697,13 +682,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;
|
||||||
|
|
|
@ -177,9 +177,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
|
||||||
|
@ -443,14 +440,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 (
|
|
||||||
IN PVOID SystemSpecific1,
|
|
||||||
IN PVOID FunctionContext,
|
|
||||||
IN PVOID SystemSpecific2,
|
|
||||||
IN PVOID SystemSpecific3
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
void rtw_use_tkipkey_handler(void* FunctionContext);
|
void rtw_use_tkipkey_handler(void* FunctionContext);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,23 +29,6 @@
|
||||||
#include <sdio_ops_linux.h>
|
#include <sdio_ops_linux.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
#ifdef PLATFORM_OS_XP
|
|
||||||
#include <sdio_ops_xp.h>
|
|
||||||
struct async_context
|
|
||||||
{
|
|
||||||
PMDL pmdl;
|
|
||||||
PSDBUS_REQUEST_PACKET sdrp;
|
|
||||||
unsigned char* r_buf;
|
|
||||||
unsigned char* padapter;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
#ifdef PLATFORM_OS_CE
|
|
||||||
#include <sdio_ops_ce.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern void sdio_set_intf_ops(struct _io_ops *pops);
|
extern void sdio_set_intf_ops(struct _io_ops *pops);
|
||||||
|
|
||||||
//extern void sdio_func1cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
|
//extern void sdio_func1cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
|
||||||
|
|
|
@ -760,79 +760,6 @@ struct ADDBA_request
|
||||||
__le16 BA_starting_seqctrl;
|
__le16 BA_starting_seqctrl;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#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;
|
|
||||||
u8 AMPDU_para;
|
|
||||||
u8 MCS_rate[16];
|
|
||||||
__le16 HT_ext_caps;
|
|
||||||
__le16 Beamforming_caps;
|
|
||||||
u8 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
|
|
||||||
{
|
|
||||||
u8 ACI_AIFSN;
|
|
||||||
u8 CW;
|
|
||||||
__le16 TXOP_limit;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct WMM_para_element
|
|
||||||
{
|
|
||||||
unsigned char QoS_info;
|
|
||||||
unsigned char reserved;
|
|
||||||
struct AC_param ac_param[4];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ADDBA_request
|
|
||||||
{
|
|
||||||
u8 dialog_token;
|
|
||||||
__le16 BA_para_set;
|
|
||||||
__le16 BA_timeout_value;
|
|
||||||
__le16 BA_starting_seqctrl;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#pragma pack()
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum _HT_CAP_AMPDU_FACTOR {
|
typedef enum _HT_CAP_AMPDU_FACTOR {
|
||||||
|
|
|
@ -594,10 +594,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;
|
||||||
|
@ -614,13 +610,8 @@ typedef struct _WLAN_BSSID_EX
|
||||||
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)
|
||||||
}
|
}
|
||||||
#ifndef PLATFORM_WINDOWS
|
|
||||||
__attribute__((packed))
|
__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)
|
||||||
{
|
{
|
||||||
|
@ -657,10 +648,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
|
||||||
|
|
|
@ -33,32 +33,6 @@ struct pkt_file {
|
||||||
SIZE_T buf_len;
|
SIZE_T buf_len;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
#ifdef PLATFORM_OS_XP
|
|
||||||
#ifdef CONFIG_USB_HCI
|
|
||||||
#include <usb.h>
|
|
||||||
#include <usbdlib.h>
|
|
||||||
#include <usbioctl.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_GSPI_HCI
|
|
||||||
#define NR_XMITFRAME 64
|
|
||||||
#else
|
|
||||||
#define NR_XMITFRAME 128
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ETH_ALEN 6
|
|
||||||
|
|
||||||
extern NDIS_STATUS rtw_xmit_entry(
|
|
||||||
IN _nic_hdl cnxt,
|
|
||||||
IN NDIS_PACKET *pkt,
|
|
||||||
IN UINT flags
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
#define NR_XMITFRAME 256
|
#define NR_XMITFRAME 256
|
||||||
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -37,12 +37,6 @@
|
||||||
#include <pci_osintf.h>
|
#include <pci_osintf.h>
|
||||||
#include <pci_hal.h>
|
#include <pci_hal.h>
|
||||||
|
|
||||||
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
|
||||||
|
|
||||||
#error "Shall be Linux or Windows, but not both!\n"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
extern int rtw_ht_enable;
|
extern int rtw_ht_enable;
|
||||||
extern int rtw_cbw40_enable;
|
extern int rtw_cbw40_enable;
|
||||||
|
|
|
@ -40,12 +40,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_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
extern int rtw_ht_enable;
|
extern int rtw_ht_enable;
|
||||||
extern int rtw_cbw40_enable;
|
extern int rtw_cbw40_enable;
|
||||||
|
|
|
@ -103,10 +103,6 @@ inline u8* _rtw_vmalloc(u32 sz)
|
||||||
pbuf = malloc(sz,M_DEVBUF,M_NOWAIT);
|
pbuf = malloc(sz,M_DEVBUF,M_NOWAIT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
NdisAllocateMemoryWithTag(&pbuf,sz, RT_TAG);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DBG_MEMORY_LEAK
|
#ifdef DBG_MEMORY_LEAK
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
if ( pbuf != NULL) {
|
if ( pbuf != NULL) {
|
||||||
|
@ -130,12 +126,6 @@ inline u8* _rtw_zvmalloc(u32 sz)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
pbuf = malloc(sz,M_DEVBUF,M_ZERO|M_NOWAIT);
|
pbuf = malloc(sz,M_DEVBUF,M_ZERO|M_NOWAIT);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
NdisAllocateMemoryWithTag(&pbuf,sz, RT_TAG);
|
|
||||||
if (pbuf != NULL)
|
|
||||||
NdisFillMemory(pbuf, sz, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return pbuf;
|
return pbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,10 +137,6 @@ inline void _rtw_vmfree(u8 *pbuf, u32 sz)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
free(pbuf,M_DEVBUF);
|
free(pbuf,M_DEVBUF);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
NdisFreeMemory(pbuf,sz, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DBG_MEMORY_LEAK
|
#ifdef DBG_MEMORY_LEAK
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
atomic_dec(&_malloc_cnt);
|
atomic_dec(&_malloc_cnt);
|
||||||
|
@ -176,12 +162,6 @@ u8* _rtw_malloc(u32 sz)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
pbuf = malloc(sz,M_DEVBUF,M_NOWAIT);
|
pbuf = malloc(sz,M_DEVBUF,M_NOWAIT);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisAllocateMemoryWithTag(&pbuf,sz, RT_TAG);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DBG_MEMORY_LEAK
|
#ifdef DBG_MEMORY_LEAK
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
if ( pbuf != NULL) {
|
if ( pbuf != NULL) {
|
||||||
|
@ -208,11 +188,6 @@ u8* _rtw_zmalloc(u32 sz)
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
memset(pbuf, 0, sz);
|
memset(pbuf, 0, sz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
NdisFillMemory(pbuf, sz, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return pbuf;
|
return pbuf;
|
||||||
|
@ -234,11 +209,6 @@ void _rtw_mfree(u8 *pbuf, u32 sz)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
free(pbuf,M_DEVBUF);
|
free(pbuf,M_DEVBUF);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisFreeMemory(pbuf,sz, 0);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DBG_MEMORY_LEAK
|
#ifdef DBG_MEMORY_LEAK
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
|
@ -799,12 +769,6 @@ void _rtw_memcpy(void* dst, void* src, u32 sz)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisMoveMemory(dst, src, sz);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int _rtw_memcmp(void *dst, void *src, u32 sz)
|
int _rtw_memcmp(void *dst, void *src, u32 sz)
|
||||||
|
@ -820,18 +784,6 @@ int _rtw_memcmp(void *dst, void *src, u32 sz)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
//under Windows, the return value of NdisEqualMemory for two same mem. chunk is 1
|
|
||||||
|
|
||||||
if (NdisEqualMemory (dst, src, sz))
|
|
||||||
return _TRUE;
|
|
||||||
else
|
|
||||||
return _FALSE;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_memset(void *pbuf, int c, u32 sz)
|
void _rtw_memset(void *pbuf, int c, u32 sz)
|
||||||
|
@ -843,15 +795,6 @@ void _rtw_memset(void *pbuf, int c, u32 sz)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
#if 0
|
|
||||||
NdisZeroMemory(pbuf, sz);
|
|
||||||
if (c != 0) memset(pbuf, c, sz);
|
|
||||||
#else
|
|
||||||
NdisFillMemory(pbuf, sz, c);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
|
@ -877,12 +820,6 @@ void _rtw_init_listhead(_list *list)
|
||||||
list->next = list;
|
list->next = list;
|
||||||
list->prev = list;
|
list->prev = list;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisInitializeListHead(list);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -910,18 +847,6 @@ u32 rtw_is_list_empty(_list *phead)
|
||||||
return _FALSE;
|
return _FALSE;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
if (IsListEmpty(phead))
|
|
||||||
return _TRUE;
|
|
||||||
else
|
|
||||||
return _FALSE;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_list_insert_head(_list *plist, _list *phead)
|
void rtw_list_insert_head(_list *plist, _list *phead)
|
||||||
|
@ -935,9 +860,6 @@ void rtw_list_insert_head(_list *plist, _list *phead)
|
||||||
__list_add(plist, phead, phead->next);
|
__list_add(plist, phead, phead->next);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
InsertHeadList(phead, plist);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_list_insert_tail(_list *plist, _list *phead)
|
void rtw_list_insert_tail(_list *plist, _list *phead)
|
||||||
|
@ -953,12 +875,6 @@ void rtw_list_insert_tail(_list *plist, _list *phead)
|
||||||
__list_add(plist, phead->prev, phead);
|
__list_add(plist, phead->prev, phead);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
InsertTailList(phead, plist);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1120,12 +1036,6 @@ void _rtw_spinlock_init(_lock *plock)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
mtx_init(plock, "", NULL, MTX_DEF|MTX_RECURSE);
|
mtx_init(plock, "", NULL, MTX_DEF|MTX_RECURSE);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisAllocateSpinLock(plock);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_spinlock_free(_lock *plock)
|
void _rtw_spinlock_free(_lock *plock)
|
||||||
|
@ -1134,12 +1044,6 @@ void _rtw_spinlock_free(_lock *plock)
|
||||||
mtx_destroy(plock);
|
mtx_destroy(plock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisFreeSpinLock(plock);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
extern PADAPTER prtw_lock;
|
extern PADAPTER prtw_lock;
|
||||||
|
@ -1175,11 +1079,6 @@ void _rtw_spinlock(_lock *plock)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
mtx_lock(plock);
|
mtx_lock(plock);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisAcquireSpinLock(plock);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1194,11 +1093,6 @@ void _rtw_spinunlock(_lock *plock)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
mtx_unlock(plock);
|
mtx_unlock(plock);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisReleaseSpinLock(plock);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1213,12 +1107,6 @@ void _rtw_spinlock_ex(_lock *plock)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
mtx_lock(plock);
|
mtx_lock(plock);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisDprAcquireSpinLock(plock);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_spinunlock_ex(_lock *plock)
|
void _rtw_spinunlock_ex(_lock *plock)
|
||||||
|
@ -1232,11 +1120,6 @@ void _rtw_spinunlock_ex(_lock *plock)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
mtx_unlock(plock);
|
mtx_unlock(plock);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisDprReleaseSpinLock(plock);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1276,11 +1159,6 @@ u32 rtw_get_current_time(void)
|
||||||
getmicrotime(&tvp);
|
getmicrotime(&tvp);
|
||||||
return tvp.tv_sec;
|
return tvp.tv_sec;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
LARGE_INTEGER SystemTime;
|
|
||||||
NdisGetCurrentSystemTime(&SystemTime);
|
|
||||||
return (u32)(SystemTime.LowPart);// count of 100-nanosecond intervals
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline u32 rtw_systime_to_ms(u32 systime)
|
inline u32 rtw_systime_to_ms(u32 systime)
|
||||||
|
@ -1291,9 +1169,6 @@ inline u32 rtw_systime_to_ms(u32 systime)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
return systime * 1000;
|
return systime * 1000;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
return systime / 10000 ;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline u32 rtw_ms_to_systime(u32 ms)
|
inline u32 rtw_ms_to_systime(u32 ms)
|
||||||
|
@ -1304,9 +1179,6 @@ inline u32 rtw_ms_to_systime(u32 ms)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
return ms /1000;
|
return ms /1000;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
return ms * 10000 ;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// the input parameter start use the same unit as returned by rtw_get_current_time
|
// the input parameter start use the same unit as returned by rtw_get_current_time
|
||||||
|
@ -1318,11 +1190,6 @@ inline s32 rtw_get_passing_time_ms(u32 start)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
return rtw_systime_to_ms(rtw_get_current_time());
|
return rtw_systime_to_ms(rtw_get_current_time());
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
LARGE_INTEGER SystemTime;
|
|
||||||
NdisGetCurrentSystemTime(&SystemTime);
|
|
||||||
return rtw_systime_to_ms((u32)(SystemTime.LowPart) - start) ;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline s32 rtw_get_time_interval_ms(u32 start, u32 end)
|
inline s32 rtw_get_time_interval_ms(u32 start, u32 end)
|
||||||
|
@ -1333,9 +1200,6 @@ inline s32 rtw_get_time_interval_ms(u32 start, u32 end)
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
return rtw_systime_to_ms(rtw_get_current_time());
|
return rtw_systime_to_ms(rtw_get_current_time());
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
return rtw_systime_to_ms(end-start);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1361,13 +1225,6 @@ void rtw_sleep_schedulable(int ms)
|
||||||
DELAY(ms*1000);
|
DELAY(ms*1000);
|
||||||
return ;
|
return ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisMSleep(ms*1000); //(us)*1000=(ms)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1384,14 +1241,8 @@ void rtw_msleep_os(int ms)
|
||||||
DELAY(ms*1000);
|
DELAY(ms*1000);
|
||||||
return ;
|
return ;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisMSleep(ms*1000); //(us)*1000=(ms)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_usleep_os(int us)
|
void rtw_usleep_os(int us)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1410,66 +1261,20 @@ void rtw_usleep_os(int us)
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisMSleep(us); //(us)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef DBG_DELAY_OS
|
#ifdef DBG_DELAY_OS
|
||||||
void _rtw_mdelay_os(int ms, const char *func, const int line)
|
void _rtw_mdelay_os(int ms, const char *func, const int line)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
if(ms>10)
|
|
||||||
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
|
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
|
||||||
rtw_msleep_os(ms);
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
|
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX)
|
|
||||||
|
|
||||||
mdelay((unsigned long)ms);
|
mdelay((unsigned long)ms);
|
||||||
|
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
|
|
||||||
NdisStallExecution(ms*1000); //(us)*1000=(ms)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_udelay_os(int us, const char *func, const int line)
|
void _rtw_udelay_os(int us, const char *func, const int line)
|
||||||
{
|
{
|
||||||
|
|
||||||
#if 0
|
|
||||||
if(us > 1000) {
|
|
||||||
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, us);
|
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, us);
|
||||||
rtw_usleep_os(us);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
DBG_871X("%s:%d %s(%d)\n", func, line, __FUNCTION__, us);
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX)
|
|
||||||
|
|
||||||
udelay((unsigned long)us);
|
udelay((unsigned long)us);
|
||||||
|
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
|
|
||||||
NdisStallExecution(us); //(us)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void rtw_mdelay_os(int ms)
|
void rtw_mdelay_os(int ms)
|
||||||
|
@ -1484,12 +1289,6 @@ void rtw_mdelay_os(int ms)
|
||||||
DELAY(ms*1000);
|
DELAY(ms*1000);
|
||||||
return ;
|
return ;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisStallExecution(ms*1000); //(us)*1000=(ms)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
void rtw_udelay_os(int us)
|
void rtw_udelay_os(int us)
|
||||||
|
@ -1505,12 +1304,6 @@ void rtw_udelay_os(int us)
|
||||||
DELAY(us);
|
DELAY(us);
|
||||||
return ;
|
return ;
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
|
|
||||||
NdisStallExecution(us); //(us)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1522,9 +1315,6 @@ void rtw_yield_os()
|
||||||
#ifdef PLATFORM_FREEBSD
|
#ifdef PLATFORM_FREEBSD
|
||||||
yield();
|
yield();
|
||||||
#endif
|
#endif
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
SwitchToThread();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RTW_SUSPEND_LOCK_NAME "rtw_wifi"
|
#define RTW_SUSPEND_LOCK_NAME "rtw_wifi"
|
||||||
|
@ -1613,8 +1403,6 @@ inline void ATOMIC_SET(ATOMIC_T *v, int i)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
atomic_set(v,i);
|
atomic_set(v,i);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
*v=i;// other choice????
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_set_int(v,i);
|
atomic_set_int(v,i);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1624,8 +1412,6 @@ inline int ATOMIC_READ(ATOMIC_T *v)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
return atomic_read(v);
|
return atomic_read(v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
return *v; // other choice????
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
return atomic_load_acq_32(v);
|
return atomic_load_acq_32(v);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1635,8 +1421,6 @@ inline void ATOMIC_ADD(ATOMIC_T *v, int i)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
atomic_add(i,v);
|
atomic_add(i,v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
InterlockedAdd(v,i);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_add_int(v,i);
|
atomic_add_int(v,i);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1645,8 +1429,6 @@ inline void ATOMIC_SUB(ATOMIC_T *v, int i)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
atomic_sub(i,v);
|
atomic_sub(i,v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
InterlockedAdd(v,-i);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_subtract_int(v,i);
|
atomic_subtract_int(v,i);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1656,8 +1438,6 @@ inline void ATOMIC_INC(ATOMIC_T *v)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
atomic_inc(v);
|
atomic_inc(v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
InterlockedIncrement(v);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_add_int(v,1);
|
atomic_add_int(v,1);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1667,8 +1447,6 @@ inline void ATOMIC_DEC(ATOMIC_T *v)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
atomic_dec(v);
|
atomic_dec(v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
InterlockedDecrement(v);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_subtract_int(v,1);
|
atomic_subtract_int(v,1);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1678,8 +1456,6 @@ inline int ATOMIC_ADD_RETURN(ATOMIC_T *v, int i)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
return atomic_add_return(i,v);
|
return atomic_add_return(i,v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
return InterlockedAdd(v,i);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_add_int(v,i);
|
atomic_add_int(v,i);
|
||||||
return atomic_load_acq_32(v);
|
return atomic_load_acq_32(v);
|
||||||
|
@ -1690,8 +1466,6 @@ inline int ATOMIC_SUB_RETURN(ATOMIC_T *v, int i)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
return atomic_sub_return(i,v);
|
return atomic_sub_return(i,v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
return InterlockedAdd(v,-i);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_subtract_int(v,i);
|
atomic_subtract_int(v,i);
|
||||||
return atomic_load_acq_32(v);
|
return atomic_load_acq_32(v);
|
||||||
|
@ -1702,8 +1476,6 @@ inline int ATOMIC_INC_RETURN(ATOMIC_T *v)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
return atomic_inc_return(v);
|
return atomic_inc_return(v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
return InterlockedIncrement(v);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_add_int(v,1);
|
atomic_add_int(v,1);
|
||||||
return atomic_load_acq_32(v);
|
return atomic_load_acq_32(v);
|
||||||
|
@ -1714,8 +1486,6 @@ inline int ATOMIC_DEC_RETURN(ATOMIC_T *v)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
return atomic_dec_return(v);
|
return atomic_dec_return(v);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
return InterlockedDecrement(v);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
atomic_subtract_int(v,1);
|
atomic_subtract_int(v,1);
|
||||||
return atomic_load_acq_32(v);
|
return atomic_load_acq_32(v);
|
||||||
|
@ -2170,8 +1940,6 @@ u64 rtw_modular64(u64 x, u64 y)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
return do_div(x, y);
|
return do_div(x, y);
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
return (x % y);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
return (x %y);
|
return (x %y);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2182,8 +1950,6 @@ u64 rtw_division64(u64 x, u64 y)
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
do_div(x, y);
|
do_div(x, y);
|
||||||
return x;
|
return x;
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
|
||||||
return (x / y);
|
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
return (x / y);
|
return (x / y);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue