mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 15:39:38 +00:00
rtl8188eu: Remove the PLATFORM_LINUX tests
This configuration parameter is always selected. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
dd606233f2
commit
62ef49de15
46 changed files with 6 additions and 870 deletions
|
@ -1222,7 +1222,6 @@ Efuse_InitSomeVar(
|
|||
_rtw_memset((PVOID)&fakeBTEfuseModifiedMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
//#include <rtw_eeprom.h>
|
||||
|
||||
|
@ -1278,6 +1277,3 @@ int retriveAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv)
|
|||
return ret;
|
||||
}
|
||||
#endif //CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
|
||||
|
|
|
@ -1538,9 +1538,7 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||
{
|
||||
eid = in_ie[cnt];
|
||||
if ((in_len < 0) || (cnt > MAX_IE_SZ)) {
|
||||
#ifdef PLATFORM_LINUX
|
||||
dump_stack();
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
if( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], p2p_oui, 4) == _TRUE ) )
|
||||
|
|
|
@ -277,18 +277,11 @@ _func_enter_;
|
|||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==_TRUE ) )
|
||||
lifetime = 1;
|
||||
|
||||
if(!isfreeall)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
if (!isfreeall) {
|
||||
delta_time = (curr_time -pnetwork->last_scanned)/HZ;
|
||||
|
||||
if(delta_time < lifetime)// unit:sec
|
||||
{
|
||||
if (delta_time < lifetime)// unit:sec
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
_enter_critical_bh(&free_queue->lock, &irqL);
|
||||
|
|
|
@ -9930,7 +9930,6 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
|
|||
chplan_ap.Len = i;
|
||||
|
||||
#ifdef CONFIG_DEBUG_RTL871X
|
||||
#ifdef PLATFORM_LINUX
|
||||
i = 0;
|
||||
DBG_871X("%s: AP[%s] channel plan {", __func__, bssid->Ssid.Ssid);
|
||||
while ((i < chplan_ap.Len) && (chplan_ap.Channel[i] != 0))
|
||||
|
@ -9939,12 +9938,10 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
|
|||
i++;
|
||||
}
|
||||
DBG_871X("}\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_rtw_memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta));
|
||||
#ifdef CONFIG_DEBUG_RTL871X
|
||||
#ifdef PLATFORM_LINUX
|
||||
i = 0;
|
||||
DBG_871X("%s: STA channel plan {", __func__);
|
||||
while ((i < MAX_CHANNEL_NUM) && (chplan_sta[i].ChannelNum != 0))
|
||||
|
@ -9953,7 +9950,6 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
|
|||
i++;
|
||||
}
|
||||
DBG_871X("}\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_rtw_memset(pmlmeext->channel_set, 0, sizeof(pmlmeext->channel_set));
|
||||
|
@ -10106,7 +10102,6 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
|
|||
pmlmeext->update_channel_plan_by_ap_done = 1;
|
||||
|
||||
#ifdef CONFIG_DEBUG_RTL871X
|
||||
#ifdef PLATFORM_LINUX
|
||||
k = 0;
|
||||
DBG_871X("%s: new STA channel plan {", __func__);
|
||||
while ((k < MAX_CHANNEL_NUM) && (chplan_new[k].ChannelNum != 0))
|
||||
|
@ -10115,24 +10110,6 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
|
|||
k++;
|
||||
}
|
||||
DBG_871X("}\n");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// recover the right channel index
|
||||
channel = chplan_sta[pmlmeext->sitesurvey_res.channel_idx].ChannelNum;
|
||||
k = 0;
|
||||
while ((k < MAX_CHANNEL_NUM) && (chplan_new[k].ChannelNum != 0))
|
||||
{
|
||||
if (chplan_new[k].ChannelNum == channel) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
|
||||
("%s: change mlme_ext sitesurvey channel index from %d to %d\n",
|
||||
__FUNCTION__, pmlmeext->sitesurvey_res.channel_idx, k));
|
||||
pmlmeext->sitesurvey_res.channel_idx = k;
|
||||
break;
|
||||
}
|
||||
k++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -2881,11 +2881,9 @@ NDIS_STATUS oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv)
|
|||
#endif
|
||||
u8 bpwrup;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -2901,10 +2899,8 @@ _func_enter_;
|
|||
|
||||
bpwrup = *(u8 *)poid_par_priv->information_buf;
|
||||
//CALL the power_down function
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if defined(CONFIG_RTL8712) //Linux MP insmod unknown symbol
|
||||
dev_power_down(padapter,bpwrup);
|
||||
#endif
|
||||
#endif
|
||||
_irqlevel_changed_(&oldirql, RAISE);
|
||||
|
||||
|
|
|
@ -1487,9 +1487,7 @@ _func_enter_;
|
|||
#endif // CONFIG_LPS_RPWM_TIMER
|
||||
#endif // CONFIG_LPS_LCLK
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_init_timer(&(pwrctrlpriv->pwr_state_check_timer), padapter->pnetdev, pwr_state_check_handler, (u8 *)padapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
_init_workitem(&pwrctrlpriv->resume_work, resume_workitem_callback, NULL);
|
||||
|
|
|
@ -128,9 +128,7 @@ _func_enter_;
|
|||
res = rtw_hal_init_recv_priv(padapter);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#ifdef PLATFORM_LINUX
|
||||
_init_timer(&precvpriv->signal_stat_timer, padapter->pnetdev, RTW_TIMER_HDL_NAME(signal_stat), padapter);
|
||||
#endif
|
||||
|
||||
precvpriv->signal_stat_sampling_interval = 1000; //ms
|
||||
//precvpriv->signal_stat_converging_constant = 5000; //ms
|
||||
|
@ -2542,7 +2540,6 @@ _func_exit_;
|
|||
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
#ifdef PLATFORM_LINUX
|
||||
static void recvframe_expand_pkt(
|
||||
PADAPTER padapter,
|
||||
union recv_frame *prframe)
|
||||
|
@ -2591,9 +2588,6 @@ static void recvframe_expand_pkt(
|
|||
pfhdr->rx_tail = skb_tail_pointer(ppkt);
|
||||
pfhdr->rx_end = skb_end_pointer(ppkt);
|
||||
}
|
||||
#else
|
||||
#warning "recvframe_expand_pkt not implement, defrag may crash system"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//perform defrag
|
||||
|
|
|
@ -3071,9 +3071,7 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
|||
}
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
void rtw_use_tkipkey_handler(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ void sreset_stop_adapter(_adapter *padapter)
|
|||
rtw_cancel_all_timer(padapter);
|
||||
|
||||
/* TODO: OS and HCI independent */
|
||||
#if defined(PLATFORM_LINUX) && defined(CONFIG_USB_HCI)
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
tasklet_kill(&pxmitpriv->xmit_tasklet);
|
||||
#endif
|
||||
|
||||
|
@ -300,7 +300,7 @@ void sreset_start_adapter(_adapter *padapter)
|
|||
}
|
||||
|
||||
/* TODO: OS and HCI independent */
|
||||
#if defined(PLATFORM_LINUX) && defined(CONFIG_USB_HCI)
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2542,9 +2542,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)//(_queue *pf
|
|||
struct xmit_frame *pxframe = NULL;
|
||||
_list *plist, *phead;
|
||||
_queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;
|
||||
#ifdef PLATFORM_LINUX
|
||||
_adapter *padapter = pxmitpriv->adapter;
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -4243,9 +4241,7 @@ void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms)
|
|||
{
|
||||
sctx->timeout_ms = timeout_ms;
|
||||
sctx->submit_time= rtw_get_current_time();
|
||||
#ifdef PLATFORM_LINUX /* TODO: add condition wating interface for other os */
|
||||
init_completion(&sctx->done);
|
||||
#endif
|
||||
sctx->status = RTW_SCTX_SUBMITTED;
|
||||
}
|
||||
|
||||
|
@ -4255,7 +4251,6 @@ int rtw_sctx_wait(struct submit_ctx *sctx)
|
|||
unsigned long expire;
|
||||
int status = 0;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
expire= sctx->timeout_ms ? msecs_to_jiffies(sctx->timeout_ms) : MAX_SCHEDULE_TIMEOUT;
|
||||
if (!wait_for_completion_timeout(&sctx->done, expire)) {
|
||||
/* timeout, do something?? */
|
||||
|
@ -4264,7 +4259,6 @@ int rtw_sctx_wait(struct submit_ctx *sctx)
|
|||
} else {
|
||||
status = sctx->status;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (status == RTW_SCTX_DONE_SUCCESS) {
|
||||
ret = _SUCCESS;
|
||||
|
@ -4294,9 +4288,7 @@ void rtw_sctx_done_err(struct submit_ctx **sctx, int status)
|
|||
if (rtw_sctx_chk_waring_status(status))
|
||||
DBG_871X("%s status:%d\n", __func__, status);
|
||||
(*sctx)->status = status;
|
||||
#ifdef PLATFORM_LINUX
|
||||
complete(&((*sctx)->done));
|
||||
#endif
|
||||
*sctx = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8956,14 +8956,9 @@ GetPSDData(
|
|||
//Read PSD report, Reg8B4[15:0]
|
||||
psd_report = ODM_GetBBReg(pDM_Odm,0x8B4, bMaskDWord) & 0x0000FFFF;
|
||||
|
||||
#if 1//(DEV_BUS_TYPE == RT_PCI_INTERFACE) && ( (RT_PLATFORM == PLATFORM_LINUX) || (RT_PLATFORM == PLATFORM_MACOSX))
|
||||
psd_report = (u4Byte) (ConvertTo_dB(psd_report))+(u4Byte)(initial_gain_psd-0x1c);
|
||||
#else
|
||||
psd_report = (int) (20*log10((double)psd_report))+(int)(initial_gain_psd-0x1c);
|
||||
#endif
|
||||
|
||||
return psd_report;
|
||||
|
||||
}
|
||||
|
||||
u4Byte
|
||||
|
|
|
@ -1109,9 +1109,6 @@ typedef enum _ANT_DIV_TYPE
|
|||
// 2011/09/22 MH Copy from SD4 defined structure. We use to support PHY DM integration.
|
||||
//
|
||||
#if(DM_ODM_SUPPORT_TYPE & ODM_MP)
|
||||
#if (RT_PLATFORM != PLATFORM_LINUX)
|
||||
typedef
|
||||
#endif
|
||||
struct DM_Out_Source_Dynamic_Mechanism_Structure
|
||||
#else// for AP,ADSL,CE Team
|
||||
typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
|
||||
|
@ -1414,11 +1411,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
|
|||
|
||||
#if(DM_ODM_SUPPORT_TYPE & ODM_MP)
|
||||
|
||||
#if (RT_PLATFORM != PLATFORM_LINUX)
|
||||
} DM_ODM_T, *PDM_ODM_T; // DM_Dynamic_Mechanism_Structure
|
||||
#else
|
||||
};
|
||||
#endif
|
||||
|
||||
#else// for AP,ADSL,CE Team
|
||||
} DM_ODM_T, *PDM_ODM_T; // DM_Dynamic_Mechanism_Structure
|
||||
|
|
|
@ -149,10 +149,7 @@ static void dm_CheckPbcGPIO(_adapter *padapter)
|
|||
{ // 0 is the default value and it means the application monitors the HW PBC doesn't privde its pid to driver.
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
rtw_signal_process(padapter->pid[0], SIGUSR1);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,12 +125,9 @@ s32 rtl8188es_init_recv_priv(PADAPTER padapter)
|
|||
goto initbuferror;
|
||||
|
||||
//3 2. init tasklet
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_init(&precvpriv->recv_tasklet,
|
||||
(void(*)(unsigned long))rtl8188es_recv_tasklet,
|
||||
(unsigned long)padapter);
|
||||
#endif
|
||||
|
||||
goto exit;
|
||||
|
||||
initbuferror:
|
||||
|
@ -174,9 +171,7 @@ void rtl8188es_free_recv_priv(PADAPTER padapter)
|
|||
precvpriv = &padapter->recvpriv;
|
||||
|
||||
//3 1. kill tasklet
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_kill(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
|
||||
//3 2. free all recv buffers
|
||||
precvbuf = (struct recv_buf*)precvpriv->precv_buf;
|
||||
|
@ -347,9 +342,7 @@ static void rtl8188es_recv_tasklet(void *priv)
|
|||
|
||||
// The case of can't allocte recvframe should be temporary,
|
||||
// schedule again and hope recvframe is available next time.
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -599,9 +592,7 @@ static s32 pre_recv_entry(union recv_frame *precvframe, struct recv_buf *precvbu
|
|||
// The case of can't allocte skb is serious and may never be recovered,
|
||||
// once bDriverStopped is enable, this task should be stopped.
|
||||
if (secondary_padapter->bDriverStopped == _FALSE)
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
pkt_copy->dev = secondary_padapter->pnetdev;
|
||||
|
@ -690,9 +681,7 @@ static void rtl8188es_recv_tasklet(void *priv)
|
|||
|
||||
// The case of can't allocte recvframe should be temporary,
|
||||
// schedule again and hope recvframe is available next time.
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -738,9 +727,7 @@ static void rtl8188es_recv_tasklet(void *priv)
|
|||
// The case of can't allocte skb is serious and may never be recovered,
|
||||
// once bDriverStopped is enable, this task should be stopped.
|
||||
if (padapter->bDriverStopped == _FALSE) {
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -1672,11 +1672,9 @@ s32 rtl8188es_init_xmit_priv(PADAPTER padapter)
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
#ifdef CONFIG_SDIO_TX_TASKLET
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_init(&pxmitpriv->xmit_tasklet,
|
||||
(void(*)(unsigned long))rtl8188es_xmit_tasklet,
|
||||
(unsigned long)padapter);
|
||||
#endif
|
||||
#else //CONFIG_SDIO_TX_TASKLET
|
||||
|
||||
_rtw_init_sema(&pxmitpriv->SdioXmitSema, 0);
|
||||
|
|
|
@ -1583,9 +1583,7 @@ static void sd_rxhandler(PADAPTER padapter, struct recv_buf *precvbuf)
|
|||
rtw_enqueue_recvbuf(precvbuf, ppending_queue);
|
||||
|
||||
//3 2. schedule tasklet
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sd_int_dpc(PADAPTER padapter)
|
||||
|
|
|
@ -63,21 +63,17 @@ int rtl8188eu_init_recv_priv(_adapter *padapter)
|
|||
_rtw_init_sema(&precvpriv->terminate_recvthread_sema, 0);//will be removed
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_init(&precvpriv->recv_tasklet,
|
||||
(void(*)(unsigned long))rtl8188eu_recv_tasklet,
|
||||
(unsigned long)padapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if(precvpriv->int_in_urb == NULL){
|
||||
res= _FAIL;
|
||||
DBG_8192C("alloc_urb for interrupt in endpoint fail !!!!\n");
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
precvpriv->int_in_buf = rtw_zmalloc(INTERRUPT_MSG_FORMAT_LEN);
|
||||
if(precvpriv->int_in_buf == NULL){
|
||||
res= _FAIL;
|
||||
|
@ -132,7 +128,6 @@ int rtl8188eu_init_recv_priv(_adapter *padapter)
|
|||
|
||||
precvpriv->free_recv_buf_queue_cnt = NR_RECVBUFF;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
skb_queue_head_init(&precvpriv->rx_skb_queue);
|
||||
|
||||
|
@ -166,12 +161,9 @@ int rtl8188eu_init_recv_priv(_adapter *padapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
exit:
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
void rtl8188eu_free_recv_priv (_adapter *padapter)
|
||||
|
@ -192,19 +184,13 @@ void rtl8188eu_free_recv_priv (_adapter *padapter)
|
|||
rtw_mfree(precvpriv->pallocated_recv_buf, NR_RECVBUFF *sizeof(struct recv_buf) + 4);
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
if(precvpriv->int_in_urb)
|
||||
{
|
||||
usb_free_urb(precvpriv->int_in_urb);
|
||||
}
|
||||
#endif//PLATFORM_LINUX
|
||||
|
||||
if(precvpriv->int_in_buf)
|
||||
rtw_mfree(precvpriv->int_in_buf, INTERRUPT_MSG_FORMAT_LEN);
|
||||
#endif//CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
if (skb_queue_len(&precvpriv->rx_skb_queue)) {
|
||||
DBG_8192C(KERN_WARNING "rx_skb_queue not empty\n");
|
||||
}
|
||||
|
@ -221,8 +207,6 @@ void rtl8188eu_free_recv_priv (_adapter *padapter)
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,11 +33,9 @@ s32 rtl8188eu_init_xmit_priv(_adapter *padapter)
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_init(&pxmitpriv->xmit_tasklet,
|
||||
(void(*)(unsigned long))rtl8188eu_xmit_tasklet,
|
||||
(unsigned long)padapter);
|
||||
#endif
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
pHalData->bEarlyModeEnable = padapter->registrypriv.early_mode;
|
||||
#endif
|
||||
|
@ -51,33 +49,11 @@ void rtl8188eu_free_xmit_priv(_adapter *padapter)
|
|||
|
||||
u8 urb_zero_packet_chk(_adapter *padapter, int sz)
|
||||
{
|
||||
#if 1
|
||||
u8 blnSetTxDescOffset;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
blnSetTxDescOffset = (((sz + TXDESC_SIZE) % pHalData->UsbBulkOutSize) ==0)?1:0;
|
||||
|
||||
#else
|
||||
|
||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
||||
if ( pdvobj->ishighspeed )
|
||||
{
|
||||
if ( ( (sz + TXDESC_SIZE) % 512 ) == 0 ) {
|
||||
blnSetTxDescOffset = 1;
|
||||
} else {
|
||||
blnSetTxDescOffset = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ( (sz + TXDESC_SIZE) % 64 ) == 0 ) {
|
||||
blnSetTxDescOffset = 1;
|
||||
} else {
|
||||
blnSetTxDescOffset = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return blnSetTxDescOffset;
|
||||
|
||||
}
|
||||
|
||||
void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc)
|
||||
|
@ -1215,9 +1191,7 @@ s32 rtl8188eu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmit
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||
#endif
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -1229,18 +1203,15 @@ s32 rtl8188eu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmit
|
|||
|
||||
static void rtl8188eu_hostap_mgnt_xmit_cb(struct urb *urb)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct sk_buff *skb = (struct sk_buff *)urb->context;
|
||||
|
||||
//DBG_8192C("%s\n", __FUNCTION__);
|
||||
|
||||
rtw_skb_free(skb);
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
u16 fc;
|
||||
int rc, len, pipe;
|
||||
unsigned int bmcst, tid, qsel;
|
||||
|
@ -1349,9 +1320,6 @@ s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
|
|||
_exit:
|
||||
|
||||
rtw_skb_free(skb);
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
|
|
@ -1068,88 +1068,6 @@ USB_AggModeSwitch(
|
|||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo);
|
||||
|
||||
//pHalData->UsbRxHighSpeedMode = FALSE;
|
||||
// How to measure the RX speed? We assume that when traffic is more than
|
||||
if (pMgntInfo->bRegAggDMEnable == FALSE)
|
||||
{
|
||||
return; // Inf not support.
|
||||
}
|
||||
|
||||
|
||||
if (pMgntInfo->LinkDetectInfo.bHigherBusyRxTraffic == TRUE &&
|
||||
pHalData->UsbRxHighSpeedMode == FALSE)
|
||||
{
|
||||
pHalData->UsbRxHighSpeedMode = TRUE;
|
||||
RT_TRACE(COMP_INIT, DBG_LOUD, ("UsbAggModeSwitchCheck to HIGH\n"));
|
||||
}
|
||||
else if (pMgntInfo->LinkDetectInfo.bHigherBusyRxTraffic == FALSE &&
|
||||
pHalData->UsbRxHighSpeedMode == TRUE)
|
||||
{
|
||||
pHalData->UsbRxHighSpeedMode = FALSE;
|
||||
RT_TRACE(COMP_INIT, DBG_LOUD, ("UsbAggModeSwitchCheck to LOW\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if USB_RX_AGGREGATION_92C
|
||||
if (pHalData->UsbRxHighSpeedMode == TRUE)
|
||||
{
|
||||
// 2010/12/10 MH The parameter is tested by SD1 engineer and SD3 channel emulator.
|
||||
// USB mode
|
||||
#if (RT_PLATFORM == PLATFORM_LINUX)
|
||||
if (pMgntInfo->LinkDetectInfo.bTxBusyTraffic)
|
||||
{
|
||||
pHalData->RxAggBlockCount = 16;
|
||||
pHalData->RxAggBlockTimeout = 7;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
pHalData->RxAggBlockCount = 40;
|
||||
pHalData->RxAggBlockTimeout = 5;
|
||||
}
|
||||
// Mix mode
|
||||
pHalData->RxAggPageCount = 72;
|
||||
pHalData->RxAggPageTimeout = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
// USB mode
|
||||
pHalData->RxAggBlockCount = pMgntInfo->RegRxAggBlockCount;
|
||||
pHalData->RxAggBlockTimeout = pMgntInfo->RegRxAggBlockTimeout;
|
||||
// Mix mode
|
||||
pHalData->RxAggPageCount = pMgntInfo->RegRxAggPageCount;
|
||||
pHalData->RxAggPageTimeout = pMgntInfo->RegRxAggPageTimeout;
|
||||
}
|
||||
|
||||
if (pHalData->RxAggBlockCount > MAX_RX_AGG_BLKCNT)
|
||||
pHalData->RxAggBlockCount = MAX_RX_AGG_BLKCNT;
|
||||
#if (OS_WIN_FROM_VISTA(OS_VERSION)) || (RT_PLATFORM == PLATFORM_LINUX) // do not support WINXP to prevent usbehci.sys BSOD
|
||||
if (IS_WIRELESS_MODE_N_24G(Adapter) || IS_WIRELESS_MODE_N_5G(Adapter))
|
||||
{
|
||||
//
|
||||
// 2010/12/24 MH According to V1012 QC IOT test, XP BSOD happen when running chariot test
|
||||
// with the aggregation dynamic change!! We need to disable the function to prevent it is broken
|
||||
// in usbehci.sys.
|
||||
//
|
||||
usb_AggSettingRxUpdate_8188E(Adapter);
|
||||
|
||||
// 2010/12/27 MH According to designer's suggstion, we can only modify Timeout value. Otheriwse
|
||||
// there might many HW incorrect behavior, the XP BSOD at usbehci.sys may be relative to the
|
||||
// issue. Base on the newest test, we can not enable block cnt > 30, otherwise XP usbehci.sys may
|
||||
// BSOD.
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
} // USB_AggModeSwitch
|
||||
|
||||
static VOID
|
||||
|
@ -1157,68 +1075,6 @@ _InitOperationMode(
|
|||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
#if 0//gtest
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
u1Byte regBwOpMode = 0;
|
||||
u4Byte regRATR = 0, regRRSR = 0;
|
||||
|
||||
|
||||
//1 This part need to modified according to the rate set we filtered!!
|
||||
//
|
||||
// Set RRSR, RATR, and REG_BWOPMODE registers
|
||||
//
|
||||
switch(Adapter->RegWirelessMode)
|
||||
{
|
||||
case WIRELESS_MODE_B:
|
||||
regBwOpMode = BW_OPMODE_20MHZ;
|
||||
regRATR = RATE_ALL_CCK;
|
||||
regRRSR = RATE_ALL_CCK;
|
||||
break;
|
||||
case WIRELESS_MODE_A:
|
||||
regBwOpMode = BW_OPMODE_5G |BW_OPMODE_20MHZ;
|
||||
regRATR = RATE_ALL_OFDM_AG;
|
||||
regRRSR = RATE_ALL_OFDM_AG;
|
||||
break;
|
||||
case WIRELESS_MODE_G:
|
||||
regBwOpMode = BW_OPMODE_20MHZ;
|
||||
regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
|
||||
regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
|
||||
break;
|
||||
case WIRELESS_MODE_AUTO:
|
||||
if (Adapter->bInHctTest)
|
||||
{
|
||||
regBwOpMode = BW_OPMODE_20MHZ;
|
||||
regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
|
||||
regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
|
||||
}
|
||||
else
|
||||
{
|
||||
regBwOpMode = BW_OPMODE_20MHZ;
|
||||
regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG | RATE_ALL_OFDM_1SS | RATE_ALL_OFDM_2SS;
|
||||
regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
|
||||
}
|
||||
break;
|
||||
case WIRELESS_MODE_N_24G:
|
||||
// It support CCK rate by default.
|
||||
// CCK rate will be filtered out only when associated AP does not support it.
|
||||
regBwOpMode = BW_OPMODE_20MHZ;
|
||||
regRATR = RATE_ALL_CCK | RATE_ALL_OFDM_AG | RATE_ALL_OFDM_1SS | RATE_ALL_OFDM_2SS;
|
||||
regRRSR = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
|
||||
break;
|
||||
case WIRELESS_MODE_N_5G:
|
||||
regBwOpMode = BW_OPMODE_5G;
|
||||
regRATR = RATE_ALL_OFDM_AG | RATE_ALL_OFDM_1SS | RATE_ALL_OFDM_2SS;
|
||||
regRRSR = RATE_ALL_OFDM_AG;
|
||||
break;
|
||||
|
||||
default: //for MacOSX compiler warning.
|
||||
break;
|
||||
}
|
||||
|
||||
// Ziv ????????
|
||||
//PlatformEFIOWrite4Byte(Adapter, REG_INIRTS_RATE_SEL, regRRSR);
|
||||
PlatformEFIOWrite1Byte(Adapter, REG_BWOPMODE, regBwOpMode);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,11 +39,6 @@
|
|||
|
||||
#define CONFIG_RTL8188E
|
||||
|
||||
#define PLATFORM_LINUX
|
||||
|
||||
//#define CONFIG_IOCTL_CFG80211
|
||||
//#define CONFIG_IEEE80211W
|
||||
|
||||
#if defined(CONFIG_PLATFORM_ACTIONS_ATM702X)
|
||||
#ifndef CONFIG_IOCTL_CFG80211
|
||||
#define CONFIG_IOCTL_CFG80211
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
#define _FALSE FALSE
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#include <linux/types.h>
|
||||
#define IN
|
||||
#define OUT
|
||||
|
@ -65,8 +63,6 @@
|
|||
typedef __kernel_ssize_t SSIZE_T;
|
||||
#define FIELD_OFFSET(s,field) ((SSIZE_T)&((s*)(0))->field)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T))
|
||||
#define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1)
|
||||
|
|
|
@ -161,13 +161,8 @@
|
|||
* Do the prototypes. Somebody might want to take the
|
||||
* address or some such sick thing..
|
||||
*/
|
||||
#if defined(PLATFORM_LINUX) || (defined (__GLIBC__) && __GLIBC__ >= 2)
|
||||
extern __u32 ntohl(__u32);
|
||||
extern __u32 htonl(__u32);
|
||||
#else //defined(PLATFORM_LINUX) || (defined (__GLIBC__) && __GLIBC__ >= 2)
|
||||
extern unsigned long int ntohl(unsigned long int);
|
||||
extern unsigned long int htonl(unsigned long int);
|
||||
#endif
|
||||
extern unsigned short int ntohs(unsigned short int);
|
||||
extern unsigned short int htons(unsigned short int);
|
||||
|
||||
|
@ -178,13 +173,8 @@ extern unsigned short int htons(unsigned short int);
|
|||
#define ___ntohl(x) __be32_to_cpu(x)
|
||||
#define ___ntohs(x) __be16_to_cpu(x)
|
||||
|
||||
#if defined(PLATFORM_LINUX) || (defined (__GLIBC__) && __GLIBC__ >= 2)
|
||||
#define htonl(x) ___htonl(x)
|
||||
#define ntohl(x) ___ntohl(x)
|
||||
#else
|
||||
#define htonl(x) ((unsigned long)___htonl(x))
|
||||
#define ntohl(x) ((unsigned long)___ntohl(x))
|
||||
#endif
|
||||
#define htons(x) ___htons(x)
|
||||
#define ntohs(x) ___ntohs(x)
|
||||
|
||||
|
|
|
@ -144,14 +144,12 @@ __inline static__ void __swahb32s(__u32 *addr)
|
|||
*/
|
||||
#endif /* __BYTEORDER_HAS_U64__ */
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
#define swahw32 __swahw32
|
||||
#define swahb32 __swahb32
|
||||
#define swahw32p __swahw32p
|
||||
#define swahb32p __swahb32p
|
||||
#define swahw32s __swahw32s
|
||||
#define swahb32s __swahb32s
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_SWABB_H */
|
||||
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
#include <drv_types_ce.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <drv_types_linux.h>
|
||||
#endif
|
||||
|
||||
typedef enum cust_gpio_modes {
|
||||
WLAN_PWDN_ON,
|
||||
|
|
|
@ -31,18 +31,7 @@
|
|||
#include <osdep_service.h>
|
||||
#include <wlan_bssdef.h>
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <drv_types_xp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <drv_types_ce.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <drv_types_linux.h>
|
||||
#endif
|
||||
|
||||
enum _NIC_VERSION {
|
||||
|
||||
|
@ -323,10 +312,8 @@ struct dvobj_priv
|
|||
u8 * usb_vendor_req_buf;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct usb_interface *pusbintf;
|
||||
struct usb_device *pusbdev;
|
||||
#endif//PLATFORM_LINUX
|
||||
|
||||
|
||||
#endif//CONFIG_USB_HCI
|
||||
|
@ -335,7 +322,6 @@ struct dvobj_priv
|
|||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct pci_dev *ppcidev;
|
||||
|
||||
//PCI MEM map
|
||||
|
@ -365,7 +351,6 @@ struct dvobj_priv
|
|||
u8 b_support_aspm; // If it supports ASPM, Offset[560h] = 0x40, otherwise Offset[560h] = 0x00.
|
||||
u8 b_support_backdoor;
|
||||
u8 bdma64;
|
||||
#endif//PLATFORM_LINUX
|
||||
|
||||
#endif//CONFIG_PCI_HCI
|
||||
};
|
||||
|
@ -373,12 +358,9 @@ struct dvobj_priv
|
|||
#define dvobj_to_pwrctl(dvobj) (&(dvobj->pwrctl_priv))
|
||||
#define pwrctl_to_dvobj(pwrctl) container_of(pwrctl, struct dvobj_priv, pwrctl_priv)
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
||||
{
|
||||
/* todo: get interface type from dvobj and the return the dev accordingly */
|
||||
#ifdef RTW_DVOBJ_CHIP_HW_TYPE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
return &dvobj->pusbintf->dev;
|
||||
|
@ -393,7 +375,6 @@ static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
|||
return &dvobj->ppcidev->dev;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
enum _IFACE_TYPE {
|
||||
IFACE_PORT0, //mapping to port0 for C/D series chips
|
||||
|
@ -525,15 +506,9 @@ struct _ADAPTER{
|
|||
_thread_hdl_ xmitThread;
|
||||
_thread_hdl_ recvThread;
|
||||
|
||||
#ifndef PLATFORM_LINUX
|
||||
NDIS_STATUS (*dvobj_init)(struct dvobj_priv *dvobj);
|
||||
void (*dvobj_deinit)(struct dvobj_priv *dvobj);
|
||||
#endif
|
||||
|
||||
void (*intf_start)(_adapter * adapter);
|
||||
void (*intf_stop)(_adapter * adapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_nic_hdl pnetdev;
|
||||
|
||||
// used by rtw_rereg_nd_name related function
|
||||
|
@ -554,8 +529,6 @@ struct _ADAPTER{
|
|||
struct wireless_dev *rtw_wdev;
|
||||
#endif //CONFIG_IOCTL_CFG80211
|
||||
|
||||
#endif //end of PLATFORM_LINUX
|
||||
|
||||
int net_closed;
|
||||
|
||||
u8 bFWReady;
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
#include <basic_types.h>
|
||||
|
||||
// SPI Header Files
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/spi/spi.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct gspi_data
|
||||
|
@ -37,12 +35,10 @@ typedef struct gspi_data
|
|||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct spi_device *func;
|
||||
|
||||
struct workqueue_struct *priv_wq;
|
||||
struct delayed_work irq_work;
|
||||
#endif
|
||||
} GSPI_DATA, *PGSPI_DATA;
|
||||
|
||||
#endif // #ifndef __DRV_TYPES_GSPI_H__
|
||||
|
|
|
@ -24,17 +24,7 @@
|
|||
#include <basic_types.h>
|
||||
|
||||
// SDIO Header Files
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <wdm.h>
|
||||
#include <ntddsd.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdcardddk.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct sdio_data
|
||||
{
|
||||
|
@ -44,27 +34,8 @@ typedef struct sdio_data
|
|||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct sdio_func *func;
|
||||
_thread_hdl_ sys_sdio_irq_thd;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PDEVICE_OBJECT pphysdevobj;
|
||||
PDEVICE_OBJECT pfuncdevobj;
|
||||
PDEVICE_OBJECT pnextdevobj;
|
||||
SDBUS_INTERFACE_STANDARD sdbusinft;
|
||||
u8 nextdevstacksz;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
SD_DEVICE_HANDLE hDevice;
|
||||
SD_CARD_RCA sd_rca;
|
||||
SD_CARD_INTERFACE card_intf;
|
||||
BOOLEAN enableIsarWithStatus;
|
||||
WCHAR active_path[MAX_ACTIVE_REG_PATH];
|
||||
SD_HOST_BLOCK_CAPABILITY sd_host_blk_cap;
|
||||
#endif
|
||||
} SDIO_DATA, *PSDIO_DATA;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,12 +28,7 @@
|
|||
#include <drv_types.h>
|
||||
#include "wifi.h"
|
||||
|
||||
#if defined PLATFORM_OS_XP
|
||||
#include <ntstrsafe.h>
|
||||
#endif
|
||||
#if defined PLATFORM_LINUX
|
||||
#include <linux/wireless.h>
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include <list.h>
|
||||
|
@ -753,8 +748,6 @@ struct ieee80211_softmac_stats{
|
|||
#define BIP_AAD_SIZE 20
|
||||
#endif //CONFIG_IEEE80211W
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
struct ieee80211_security {
|
||||
u16 active_key:2,
|
||||
enabled:1,
|
||||
|
@ -767,8 +760,6 @@ struct ieee80211_security {
|
|||
u16 flags;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
802.11 data frame from AP
|
||||
|
@ -809,8 +800,6 @@ struct ieee80211_header_data {
|
|||
#define MFIE_TYPE_RATES_EX 50
|
||||
#define MFIE_TYPE_GENERIC 221
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
struct ieee80211_info_element_hdr {
|
||||
u8 id;
|
||||
u8 len;
|
||||
|
@ -821,7 +810,6 @@ struct ieee80211_info_element {
|
|||
u8 len;
|
||||
u8 data[0];
|
||||
} __attribute__ ((packed));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* These are the data types that can make up management packets
|
||||
|
@ -844,9 +832,6 @@ struct ieee80211_info_element {
|
|||
#define IEEE80211_DEFAULT_BASIC_RATE 10
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
|
||||
struct ieee80211_authentication {
|
||||
struct ieee80211_header_data header;
|
||||
u16 algorithm;
|
||||
|
@ -855,7 +840,6 @@ struct ieee80211_authentication {
|
|||
//struct ieee80211_info_element_hdr info_element;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
struct ieee80211_probe_response {
|
||||
struct ieee80211_header_data header;
|
||||
u32 time_stamp[2];
|
||||
|
@ -884,7 +868,6 @@ struct ieee80211_assoc_response_frame {
|
|||
u16 aid;
|
||||
// struct ieee80211_info_element info_element; /* supported rates */
|
||||
} __attribute__ ((packed));
|
||||
#endif
|
||||
|
||||
struct ieee80211_txb {
|
||||
u8 nr_frags;
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#define PMKID_LEN 16
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
|
@ -103,8 +102,6 @@ struct wme_parameter_element {
|
|||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(a)[1] = ((u16) (val)) >> 8; \
|
||||
|
@ -179,8 +176,6 @@ enum ieee80211_back_parties {
|
|||
WLAN_BACK_TIMER = 2,
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
|
@ -307,9 +302,6 @@ struct ieee80211_mgmt {
|
|||
} __attribute__ ((packed)) u;
|
||||
}__attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* mgmt header + 1 byte category code */
|
||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
||||
|
||||
|
|
|
@ -91,8 +91,6 @@
|
|||
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
|
||||
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ip_options {
|
||||
__u32 faddr; /* Saved first hop address */
|
||||
unsigned char optlen;
|
||||
|
@ -114,7 +112,6 @@ struct ip_options {
|
|||
};
|
||||
|
||||
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
|
||||
#endif
|
||||
|
||||
struct iphdr {
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
|
|
|
@ -51,7 +51,6 @@ The protection mechanism is through the pending queue.
|
|||
_mutex ioctl_mutex;
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_USB_HCI
|
||||
// when in USB, IO is through interrupt in/out endpoints
|
||||
struct usb_device *udev;
|
||||
|
@ -63,31 +62,8 @@ The protection mechanism is through the pending queue.
|
|||
u8 bio_irp_timeout;
|
||||
u8 bio_timer_cancel;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
// below is for io_rwmem...
|
||||
PMDL pmdl;
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
PSDBUS_REQUEST_PACKET recv_sdrp;
|
||||
PSDBUS_REQUEST_PACKET xmit_sdrp;
|
||||
|
||||
PIRP piorw_irp;
|
||||
|
||||
#endif
|
||||
#ifdef CONFIG_USB_HCI
|
||||
PURB piorw_urb;
|
||||
PIRP piorw_irp;
|
||||
u8 io_irp_cnt;
|
||||
u8 bio_irp_pending;
|
||||
_sema io_retevt;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_R871X_TEST
|
||||
int rtw_start_pseudo_adhoc(_adapter *padapter);
|
||||
int rtw_stop_pseudo_adhoc(_adapter *padapter);
|
||||
|
@ -104,7 +80,6 @@ void rtw_cancel_dynamic_chk_timer(_adapter *padapter);
|
|||
#endif
|
||||
void rtw_cancel_all_timer(_adapter *padapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
|
||||
|
||||
int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname);
|
||||
|
@ -121,7 +96,6 @@ void rtw_proc_remove_one(struct net_device *dev);
|
|||
static void rtw_proc_init_one(struct net_device *dev){}
|
||||
static void rtw_proc_remove_one(struct net_device *dev){}
|
||||
#endif //!CONFIG_PROC_DEBUG
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
void rtw_ips_dev_unload(_adapter *padapter);
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#define _FALSE 0
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/version.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/compiler.h>
|
||||
|
@ -264,9 +263,7 @@ __inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
|
|||
*bcancelled= _TRUE;//TRUE ==1; FALSE==0
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define RTW_TIMER_HDL_ARGS void *FunctionContext
|
||||
#endif
|
||||
|
||||
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
|
||||
#define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
|
||||
|
@ -351,176 +348,6 @@ static inline void rtw_netif_stop_queue(struct net_device *pnetdev)
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif // PLATFORM_LINUX
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
|
||||
#include <ndis.h>
|
||||
#include <ntddk.h>
|
||||
#include <ntddndis.h>
|
||||
#include <ntdef.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb.h>
|
||||
#include <usbioctl.h>
|
||||
#include <usbdlib.h>
|
||||
#endif
|
||||
|
||||
typedef KSEMAPHORE _sema;
|
||||
typedef LIST_ENTRY _list;
|
||||
typedef NDIS_STATUS _OS_STATUS;
|
||||
|
||||
|
||||
typedef NDIS_SPIN_LOCK _lock;
|
||||
|
||||
typedef KMUTEX _mutex;
|
||||
|
||||
typedef KIRQL _irqL;
|
||||
|
||||
// USB_PIPE for WINCE , but handle can be use just integer under windows
|
||||
typedef NDIS_HANDLE _nic_hdl;
|
||||
|
||||
|
||||
typedef NDIS_MINIPORT_TIMER _timer;
|
||||
|
||||
struct __queue {
|
||||
LIST_ENTRY queue;
|
||||
_lock lock;
|
||||
};
|
||||
|
||||
typedef NDIS_PACKET _pkt;
|
||||
typedef NDIS_BUFFER _buffer;
|
||||
typedef struct __queue _queue;
|
||||
|
||||
typedef PKTHREAD _thread_hdl_;
|
||||
typedef void thread_return;
|
||||
typedef void* thread_context;
|
||||
|
||||
typedef NDIS_WORK_ITEM _workitem;
|
||||
|
||||
#define thread_exit() PsTerminateSystemThread(STATUS_SUCCESS);
|
||||
|
||||
#define HZ 10000000
|
||||
#define SEMA_UPBND (0x7FFFFFFF) //8192
|
||||
|
||||
__inline static _list *get_next(_list *list)
|
||||
{
|
||||
return list->Flink;
|
||||
}
|
||||
|
||||
__inline static _list *get_list_head(_queue *queue)
|
||||
{
|
||||
return (&(queue->queue));
|
||||
}
|
||||
|
||||
|
||||
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
|
||||
|
||||
|
||||
__inline static _enter_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
|
||||
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _enter_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
KeWaitForSingleObject(pmutex, Executive, KernelMode, FALSE, NULL);
|
||||
}
|
||||
|
||||
|
||||
__inline static _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
KeReleaseMutex(pmutex, FALSE);
|
||||
}
|
||||
|
||||
|
||||
__inline static void rtw_list_delete(_list *plist)
|
||||
{
|
||||
RemoveEntryList(plist);
|
||||
InitializeListHead(plist);
|
||||
}
|
||||
|
||||
__inline static void _init_timer(_timer *ptimer,_nic_hdl nic_hdl,void *pfunc,PVOID cntx)
|
||||
{
|
||||
NdisMInitializeTimer(ptimer, nic_hdl, pfunc, cntx);
|
||||
}
|
||||
|
||||
__inline static void _set_timer(_timer *ptimer,u32 delay_time)
|
||||
{
|
||||
NdisMSetTimer(ptimer,delay_time);
|
||||
}
|
||||
|
||||
__inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
|
||||
{
|
||||
NdisMCancelTimer(ptimer,bcancelled);
|
||||
}
|
||||
|
||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
||||
{
|
||||
|
||||
NdisInitializeWorkItem(pwork, pfunc, cntx);
|
||||
}
|
||||
|
||||
__inline static void _set_workitem(_workitem *pwork)
|
||||
{
|
||||
NdisScheduleWorkItem(pwork);
|
||||
}
|
||||
|
||||
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
|
||||
//
|
||||
// Global Mutex: can only be used at PASSIVE level.
|
||||
//
|
||||
|
||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
while (NdisInterlockedIncrement((PULONG)&(_MutexCounter)) != 1)\
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
NdisMSleep(10000); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
}
|
||||
|
||||
#endif // PLATFORM_OS_XP
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <osdep_ce_service.h>
|
||||
#endif
|
||||
|
||||
#include <rtw_byteorder.h>
|
||||
|
||||
#ifndef BIT
|
||||
|
@ -779,29 +606,23 @@ extern void rtw_yield_os(void);
|
|||
|
||||
__inline static unsigned char _cancel_timer_ex(_timer *ptimer)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return del_timer_sync(ptimer);
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline void thread_enter(char *name)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
|
||||
daemonize("%s", name);
|
||||
#endif
|
||||
allow_signal(SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
__inline static void flush_signals_thread(void)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
if (signal_pending (current))
|
||||
{
|
||||
flush_signals(current);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
__inline static _OS_STATUS res_to_status(sint res)
|
||||
|
@ -811,16 +632,10 @@ __inline static _OS_STATUS res_to_status(sint res)
|
|||
|
||||
__inline static void rtw_dump_stack(void)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
dump_stack();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define rtw_warn_on(condition) WARN_ON(condition)
|
||||
#else
|
||||
#define rtw_warn_on(condition) do {} while (0)
|
||||
#endif
|
||||
|
||||
#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
|
||||
#define RND4(x) (((x >> 2) + (((x & 3) == 0) ? 0: 1)) << 2)
|
||||
|
@ -898,17 +713,10 @@ __inline static u32 bitshift(u32 bitmask)
|
|||
#endif
|
||||
|
||||
//#ifdef __GNUC__
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define STRUCT_PACKED __attribute__ ((packed))
|
||||
#else
|
||||
#define STRUCT_PACKED
|
||||
#endif
|
||||
|
||||
|
||||
// limitation of path length
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define PATH_LENGTH_MAX PATH_MAX
|
||||
#endif
|
||||
|
||||
|
||||
// Suspend lock prevent system from going suspend
|
||||
|
@ -957,7 +765,6 @@ extern struct net_device * rtw_alloc_etherdev(int sizeof_priv);
|
|||
|
||||
extern void rtw_free_netdev(struct net_device * netdev);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ndev->name
|
||||
#define ADPT_FMT "%s"
|
||||
|
@ -966,24 +773,12 @@ extern void rtw_free_netdev(struct net_device * netdev);
|
|||
#define FUNC_NDEV_ARG(ndev) __func__, ndev->name
|
||||
#define FUNC_ADPT_FMT "%s(%s)"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
|
||||
#else
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ""
|
||||
#define ADPT_FMT "%s"
|
||||
#define ADPT_ARG(adapter) ""
|
||||
#define FUNC_NDEV_FMT "%s"
|
||||
#define FUNC_NDEV_ARG(ndev) __func__
|
||||
#define FUNC_ADPT_FMT "%s"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
|
||||
#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)),(sig), 1)
|
||||
#else //(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
|
||||
#define rtw_signal_process(pid, sig) kill_proc((pid), (sig), 1)
|
||||
#endif //(LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
extern u64 rtw_modular64(u64 x, u64 y);
|
||||
extern u64 rtw_division64(u64 x, u64 y);
|
||||
|
|
|
@ -157,13 +157,11 @@ extern void eeprom_read_sz(_adapter * padapter, u16 reg,u8* data, u32 sz);
|
|||
|
||||
extern void read_eeprom_content_by_attrib(_adapter * padapter );
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
extern int isAdaptorInfoFileValid(void);
|
||||
extern int storeAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv);
|
||||
extern int retriveAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv);
|
||||
#endif //CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
#endif //__RTL871X_EEPROM_H__
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <osdep_service.h>
|
||||
|
||||
#ifndef CONFIG_RTL8711FW
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <wlan_bssdef.h>
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
|
||||
#include <asm/semaphore.h>
|
||||
|
@ -31,13 +30,10 @@
|
|||
#include <linux/semaphore.h>
|
||||
#endif
|
||||
#include <linux/sem.h>
|
||||
#endif
|
||||
#else
|
||||
#include <wlan_bssdef.h>
|
||||
#endif//CONFIG_RTL8711FW
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_H2CLBK
|
||||
#include <h2clbk.h>
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <osdep_service.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <asm/byteorder.h>
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
|
||||
#include <asm/semaphore.h>
|
||||
|
@ -47,14 +46,9 @@
|
|||
|
||||
#endif //CONFIG_USB_HCI
|
||||
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
|
||||
#define NUM_IOREQ 8
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define MAX_PROT_SZ (64-16)
|
||||
#endif
|
||||
|
||||
#define _IOREADY 0
|
||||
#define _IO_WAIT_COMPLETE 1
|
||||
|
|
|
@ -103,7 +103,7 @@ struct oid_obj_priv {
|
|||
NDIS_STATUS (*oidfuns)(struct oid_par_priv *poid_par_priv);
|
||||
};
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT)
|
||||
#if defined(CONFIG_WIRELESS_EXT)
|
||||
extern struct iw_handler_def rtw_handlers_def;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -123,13 +123,7 @@ struct mp_xmit_frame
|
|||
u8 *mem_addr;
|
||||
u32 sz[8];
|
||||
|
||||
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX)
|
||||
PURB pxmit_urb[8];
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pxmit_irp[8];
|
||||
#endif
|
||||
|
||||
u8 bpending[8];
|
||||
sint ac_tag[8];
|
||||
|
|
|
@ -290,9 +290,7 @@ struct recv_priv
|
|||
u8 rx_pending_cnt;
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
PURB int_in_urb;
|
||||
#endif
|
||||
|
||||
u8 *int_in_buf;
|
||||
#endif //CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
|
@ -403,10 +401,8 @@ struct recv_buf
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_pkt *pskb;
|
||||
u8 reuse;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -440,9 +440,7 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq,
|
|||
u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie);
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
void rtw_use_tkipkey_handler(void* FunctionContext);
|
||||
#endif
|
||||
|
||||
void rtw_sec_restore_wep_key(_adapter *adapter);
|
||||
u8 rtw_handle_tkip_countermeasure(_adapter* adapter, const char *caller);
|
||||
|
|
|
@ -324,9 +324,7 @@ struct submit_ctx{
|
|||
u32 submit_time; /* */
|
||||
u32 timeout_ms; /* <0: not synchronous, 0: wait forever, >0: up to ms waiting */
|
||||
int status; /* status for operation */
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct completion done;
|
||||
#endif
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -558,9 +556,7 @@ struct xmit_priv {
|
|||
USB_TRANSFER usb_transfer_write_port;
|
||||
// USB_TRANSFER usb_transfer_write_mem;
|
||||
#endif
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif
|
||||
//per AC pending irp
|
||||
int beq_cnt;
|
||||
int bkq_cnt;
|
||||
|
@ -574,16 +570,12 @@ struct xmit_priv {
|
|||
struct rtw_tx_ring tx_ring[PCI_MAX_TX_QUEUE_COUNT];
|
||||
int txringcount[PCI_MAX_TX_QUEUE_COUNT];
|
||||
u8 beaconDMAing; //flag of indicating beacon is transmiting to HW by DMA
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#ifdef CONFIG_SDIO_TX_TASKLET
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif /* PLATFORM_LINUX */
|
||||
#else
|
||||
_thread_hdl_ SdioXmitThread;
|
||||
_sema SdioXmitSema;
|
||||
|
|
|
@ -24,10 +24,7 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <sdio_ops_linux.h>
|
||||
#endif
|
||||
|
||||
extern void sdio_set_intf_ops(struct _io_ops *pops);
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ enum{
|
|||
#define MAX_VENDOR_REQ_CMD_SIZE 254 //8188cu SIE Support
|
||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE +ALIGNMENT_UNIT)
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), (timeout_ms))
|
||||
|
@ -53,7 +52,6 @@ enum{
|
|||
((timeout_ms) == 0) ||((timeout_ms)*HZ/1000>0)?((timeout_ms)*HZ/1000):1)
|
||||
#endif
|
||||
#include <usb_ops_linux.h>
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
#ifdef CONFIG_RTL8192C
|
||||
void rtl8192cu_set_hw_type(_adapter *padapter);
|
||||
|
|
|
@ -663,7 +663,6 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
* This structure refers to "HT BlockAckReq" as
|
||||
* described in 802.11n draft section 7.2.1.7.1
|
||||
*/
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW)
|
||||
struct rtw_ieee80211_bar {
|
||||
unsigned short frame_control;
|
||||
unsigned short duration;
|
||||
|
@ -672,7 +671,6 @@ struct rtw_ieee80211_bar {
|
|||
unsigned short control;
|
||||
unsigned short start_seq_num;
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
/* 802.11 BAR control masks */
|
||||
#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
|
||||
|
|
|
@ -20,12 +20,8 @@
|
|||
#ifndef __WLAN_BSSDEF_H__
|
||||
#define __WLAN_BSSDEF_H__
|
||||
|
||||
|
||||
#define MAX_IE_SZ 768
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NDIS_802_11_LENGTH_SSID 32
|
||||
#define NDIS_802_11_LENGTH_RATES 8
|
||||
#define NDIS_802_11_LENGTH_RATES_EX 16
|
||||
|
@ -293,9 +289,6 @@ typedef struct _NDIS_802_11_TEST
|
|||
}tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
|
||||
|
||||
#endif //end of #ifdef PLATFORM_LINUX
|
||||
|
||||
#ifndef Ndis802_11APMode
|
||||
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
||||
#endif
|
||||
|
|
|
@ -33,8 +33,6 @@ struct pkt_file {
|
|||
SIZE_T buf_len;
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NR_XMITFRAME 256
|
||||
|
||||
struct xmit_priv;
|
||||
|
@ -46,8 +44,6 @@ struct xmit_buf;
|
|||
extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
|
||||
#endif
|
||||
|
||||
void rtw_os_xmit_schedule(_adapter *padapter);
|
||||
|
||||
int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz);
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <recv_osdep.h>
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/vmalloc.h>
|
||||
#endif
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
|
||||
#include <linux/pageremap.h>
|
||||
|
@ -37,15 +35,11 @@
|
|||
#define RT_TAG '1178'
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <asm/atomic.h>
|
||||
atomic_t _malloc_cnt = ATOMIC_INIT(0);
|
||||
atomic_t _malloc_size = ATOMIC_INIT(0);
|
||||
#endif
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
/*
|
||||
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
|
||||
* @return: one of RTW_STATUS_CODE
|
||||
|
@ -61,11 +55,6 @@ inline int RTW_STATUS_CODE(int error_code){
|
|||
return _FAIL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
inline int RTW_STATUS_CODE(int error_code){
|
||||
return error_code;
|
||||
}
|
||||
#endif
|
||||
|
||||
u32 rtw_atoi(u8* s)
|
||||
{
|
||||
|
@ -92,16 +81,12 @@ u32 rtw_atoi(u8* s)
|
|||
inline u8* _rtw_vmalloc(u32 sz)
|
||||
{
|
||||
u8 *pbuf;
|
||||
#ifdef PLATFORM_LINUX
|
||||
pbuf = vmalloc(sz);
|
||||
#endif
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
#ifdef PLATFORM_LINUX
|
||||
if ( pbuf != NULL) {
|
||||
atomic_inc(&_malloc_cnt);
|
||||
atomic_add(sz, &_malloc_size);
|
||||
}
|
||||
#endif
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
return pbuf;
|
||||
|
@ -110,24 +95,18 @@ inline u8* _rtw_vmalloc(u32 sz)
|
|||
inline u8* _rtw_zvmalloc(u32 sz)
|
||||
{
|
||||
u8 *pbuf;
|
||||
#ifdef PLATFORM_LINUX
|
||||
pbuf = _rtw_vmalloc(sz);
|
||||
if (pbuf != NULL)
|
||||
memset(pbuf, 0, sz);
|
||||
#endif
|
||||
return pbuf;
|
||||
}
|
||||
|
||||
inline void _rtw_vmfree(u8 *pbuf, u32 sz)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
vfree(pbuf);
|
||||
#endif
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
#ifdef PLATFORM_LINUX
|
||||
atomic_dec(&_malloc_cnt);
|
||||
atomic_sub(sz, &_malloc_size);
|
||||
#endif
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
}
|
||||
|
||||
|
@ -136,7 +115,6 @@ u8* _rtw_malloc(u32 sz)
|
|||
|
||||
u8 *pbuf=NULL;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
if(sz > 0x4000)
|
||||
pbuf = (u8 *)dvr_malloc(sz);
|
||||
|
@ -144,14 +122,11 @@ u8* _rtw_malloc(u32 sz)
|
|||
#endif
|
||||
pbuf = kmalloc(sz,in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||
|
||||
#endif
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
#ifdef PLATFORM_LINUX
|
||||
if ( pbuf != NULL) {
|
||||
atomic_inc(&_malloc_cnt);
|
||||
atomic_add(sz, &_malloc_size);
|
||||
}
|
||||
#endif
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
return pbuf;
|
||||
|
@ -165,9 +140,7 @@ u8* _rtw_zmalloc(u32 sz)
|
|||
|
||||
if (pbuf != NULL) {
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
memset(pbuf, 0, sz);
|
||||
#endif
|
||||
}
|
||||
|
||||
return pbuf;
|
||||
|
@ -176,30 +149,22 @@ u8* _rtw_zmalloc(u32 sz)
|
|||
void _rtw_mfree(u8 *pbuf, u32 sz)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
if(sz > 0x4000)
|
||||
dvr_free(pbuf);
|
||||
else
|
||||
#endif
|
||||
kfree(pbuf);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
#ifdef PLATFORM_LINUX
|
||||
atomic_dec(&_malloc_cnt);
|
||||
atomic_sub(sz, &_malloc_size);
|
||||
#endif
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
}
|
||||
|
||||
inline struct sk_buff *_rtw_skb_alloc(u32 sz)
|
||||
inline struct sk_buff *_rtw_skb_alloc(u32 sz)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return __dev_alloc_skb(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||
#endif /* PLATFORM_LINUX */
|
||||
}
|
||||
|
||||
inline void _rtw_skb_free(struct sk_buff *skb)
|
||||
|
@ -209,24 +174,18 @@ inline void _rtw_skb_free(struct sk_buff *skb)
|
|||
|
||||
inline struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return skb_copy(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||
#endif /* PLATFORM_LINUX */
|
||||
}
|
||||
|
||||
inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||
#endif /* PLATFORM_LINUX */
|
||||
}
|
||||
|
||||
inline int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
skb->dev = ndev;
|
||||
return netif_rx(skb);
|
||||
#endif /* PLATFORM_LINUX */
|
||||
}
|
||||
|
||||
void _rtw_skb_queue_purge(struct sk_buff_head *list)
|
||||
|
@ -240,24 +199,20 @@ void _rtw_skb_queue_purge(struct sk_buff_head *list)
|
|||
#ifdef CONFIG_USB_HCI
|
||||
inline void *_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
return usb_alloc_coherent(dev, size, (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL), dma);
|
||||
#else
|
||||
return usb_buffer_alloc(dev, size, (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL), dma);
|
||||
#endif
|
||||
#endif /* PLATFORM_LINUX */
|
||||
}
|
||||
|
||||
inline void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_addr_t dma)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
usb_free_coherent(dev, size, addr, dma);
|
||||
#else
|
||||
usb_buffer_free(dev, size, addr, dma);
|
||||
#endif
|
||||
#endif /* PLATFORM_LINUX */
|
||||
}
|
||||
#endif /* CONFIG_USB_HCI */
|
||||
|
||||
|
@ -687,12 +642,7 @@ void _rtw_memset(void *pbuf, int c, u32 sz)
|
|||
|
||||
void _rtw_init_listhead(_list *list)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
INIT_LIST_HEAD(list);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -703,33 +653,20 @@ Otherwise, there will be racing condition.
|
|||
*/
|
||||
u32 rtw_is_list_empty(_list *phead)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
if (list_empty(phead))
|
||||
return _TRUE;
|
||||
else
|
||||
return _FALSE;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_list_insert_head(_list *plist, _list *phead)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
list_add(plist, phead);
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_list_insert_tail(_list *plist, _list *phead)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
list_add_tail(plist, phead);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -742,12 +679,7 @@ Caller must check if the list is empty before calling rtw_list_delete
|
|||
|
||||
void _rtw_init_sema(_sema *sema, int init_val)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
sema_init(sema, init_val);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void _rtw_free_sema(_sema *sema)
|
||||
|
@ -756,59 +688,38 @@ void _rtw_free_sema(_sema *sema)
|
|||
|
||||
void _rtw_up_sema(_sema *sema)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
up(sema);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
u32 _rtw_down_sema(_sema *sema)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
if (down_interruptible(sema))
|
||||
return _FAIL;
|
||||
else
|
||||
return _SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _rtw_mutex_init(_mutex *pmutex)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||
mutex_init(pmutex);
|
||||
#else
|
||||
init_MUTEX(pmutex);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void _rtw_mutex_free(_mutex *pmutex)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||
mutex_destroy(pmutex);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void _rtw_spinlock_init(_lock *plock)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
spin_lock_init(plock);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void _rtw_spinlock_free(_lock *plock)
|
||||
|
@ -817,41 +728,23 @@ void _rtw_spinlock_free(_lock *plock)
|
|||
|
||||
void _rtw_spinlock(_lock *plock)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
spin_lock(plock);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void _rtw_spinunlock(_lock *plock)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
spin_unlock(plock);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void _rtw_spinlock_ex(_lock *plock)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
spin_lock(plock);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void _rtw_spinunlock_ex(_lock *plock)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
spin_unlock(plock);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void _rtw_init_queue(_queue *pqueue)
|
||||
|
@ -880,47 +773,33 @@ u32 rtw_end_of_queue_search(_list *head, _list *plist)
|
|||
|
||||
u32 rtw_get_current_time(void)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
return jiffies;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline u32 rtw_systime_to_ms(u32 systime)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return systime * 1000 / HZ;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline u32 rtw_ms_to_systime(u32 ms)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return ms * HZ / 1000;
|
||||
#endif
|
||||
}
|
||||
|
||||
// the input parameter start use the same unit as returned by rtw_get_current_time
|
||||
inline s32 rtw_get_passing_time_ms(u32 start)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return rtw_systime_to_ms(jiffies-start);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline s32 rtw_get_time_interval_ms(u32 start, u32 end)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return rtw_systime_to_ms(end-start);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void rtw_sleep_schedulable(int ms)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
u32 delta;
|
||||
|
||||
delta = (ms * HZ)/1000;//(ms)
|
||||
|
@ -931,34 +810,20 @@ void rtw_sleep_schedulable(int ms)
|
|||
if (schedule_timeout(delta) != 0) {
|
||||
return ;
|
||||
}
|
||||
return;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void rtw_msleep_os(int ms)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
msleep((unsigned int)ms);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_usleep_os(int us)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
// msleep((unsigned int)us);
|
||||
if ( 1 < (us/1000) )
|
||||
msleep(1);
|
||||
else
|
||||
msleep( (us/1000) + 1);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -977,29 +842,17 @@ void _rtw_udelay_os(int us, const char *func, const int line)
|
|||
#else
|
||||
void rtw_mdelay_os(int ms)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
mdelay((unsigned long)ms);
|
||||
|
||||
#endif
|
||||
}
|
||||
void rtw_udelay_os(int us)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
udelay((unsigned long)us);
|
||||
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void rtw_yield_os()
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
yield();
|
||||
#endif
|
||||
}
|
||||
|
||||
#define RTW_SUSPEND_LOCK_NAME "rtw_wifi"
|
||||
|
@ -1086,75 +939,54 @@ inline void rtw_lock_ext_suspend_timeout(u32 timeout_ms)
|
|||
|
||||
inline void ATOMIC_SET(ATOMIC_T *v, int i)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
atomic_set(v,i);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int ATOMIC_READ(ATOMIC_T *v)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return atomic_read(v);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ATOMIC_ADD(ATOMIC_T *v, int i)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
atomic_add(i,v);
|
||||
#endif
|
||||
}
|
||||
inline void ATOMIC_SUB(ATOMIC_T *v, int i)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
atomic_sub(i,v);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ATOMIC_INC(ATOMIC_T *v)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
atomic_inc(v);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ATOMIC_DEC(ATOMIC_T *v)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
atomic_dec(v);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int ATOMIC_ADD_RETURN(ATOMIC_T *v, int i)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return atomic_add_return(i,v);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int ATOMIC_SUB_RETURN(ATOMIC_T *v, int i)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return atomic_sub_return(i,v);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int ATOMIC_INC_RETURN(ATOMIC_T *v)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return atomic_inc_return(v);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int ATOMIC_DEC_RETURN(ATOMIC_T *v)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return atomic_dec_return(v);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
/*
|
||||
* Open a file with the specific @param path, @param flag, @param mode
|
||||
* @param fpp the pointer of struct file pointer to get struct file pointer while file opening is success
|
||||
|
@ -1326,7 +1158,6 @@ static int storeToFile(char *path, u8* buf, u32 sz)
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
/*
|
||||
* Test if the specifi @param path is a file and readable
|
||||
|
@ -1335,15 +1166,10 @@ static int storeToFile(char *path, u8* buf, u32 sz)
|
|||
*/
|
||||
int rtw_is_file_readable(char *path)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
if(isFileReadable(path) == 0)
|
||||
return _TRUE;
|
||||
else
|
||||
return _FALSE;
|
||||
#else
|
||||
//Todo...
|
||||
return _FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1355,13 +1181,8 @@ int rtw_is_file_readable(char *path)
|
|||
*/
|
||||
int rtw_retrive_from_file(char *path, u8* buf, u32 sz)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
int ret =retriveFromFile(path, buf, sz);
|
||||
return ret>=0?ret:0;
|
||||
#else
|
||||
//Todo...
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1373,17 +1194,11 @@ int rtw_retrive_from_file(char *path, u8* buf, u32 sz)
|
|||
*/
|
||||
int rtw_store_to_file(char *path, u8* buf, u32 sz)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
int ret =storeToFile(path, buf, sz);
|
||||
return ret>=0?ret:0;
|
||||
#else
|
||||
//Todo...
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 1 //#ifdef MEM_ALLOC_REFINE_ADAPTOR
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_priv)
|
||||
{
|
||||
struct net_device *pnetdev;
|
||||
|
@ -1517,7 +1332,6 @@ error:
|
|||
return -1;
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif //MEM_ALLOC_REFINE_ADAPTOR
|
||||
|
||||
#ifdef CONFIG_PLATFORM_SPRD
|
||||
|
@ -1529,17 +1343,13 @@ error:
|
|||
|
||||
u64 rtw_modular64(u64 x, u64 y)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return do_div(x, y);
|
||||
#endif
|
||||
}
|
||||
|
||||
u64 rtw_division64(u64 x, u64 y)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
do_div(x, y);
|
||||
return x;
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_buf_free(u8 **buf, u32 *buf_len)
|
||||
|
|
Loading…
Reference in a new issue