rtl8199eu: Remove all PLATFORM_LINUX ifdefs

This option is always chosen.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-11 00:30:22 -05:00
parent bb27b28f6e
commit 1c5cb9ca00
33 changed files with 12 additions and 910 deletions

View file

@ -1002,13 +1002,6 @@ efuse_ShadowRead4Byte(
* 11/12/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
#ifdef PLATFORM
static void
efuse_ShadowWrite1Byte(
PADAPTER pAdapter,
u16 Offset,
u8 Value);
#endif /* PLATFORM */
static void
efuse_ShadowWrite1Byte(
PADAPTER pAdapter,
@ -1207,7 +1200,6 @@ Efuse_InitSomeVar(
_rtw_memset((void *)&fakeBTEfuseModifiedMap[0], 0xff, EFUSE_BT_MAX_MAP_LEN);
}
#ifdef PLATFORM_LINUX
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
/* include <rtw_eeprom.h> */
@ -1254,4 +1246,3 @@ int retriveAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv)
return ret;
}
#endif /* CONFIG_ADAPTOR_INFO_CACHING_FILE */
#endif /* PLATFORM_LINUX */

View file

@ -1408,9 +1408,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 ) )

View file

@ -268,7 +268,6 @@ _func_enter_;
handle_tkip_countermeasure:
/* should we add something here...? */
#ifdef PLATFORM_LINUX
if (padapter->securitypriv.btkip_countermeasure == true) {
cur_time = rtw_get_current_time();
@ -283,7 +282,6 @@ handle_tkip_countermeasure:
goto release_mlme_lock;
}
}
#endif
_rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
pmlmepriv->assoc_by_bssid=true;
@ -399,7 +397,6 @@ _func_enter_;
handle_tkip_countermeasure:
#ifdef PLATFORM_LINUX
if (padapter->securitypriv.btkip_countermeasure == true) {
cur_time = rtw_get_current_time();
@ -414,7 +411,6 @@ handle_tkip_countermeasure:
goto release_mlme_lock;
}
}
#endif
#ifdef CONFIG_VALIDATE_SSID
if (rtw_validate_ssid(ssid) == false) {

View file

@ -277,19 +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 */
{
goto exit;
}
#endif
}
_enter_critical_bh(&free_queue->lock, &irqL);
@ -1444,10 +1436,6 @@ void rtw_scan_abort(_adapter *adapter)
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
if (!adapter->bDriverStopped && !adapter->bSurpriseRemoved)
DBG_88E(FUNC_NDEV_FMT"waiting for scan_abort time out!\n", FUNC_NDEV_ARG(adapter->pnetdev));
#ifdef CONFIG_PLATFORM_MSTAR_TITANIA12
set_survey_timer(pmlmeext, 0);
_set_timer(&pmlmepriv->scan_to_timer, 50);
#endif
rtw_indicate_scan_done(adapter, true);
}
pmlmeext->scan_abort = false;

View file

@ -9128,7 +9128,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_88E("%s: AP[%s] channel plan {", __func__, bssid->Ssid.Ssid);
while ((i < chplan_ap.Len) && (chplan_ap.Channel[i] != 0))
@ -9137,12 +9136,10 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
i++;
}
DBG_88E("}\n");
#endif
#endif
_rtw_memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta));
#ifdef CONFIG_DEBUG_RTL871X
#ifdef PLATFORM_LINUX
i = 0;
DBG_88E("%s: STA channel plan {", __func__);
while ((i < MAX_CHANNEL_NUM) && (chplan_sta[i].ChannelNum != 0))
@ -9151,7 +9148,6 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
i++;
}
DBG_88E("}\n");
#endif
#endif
_rtw_memset(pmlmeext->channel_set, 0, sizeof(pmlmeext->channel_set));
@ -9304,7 +9300,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_88E("%s: new STA channel plan {", __func__);
while ((k < MAX_CHANNEL_NUM) && (chplan_new[k].ChannelNum != 0))
@ -9314,8 +9309,6 @@ static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid)
}
DBG_88E("}\n");
#endif
#endif
}
/* If channel is used by AP, set channel scan type to active */

View file

@ -153,7 +153,6 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv)
_rtw_memcpy(pnetwork->Ssid.Ssid, "mp_871x", pnetwork->Ssid.SsidLength);
}
#ifdef PLATFORM_LINUX
static int init_mp_priv_by_os(struct mp_priv *pmp_priv)
{
int i, res;
@ -194,7 +193,6 @@ _exit_init_mp_priv:
return res;
}
#endif
static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter)
{
@ -1058,11 +1056,9 @@ void SetPacketTx(PADAPTER padapter)
_rtw_memset(ptr, payload, pkt_end - ptr);
/* 3 6. start thread */
#ifdef PLATFORM_LINUX
pmp_priv->tx.PktTxThread = kthread_run(mp_xmit_packet_thread, pmp_priv, "RTW_MP_THREAD");
if (IS_ERR(pmp_priv->tx.PktTxThread))
DBG_88E("Create PktTx Thread Fail !!!!!\n");
#endif
}
void SetPacketRx(PADAPTER pAdapter, u8 bStartRx)
@ -1179,12 +1175,10 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
u32 psd_data=0;
#ifdef PLATFORM_LINUX
if (!netif_running(pAdapter->pnetdev)) {
RT_TRACE(_module_mp_, _drv_warning_, ("mp_query_psd: Fail! interface not opened!\n"));
return 0;
}
#endif
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == false) {
RT_TRACE(_module_mp_, _drv_warning_, ("mp_query_psd: Fail! not in MP mode!\n"));

View file

@ -195,7 +195,6 @@ exit:
return ret;
}
#if defined (PLATFORM_LINUX)
void rtw_ps_processor(_adapter*padapter)
{
#ifdef CONFIG_P2P
@ -334,7 +333,6 @@ void pwr_state_check_handler(void *FunctionContext)
_adapter *padapter = (_adapter *)FunctionContext;
rtw_ps_cmd(padapter);
}
#endif
@ -1366,9 +1364,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);

View file

@ -110,9 +110,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 */
@ -244,8 +242,6 @@ _func_enter_;
}
#endif
#if defined(PLATFORM_LINUX)
if (precvframe->u.hdr.pkt)
{
#ifdef CONFIG_BSD_RX_USE_MBUF
@ -256,8 +252,6 @@ _func_enter_;
precvframe->u.hdr.pkt = NULL;
}
#endif /* defined(PLATFORM_LINUX) */
_enter_critical_bh(&pfree_recv_queue->lock, &irqL);
rtw_list_delete(&(precvframe->u.hdr.list));
@ -2301,7 +2295,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)
@ -2354,9 +2347,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 */
@ -2579,7 +2569,6 @@ _func_exit_;
static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
{
#if defined (PLATFORM_LINUX) /* for amsdu TP improvement,Creator: Thomas */
int a_len, padding_len;
u16 eth_type, nSubframe_Length;
u8 nr_subframes, i;
@ -2597,9 +2586,7 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
recvframe_pull(prframe, prframe->u.hdr.attrib.hdrlen);
if (prframe->u.hdr.attrib.iv_len >0)
{
recvframe_pull(prframe, prframe->u.hdr.attrib.iv_len);
}
a_len = prframe->u.hdr.len;
@ -2728,190 +2715,6 @@ exit:
rtw_free_recvframe(prframe, pfree_recv_queue);/* free this recv_frame */
return ret;
#else /* || defined (PLATFORM_LINUX) */
unsigned char *ptr, *pdata, *pbuf, *psnap_type;
union recv_frame *pnrframe, *pnrframe_new;
int a_len, mv_len, padding_len;
u16 eth_type, type_len;
u8 bsnaphdr;
struct ieee80211_snap_hdr *psnap;
struct _vlan *pvlan;
struct recv_priv *precvpriv = &padapter->recvpriv;
_queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
int ret = _SUCCESS;
a_len = prframe->u.hdr.len - prframe->u.hdr.attrib.hdrlen;
recvframe_pull(prframe, prframe->u.hdr.attrib.hdrlen);
if (prframe->u.hdr.attrib.iv_len >0)
{
recvframe_pull(prframe, prframe->u.hdr.attrib.iv_len);
}
pdata = prframe->u.hdr.rx_data;
prframe->u.hdr.len=0;
pnrframe = prframe;
do{
mv_len=0;
pnrframe->u.hdr.rx_data = pnrframe->u.hdr.rx_tail = pdata;
ptr = pdata;
_rtw_memcpy(pnrframe->u.hdr.attrib.dst, ptr, ETH_ALEN);
ptr+=ETH_ALEN;
_rtw_memcpy(pnrframe->u.hdr.attrib.src, ptr, ETH_ALEN);
ptr+=ETH_ALEN;
_rtw_memcpy(&type_len, ptr, 2);
type_len= ntohs((unsigned short )type_len);
ptr +=2;
mv_len += ETH_HLEN;
recvframe_put(pnrframe, type_len+ETH_HLEN);/* update tail; */
if (pnrframe->u.hdr.rx_data >= pnrframe->u.hdr.rx_tail || type_len<8)
{
/* panic("pnrframe->u.hdr.rx_data >= pnrframe->u.hdr.rx_tail || type_len<8\n"); */
rtw_free_recvframe(pnrframe, pfree_recv_queue);
goto exit;
}
psnap=(struct ieee80211_snap_hdr *)(ptr);
psnap_type=ptr+SNAP_SIZE;
if (psnap->dsap==0xaa && psnap->ssap==0xaa && psnap->ctrl==0x03)
{
if ( _rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
{
bsnaphdr=true;/* wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042; */
}
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
{
bsnaphdr=true; /* wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK; */
}
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
{
bsnaphdr=true; /* wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL; */
}
else
{
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("drop pkt due to invalid frame format!\n"));
/* KeBugCheckEx(0x87123333, 0xe0, 0x4c, 0x87, 0xdd); */
/* panic("0x87123333, 0xe0, 0x4c, 0x87, 0xdd\n"); */
rtw_free_recvframe(pnrframe, pfree_recv_queue);
goto exit;
}
}
else
{
bsnaphdr=false;/* wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS; */
}
ptr += (bsnaphdr?SNAP_SIZE:0);
_rtw_memcpy(&eth_type, ptr, 2);
eth_type= ntohs((unsigned short )eth_type); /* pattrib->ether_type */
mv_len+= 2+(bsnaphdr?SNAP_SIZE:0);
ptr += 2;/* now move to iphdr; */
pvlan = NULL;
if (eth_type == 0x8100) /* vlan */
{
pvlan = (struct _vlan *)ptr;
ptr+=4;
mv_len+=4;
}
if (eth_type==0x0800)/* ip */
{
struct iphdr* piphdr = (struct iphdr*)ptr;
if (piphdr->protocol == 0x06)
{
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("@@@===recv tcp len:%d @@@===\n", pnrframe->u.hdr.len));
}
}
pbuf = recvframe_pull(pnrframe, (mv_len-sizeof(struct ethhdr)));
_rtw_memcpy(pbuf, pnrframe->u.hdr.attrib.dst, ETH_ALEN);
_rtw_memcpy(pbuf+ETH_ALEN, pnrframe->u.hdr.attrib.src, ETH_ALEN);
eth_type = htons((unsigned short)eth_type) ;
_rtw_memcpy(pbuf+12, &eth_type, 2);
padding_len = (4) - ((type_len + ETH_HLEN)&(4-1));
a_len -= (type_len + ETH_HLEN + padding_len) ;
pnrframe_new = NULL;
if (a_len > ETH_HLEN)
{
pnrframe_new = rtw_alloc_recvframe(pfree_recv_queue);
if (pnrframe_new)
{
{
#ifdef PLATFORM_LINUX
_pkt *pskb = pnrframe->u.hdr.pkt;
#endif /* PLATFORM_LINUX */
_rtw_init_listhead(&pnrframe_new->u.hdr.list);
pnrframe_new->u.hdr.len=0;
#ifdef PLATFORM_LINUX
if (pskb)
{
pnrframe_new->u.hdr.pkt = skb_clone(pskb, GFP_ATOMIC);
}
#endif /* PLATFORM_LINUX */
}
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_end = pdata + a_len + padding_len;/* */
}
}
if ((padapter->bDriverStopped ==false)&&( padapter->bSurpriseRemoved==false) )
{
rtw_recv_indicatepkt(padapter, pnrframe);/* indicate this recv_frame */
}
else
{
rtw_free_recvframe(pnrframe, pfree_recv_queue);/* free this recv_frame */
}
pnrframe = NULL;
if (pnrframe_new)
{
pnrframe = pnrframe_new;
}
}while (pnrframe);
exit:
return ret;
#endif
}
static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)

View file

@ -2810,9 +2810,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;
@ -2821,14 +2819,6 @@ _func_enter_;
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler ^^^\n"));
/*
if (padapter->bDriverStopped ||padapter->bSurpriseRemoved){
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler (padapter->bDriverStopped %d)(padapter->bSurpriseRemoved %d)^^^\n",padapter->bDriverStopped,padapter->bSurpriseRemoved));
return;
}
*/
padapter->securitypriv.busetkipkey=true;
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler padapter->securitypriv.busetkipkey=%d^^^\n",padapter->securitypriv.busetkipkey));

View file

@ -2112,9 +2112,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_;
@ -3636,9 +3634,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;
}
@ -3648,7 +3644,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?? */
@ -3657,7 +3652,6 @@ int rtw_sctx_wait(struct submit_ctx *sctx)
} else {
status = sctx->status;
}
#endif
if (status == RTW_SCTX_DONE_SUCCESS) {
ret = _SUCCESS;
@ -3687,9 +3681,7 @@ void rtw_sctx_done_err(struct submit_ctx **sctx, int status)
if (rtw_sctx_chk_waring_status(status))
DBG_88E("%s status:%d\n", __func__, status);
(*sctx)->status = status;
#ifdef PLATFORM_LINUX
complete(&((*sctx)->done));
#endif
*sctx = NULL;
}
}

View file

@ -106,9 +106,7 @@ static void dm_CheckPbcGPIO(_adapter *padapter)
return;
}
#ifdef PLATFORM_LINUX
rtw_signal_process(padapter->pid[0], SIGUSR1);
#endif
}
}

View file

@ -62,21 +62,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_88E("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;
@ -125,11 +121,7 @@ int rtl8188eu_init_recv_priv(_adapter *padapter)
precvbuf++;
}
precvpriv->free_recv_buf_queue_cnt = NR_RECVBUFF;
#ifdef PLATFORM_LINUX
skb_queue_head_init(&precvpriv->rx_skb_queue);
#ifdef CONFIG_PREALLOC_RECV_SKB
@ -167,8 +159,6 @@ int rtl8188eu_init_recv_priv(_adapter *padapter)
}
#endif
#endif
exit:
return res;
@ -193,35 +183,24 @@ 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)) {
if (skb_queue_len(&precvpriv->rx_skb_queue))
DBG_88E(KERN_WARNING "rx_skb_queue not empty\n");
}
skb_queue_purge(&precvpriv->rx_skb_queue);
#ifdef CONFIG_PREALLOC_RECV_SKB
if (skb_queue_len(&precvpriv->free_recv_skb_queue)) {
if (skb_queue_len(&precvpriv->free_recv_skb_queue))
DBG_88E(KERN_WARNING "free_recv_skb_queue not empty, %d\n", skb_queue_len(&precvpriv->free_recv_skb_queue));
}
skb_queue_purge(&precvpriv->free_recv_skb_queue);
#endif
#endif
}

View file

@ -32,11 +32,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
@ -1116,17 +1114,14 @@ s32 rtl8188eu_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe)
static void rtl8188eu_hostap_mgnt_xmit_cb(struct urb *urb)
{
#ifdef PLATFORM_LINUX
struct sk_buff *skb = (struct sk_buff *)urb->context;
dev_kfree_skb_any(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;
@ -1230,15 +1225,8 @@ s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
kfree_skb(skb);
}
usb_free_urb(urb);
_exit:
dev_kfree_skb_any(skb);
#endif
return 0;
}
#endif

View file

@ -37,8 +37,6 @@
#define CONFIG_RTL8188E
#define PLATFORM_LINUX
#ifdef CONFIG_IOCTL_CFG80211
#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
#define CONFIG_SET_SCAN_DENY_TIMER

View file

@ -30,10 +30,7 @@
#include <drv_conf.h>
#include <osdep_service.h>
#include <wlan_bssdef.h>
#ifdef PLATFORM_LINUX
#include <drv_types_linux.h>
#endif
enum _NIC_VERSION {
@ -279,10 +276,8 @@ struct dvobj_priv
u8 * usb_vendor_req_buf;
#endif
#ifdef PLATFORM_LINUX
struct usb_interface *pusbintf;
struct usb_device *pusbdev;
#endif//PLATFORM_LINUX
ATOMIC_T continual_urb_error;
#endif//CONFIG_USB_HCI
@ -291,7 +286,6 @@ struct dvobj_priv
#ifdef CONFIG_PCI_HCI
#ifdef PLATFORM_LINUX
struct pci_dev *ppcidev;
//PCI MEM map
@ -321,12 +315,10 @@ 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
};
#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 */
@ -346,7 +338,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
@ -496,16 +487,8 @@ struct _ADAPTER{
_thread_hdl_ evtThread;
_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
@ -525,10 +508,7 @@ struct _ADAPTER{
struct wireless_dev *rtw_wdev;
#endif //CONFIG_IOCTL_CFG80211
#endif //end of PLATFORM_LINUX
int net_closed;
u8 bFWReady;
u8 bBTFWReady;
u8 bReadPortCancel;

View file

@ -27,10 +27,7 @@
#include <osdep_service.h>
#include <drv_types.h>
#include "wifi.h"
#if defined PLATFORM_LINUX
#include <linux/wireless.h>
#endif
#else
#include <list.h>
@ -312,8 +309,6 @@ struct ieee_ibss_seq {
_list list;
};
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
struct rtw_ieee80211_hdr {
u16 frame_ctl;
u16 duration_id;
@ -363,8 +358,6 @@ struct eapol {
u16 length;
} __attribute__ ((packed));
#endif
enum eap_type {
EAP_PACKET = 0,
EAPOL_START,
@ -473,8 +466,6 @@ enum eap_type {
#define P80211_OUI_LEN 3
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
struct ieee80211_snap_hdr {
u8 dsap; /* always 0xAA */
@ -484,8 +475,6 @@ struct ieee80211_snap_hdr {
} __attribute__ ((packed));
#endif
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
#define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE)
@ -753,10 +742,6 @@ struct ieee80211_softmac_stats{
#define WEP_KEYS 4
#define WEP_KEY_LEN 13
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
struct ieee80211_security {
u16 active_key:2,
enabled:1,
@ -769,8 +754,6 @@ struct ieee80211_security {
u16 flags;
} __attribute__ ((packed));
#endif
/*
802.11 data frame from AP
@ -811,8 +794,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;
@ -823,7 +804,6 @@ struct ieee80211_info_element {
u8 len;
u8 data[0];
} __attribute__ ((packed));
#endif
/*
* These are the data types that can make up management packets
@ -845,10 +825,6 @@ struct ieee80211_info_element {
#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
#define IEEE80211_DEFAULT_BASIC_RATE 10
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
struct ieee80211_authentication {
struct ieee80211_header_data header;
u16 algorithm;
@ -886,7 +862,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;

View file

@ -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;
@ -292,8 +287,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)

View file

@ -90,8 +90,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;
@ -113,7 +111,6 @@ struct ip_options {
};
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
#endif
struct iphdr {
#if defined(__LITTLE_ENDIAN_BITFIELD)

View file

@ -85,15 +85,9 @@
#define Smooth_TH_3 4
#define Smooth_Step_Size 5
#define Adaptive_SIR 1
#if (RTL8723_FPGA_VERIFICATION == 1)
#define PSD_RESCAN 1
#else
#define PSD_RESCAN 4
#endif
#define PSD_SCAN_INTERVAL 700 //ms
//8723A High Power IGI Setting
#define DM_DIG_HIGH_PWR_IGI_LOWER_BOUND 0x22
#define DM_DIG_Gmode_HIGH_PWR_IGI_LOWER_BOUND 0x28
@ -119,31 +113,10 @@
// 2011/09/20 MH Add for AP/ADSLpseudo DM structuer requirement.
// We need to remove to other position???
//
#if (DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_MP))
typedef struct rtl8192cd_priv {
u1Byte temp;
}rtl8192cd_priv, *prtl8192cd_priv;
#endif
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
typedef struct _ADAPTER{
u1Byte temp;
#ifdef AP_BUILD_WORKAROUND
HAL_DATA_TYPE* temp2;
prtl8192cd_priv priv;
#endif
}ADAPTER, *PADAPTER;
#endif
#if (DM_ODM_SUPPORT_TYPE == ODM_AP)
typedef struct _WLAN_STA{
u1Byte temp;
} WLAN_STA, *PRT_WLAN_STA;
#endif
typedef struct _Dynamic_Initial_Gain_Threshold_
{
@ -242,31 +215,11 @@ typedef struct _RX_High_Power_
bool RXHP_enable;
u1Byte TP_Mode;
RT_TIMER PSDTimer;
#if (DM_ODM_SUPPORT_TYPE == ODM_MP)
#if USE_WORKITEM
RT_WORK_ITEM PSDTimeWorkitem;
#endif
#endif
}RXHP_T, *pRXHP_T;
#if (DM_ODM_SUPPORT_TYPE & (ODM_CE))
#define ASSOCIATE_ENTRY_NUM 32 // Max size of AsocEntry[].
#define ODM_ASSOCIATE_ENTRY_NUM ASSOCIATE_ENTRY_NUM
#elif (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#define ASSOCIATE_ENTRY_NUM NUM_STAT
#define ODM_ASSOCIATE_ENTRY_NUM ASSOCIATE_ENTRY_NUM+1
#else
//
// 2012/01/12 MH Revise for compatiable with other SW team.
// 0 is for STA 1-n is for AP clients.
//
#define ODM_ASSOCIATE_ENTRY_NUM ASSOCIATE_ENTRY_NUM+1// Default port only one
#endif
//#ifdef CONFIG_ANTENNA_DIVERSITY
// This indicates two different the steps.
// In SWAW_STEP_PEAK, driver needs to switch antenna and listen to the signal on the air.
// In SWAW_STEP_DETERMINE, driver just compares the signal captured in SWAW_STEP_PEAK
@ -310,27 +263,6 @@ typedef struct _SW_Antenna_Switch_
u8Byte RXByteCnt_B;
u1Byte TrafficLoad;
RT_TIMER SwAntennaSwitchTimer;
#if (DM_ODM_SUPPORT_TYPE == ODM_MP)
#if USE_WORKITEM
RT_WORK_ITEM SwAntennaSwitchWorkitem;
#endif
#endif
/* CE Platform use
#ifdef CONFIG_SW_ANTENNA_DIVERSITY
_timer SwAntennaSwitchTimer;
u8Byte lastTxOkCnt;
u8Byte lastRxOkCnt;
u8Byte TXByteCnt_A;
u8Byte TXByteCnt_B;
u8Byte RXByteCnt_A;
u8Byte RXByteCnt_B;
u1Byte DoubleComfirm;
u1Byte TrafficLoad;
//SW Antenna Switch
#endif
*/
#ifdef CONFIG_HW_ANTENNA_DIVERSITY
//Hybrid Antenna Diversity
u4Byte CCK_Ant1_Cnt[ASSOCIATE_ENTRY_NUM];
@ -347,16 +279,12 @@ typedef struct _SW_Antenna_Switch_
#endif
}SWAT_T, *pSWAT_T;
//#endif
typedef struct _EDCA_TURBO_
{
bool bCurrentTurboEDCA;
bool bIsCurRDLState;
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
u4Byte prv_traffic_idx; // edca turbo
#endif
}EDCA_T,*pEDCA_T;
typedef struct _ODM_RATE_ADAPTIVE
@ -369,42 +297,6 @@ typedef struct _ODM_RATE_ADAPTIVE
} ODM_RATE_ADAPTIVE, *PODM_RATE_ADAPTIVE;
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#ifdef ADSL_AP_BUILD_WORKAROUND
#define MAX_TOLERANCE 5
#define IQK_DELAY_TIME 1 //ms
#endif
//
// Indicate different AP vendor for IOT issue.
//
typedef enum _HT_IOT_PEER
{
HT_IOT_PEER_UNKNOWN = 0,
HT_IOT_PEER_REALTEK = 1,
HT_IOT_PEER_REALTEK_92SE = 2,
HT_IOT_PEER_BROADCOM = 3,
HT_IOT_PEER_RALINK = 4,
HT_IOT_PEER_ATHEROS = 5,
HT_IOT_PEER_CISCO = 6,
HT_IOT_PEER_MERU = 7,
HT_IOT_PEER_MARVELL = 8,
HT_IOT_PEER_REALTEK_SOFTAP = 9,// peer is RealTek SOFT_AP, by Bohn, 2009.12.17
HT_IOT_PEER_SELF_SOFTAP = 10, // Self is SoftAP
HT_IOT_PEER_AIRGO = 11,
HT_IOT_PEER_INTEL = 12,
HT_IOT_PEER_RTK_APCLIENT = 13,
HT_IOT_PEER_REALTEK_81XX = 14,
HT_IOT_PEER_REALTEK_WOW = 15,
HT_IOT_PEER_MAX = 16
}HT_IOT_PEER_E, *PHTIOT_PEER_E;
#endif//#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#define IQK_MAC_REG_NUM 4
#define IQK_ADDA_REG_NUM 16
#define IQK_BB_REG_NUM_MAX 10
@ -435,13 +327,11 @@ typedef struct _ODM_Phy_Status_Info_
u1Byte SignalQuality; // in 0-100 index.
u1Byte RxMIMOSignalQuality[MAX_PATH_NUM_92CS]; //EVM
u1Byte RxMIMOSignalStrength[MAX_PATH_NUM_92CS];// in 0~100 index
#if (DM_ODM_SUPPORT_TYPE & (ODM_MP|ODM_CE))
s1Byte RxPower; // in dBm Translate from PWdB
s1Byte RecvSignalPower;// Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures.
u1Byte BTRxRSSIPercentage;
u1Byte SignalStrength; // in 0-100 index.
u1Byte RxPwr[MAX_PATH_NUM_92CS];//per-path's pwdb
#endif
u1Byte RxSNR[MAX_PATH_NUM_92CS];//per-path's SNR
}ODM_PHY_INFO_T,*PODM_PHY_INFO_T;
@ -495,7 +385,6 @@ typedef enum tag_Dynamic_ODM_Support_Ability_Type
// 2011/20/20 MH For MP driver RT_WLAN_STA = STA_INFO_T
// Please declare below ODM relative info in your STA info structure.
//
#if 1
typedef struct _ODM_STA_INFO{
// Driver Write
bool bUsed; // record the sta status link or not?
@ -516,7 +405,6 @@ typedef struct _ODM_STA_INFO{
// ODM Write Wilson will handle this part(said by Luke.Lee)
}ODM_STA_INFO_T, *PODM_STA_INFO_T;
#endif
//
// 2011/10/20 MH Define Common info enum for all team.
@ -857,7 +745,6 @@ typedef struct _ODM_RA_Info_
u2Byte RptTime;
u1Byte RAWaitingCounter;
u1Byte RAPendingCounter;
#if 1 //POWER_TRAINING_ACTIVE == 1 // For compile pass only~!
u1Byte PTActive; // on or off
u1Byte PTTryState; // 0 trying state, 1 for decision state
u1Byte PTStage; // 0~6
@ -867,7 +754,6 @@ typedef struct _ODM_RA_Info_
u1Byte PTModeSS; // decide whitch rate should do PT
u1Byte RAstage; // StageRA, decide how many times RA will be done between PT
u1Byte PTSmoothFactor;
#endif
} ODM_RA_INFO_T,*PODM_RA_INFO_T;
typedef struct _IQK_MATRIX_REGS_SETTING{
@ -875,31 +761,6 @@ typedef struct _IQK_MATRIX_REGS_SETTING{
s4Byte Value[1][IQK_Matrix_REG_NUM];
}IQK_MATRIX_REGS_SETTING,*PIQK_MATRIX_REGS_SETTING;
#if (DM_ODM_SUPPORT_TYPE & ODM_MP)
typedef struct _PathDiv_Parameter_define_
{
u4Byte org_5g_RegE30;
u4Byte org_5g_RegC14;
u4Byte org_5g_RegCA0;
u4Byte swt_5g_RegE30;
u4Byte swt_5g_RegC14;
u4Byte swt_5g_RegCA0;
//for 2G IQK information
u4Byte org_2g_RegC80;
u4Byte org_2g_RegC4C;
u4Byte org_2g_RegC94;
u4Byte org_2g_RegC14;
u4Byte org_2g_RegCA0;
u4Byte swt_2g_RegC80;
u4Byte swt_2g_RegC4C;
u4Byte swt_2g_RegC94;
u4Byte swt_2g_RegC14;
u4Byte swt_2g_RegCA0;
}PATHDIV_PARA,*pPATHDIV_PARA;
#endif
typedef struct ODM_RF_Calibration_Structure
{
//for tx power tracking
@ -1033,14 +894,7 @@ 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
#endif
{
//RT_TIMER FastAntTrainingTimer;
//
@ -1051,14 +905,7 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
// WHen you use Adapter or priv pointer, you must make sure the pointer is ready.
bool odm_ready;
#if (DM_ODM_SUPPORT_TYPE & (ODM_CE|ODM_MP))
rtl8192cd_priv fake_priv;
#endif
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
// ADSL_AP_BUILD_WORKAROUND
ADAPTER fake_adapter;
#endif
u8Byte DebugComponents;
u4Byte DebugLevel;
@ -1068,18 +915,6 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
u1Byte ControlChannel;
//------ ODM HANDLE, DRIVER NEEDS NOT TO HOOK------//
//--------REMOVED COMMON INFO----------//
//u1Byte PseudoMacPhyMode;
//bool *BTCoexist;
//bool PseudoBtCoexist;
//u1Byte OPMode;
//bool bAPMode;
//bool bClientMode;
//bool bAdHocMode;
//bool bSlaveOfDMSP;
//--------REMOVED COMMON INFO----------//
//1 COMMON INFORMATION
//
@ -1217,15 +1052,8 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
RXHP_T DM_RXHP_Table;
false_ALARM_STATISTICS FalseAlmCnt;
false_ALARM_STATISTICS FlaseAlmCntBuddyAdapter;
//#ifdef CONFIG_ANTENNA_DIVERSITY
SWAT_T DM_SWAT_Table;
bool RSSI_test;
//#endif
#if (DM_ODM_SUPPORT_TYPE & ODM_MP)
//Path Div Struct
PATHDIV_PARA pathIQK;
#endif
EDCA_T DM_EDCA_Table;
u4Byte WMMEDCA_BE;
@ -1234,17 +1062,6 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
// ==================================================
//
//common
//u1Byte DM_Type;
//u1Byte PSD_Report_RXHP[80]; // Add By Gary
//u1Byte PSD_func_flag; // Add By Gary
//for DIG
//u1Byte bDMInitialGainEnable;
//u1Byte binitialized; // for dm_initial_gain_Multi_STA use.
//for Antenna diversity
//u8 AntDivCfg;// 0:OFF , 1:ON, 2:by efuse
//PSTA_INFO_T RSSI_target;
bool *pbDriverStopped;
bool *pbDriverIsGoingToPnpSetPowerSleep;
bool *pinit_adpt_in_progress;
@ -1285,42 +1102,15 @@ typedef struct DM_Out_Source_Dynamic_Mechanism_Structure
//2011.09.27 add for Path Diversity
RT_TIMER CCKPathDiversityTimer;
RT_TIMER FastAntTrainingTimer;
// ODM relative workitem.
#if (DM_ODM_SUPPORT_TYPE == ODM_MP)
#if USE_WORKITEM
RT_WORK_ITEM PathDivSwitchWorkitem;
RT_WORK_ITEM CCKPathDiversityWorkitem;
RT_WORK_ITEM FastAntTrainingWorkitem;
#endif
#endif
#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
#endif
#if 1 //92c-series
#define ODM_RF_PATH_MAX 2
#else //jaguar - series
#define ODM_RF_PATH_MAX 4
#endif
typedef enum _ODM_RF_RADIO_PATH {
ODM_RF_PATH_A = 0, //Radio Path A
ODM_RF_PATH_B = 1, //Radio Path B
ODM_RF_PATH_C = 2, //Radio Path C
ODM_RF_PATH_D = 3, //Radio Path D
// ODM_RF_PATH_MAX, //Max RF number 90 support
} ODM_RF_RADIO_PATH_E, *PODM_RF_RADIO_PATH_E;
typedef enum _ODM_RF_CONTENT{
@ -1339,7 +1129,6 @@ typedef enum _ODM_BB_Config_Type{
} ODM_BB_Config_Type, *PODM_BB_Config_Type;
// Status code
#if (DM_ODM_SUPPORT_TYPE != ODM_MP)
typedef enum _RT_STATUS{
RT_STATUS_SUCCESS,
RT_STATUS_FAILURE,
@ -1350,7 +1139,6 @@ typedef enum _RT_STATUS{
RT_STATUS_NOT_SUPPORT,
RT_STATUS_OS_API_FAILED,
}RT_STATUS,*PRT_STATUS;
#endif // end of RT_STATUS definition
#ifdef REMOVE_PACK
#pragma pack()
@ -1432,11 +1220,7 @@ typedef enum tag_DIG_Connect_Definition
//vivi 92c&92d has different definition, 20110504
//this is for 92c
#ifdef CONFIG_SPECIAL_SETTING_FOR_FUNAI_TV
#define DM_DIG_FA_TH0 0x80//0x20
#else
#define DM_DIG_FA_TH0 0x200//0x20
#endif
#define DM_DIG_FA_TH1 0x300//0x100
#define DM_DIG_FA_TH2 0x400//0x200
//this is for 92d
@ -1541,13 +1325,7 @@ extern u1Byte CCKSwingTable_Ch14 [CCK_TABLE_SIZE][8];
//
// check Sta pointer valid or not
//
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#define IS_STA_VALID(pSta) (pSta && pSta->expire_to)
#elif (DM_ODM_SUPPORT_TYPE & ODM_MP)
#define IS_STA_VALID(pSta) (pSta && pSta->bUsed)
#else
#define IS_STA_VALID(pSta) (pSta)
#endif
// 20100514 Joseph: Add definition for antenna switching test after link.
// This indicates two different the steps.
// In SWAW_STEP_PEAK, driver needs to switch antenna and listen to the signal on the air.
@ -1586,81 +1364,9 @@ ODM_RAStateCheck(
pu1Byte pRATRState
);
#if (DM_ODM_SUPPORT_TYPE & (ODM_MP|ODM_AP|ODM_ADSL))
//============================================================
// function prototype
//============================================================
//#define DM_ChangeDynamicInitGainThresh ODM_ChangeDynamicInitGainThresh
//void ODM_ChangeDynamicInitGainThresh( PADAPTER pAdapter,
// INT32 DM_Type,
// INT32 DM_Value);
void
ODM_ChangeDynamicInitGainThresh(
PDM_ODM_T pDM_Odm,
u4Byte DM_Type,
u4Byte DM_Value
);
bool
ODM_CheckPowerStatus(
PADAPTER Adapter
);
#if (DM_ODM_SUPPORT_TYPE != ODM_ADSL)
void
ODM_RateAdaptiveStateApInit(
PADAPTER Adapter ,
PRT_WLAN_STA pEntry
);
#endif
#define AP_InitRateAdaptiveState ODM_RateAdaptiveStateApInit
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#ifdef WIFI_WMM
void
ODM_IotEdcaSwitch(
PDM_ODM_T pDM_Odm,
unsigned char enable
);
#endif
bool
ODM_ChooseIotMainSTA(
PDM_ODM_T pDM_Odm,
PSTA_INFO_T pstat
);
#endif
#if (DM_ODM_SUPPORT_TYPE==ODM_AP)
#ifdef HW_ANT_SWITCH
u1Byte
ODM_Diversity_AntennaSelect(
PDM_ODM_T pDM_Odm,
u1Byte *data
);
#endif
#endif
#define SwAntDivResetBeforeLink ODM_SwAntDivResetBeforeLink
void ODM_SwAntDivResetBeforeLink( PDM_ODM_T pDM_Odm);
//#define SwAntDivCheckBeforeLink8192C ODM_SwAntDivCheckBeforeLink8192C
#define SwAntDivCheckBeforeLink ODM_SwAntDivCheckBeforeLink8192C
bool
ODM_SwAntDivCheckBeforeLink8192C(
PDM_ODM_T pDM_Odm
);
#endif
#define dm_SWAW_RSSI_Check ODM_SwAntDivChkPerPktRssi
void ODM_SwAntDivChkPerPktRssi(PDM_ODM_T pDM_Odm, u1Byte StationID, PODM_PHY_INFO_T pPhyInfo);
#if ((DM_ODM_SUPPORT_TYPE==ODM_MP)||(DM_ODM_SUPPORT_TYPE==ODM_CE))
u4Byte ConvertTo_dB(u4Byte Value);
u4Byte
@ -1669,10 +1375,6 @@ GetPSDData(
unsigned int point,
u1Byte initial_gain_psd);
#endif
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
void
odm_DIGbyRSSI_LPS(
PDM_ODM_T pDM_Odm
@ -1683,42 +1385,6 @@ u4Byte ODM_Get_Rate_Bitmap(
u4Byte macid,
u4Byte ra_mask,
u1Byte rssi_level);
#endif
#if (DM_ODM_SUPPORT_TYPE & (ODM_MP))
#define dm_PSDMonitorCallback odm_PSDMonitorCallback
void odm_PSDMonitorCallback(PRT_TIMER pTimer);
void
odm_PSDMonitorWorkItemCallback(
void *pContext
);
void
PatchDCTone(
PDM_ODM_T pDM_Odm,
pu4Byte PSD_report,
u1Byte initial_gain_psd
);
void
ODM_PSDMonitor(
PDM_ODM_T pDM_Odm
);
void odm_PSD_Monitor(PDM_ODM_T pDM_Odm);
void odm_PSDMonitorInit(PDM_ODM_T pDM_Odm);
void
ODM_PSDDbgControl(
PADAPTER Adapter,
u4Byte mode,
u4Byte btRssi
);
#endif // DM_ODM_SUPPORT_TYPE
void ODM_DMInit( PDM_ODM_T pDM_Odm);
@ -1776,133 +1442,6 @@ ODM_ResetIQKResult(
PDM_ODM_T pDM_Odm
);
#if (DM_ODM_SUPPORT_TYPE == ODM_MP)
void ODM_InitAllWorkItems(PDM_ODM_T pDM_Odm );
void ODM_FreeAllWorkItems(PDM_ODM_T pDM_Odm );
void odm_PathDivChkAntSwitch(PDM_ODM_T pDM_Odm);
void ODM_PathDivRestAfterLink(
PDM_ODM_T pDM_Odm
);
//===========================================//
// Neil Chen----2011--06--15--
//3 Path Diversity
//===========================================================
#define TP_MODE 0
#define RSSI_MODE 1
#define TRAFFIC_LOW 0
#define TRAFFIC_HIGH 1
//#define PATHDIV_ENABLE 1
//void odm_PathDivChkAntSwitch(PADAPTER Adapter,u1Byte Step);
void ODM_PathDivRestAfterLink(
PDM_ODM_T pDM_Odm
);
#define dm_PathDiv_RSSI_Check ODM_PathDivChkPerPktRssi
void ODM_PathDivChkPerPktRssi(PADAPTER Adapter,
bool bIsDefPort,
bool bMatchBSSID,
PRT_WLAN_STA pEntry,
PRT_RFD pRfd );
u8Byte
PlatformDivision64(
u8Byte x,
u8Byte y
);
// 20100514 Joseph: Add definition for antenna switching test after link.
// This indicates two different the steps.
// In SWAW_STEP_PEAK, driver needs to switch antenna and listen to the signal on the air.
// In SWAW_STEP_DETERMINE, driver just compares the signal captured in SWAW_STEP_PEAK
// with original RSSI to determine if it is necessary to switch antenna.
#define SWAW_STEP_PEAK 0
#define SWAW_STEP_DETERMINE 1
//====================================================
//3 PathDiV End
//====================================================
#define PathDivCheckBeforeLink8192C ODM_PathDiversityBeforeLink92C
bool
ODM_PathDiversityBeforeLink92C(
// PADAPTER Adapter
PDM_ODM_T pDM_Odm
);
#define DM_ChangeDynamicInitGainThresh ODM_ChangeDynamicInitGainThresh
//void ODM_ChangeDynamicInitGainThresh( PADAPTER pAdapter,
// INT32 DM_Type,
// INT32 DM_Value);
//
void
ODM_CCKPathDiversityChkPerPktRssi(
PADAPTER Adapter,
bool bIsDefPort,
bool bMatchBSSID,
PRT_WLAN_STA pEntry,
PRT_RFD pRfd,
pu1Byte pDesc
);
typedef enum tag_DIG_Connect_Definition
{
DIG_STA_DISCONNECT = 0,
DIG_STA_CONNECT = 1,
DIG_STA_BEFORE_CONNECT = 2,
DIG_MultiSTA_DISCONNECT = 3,
DIG_MultiSTA_CONNECT = 4,
DIG_CONNECT_MAX
}DM_DIG_CONNECT_E;
void
ODM_FillTXPathInTXDESC(
PADAPTER Adapter,
PRT_TCB pTcb,
pu1Byte pDesc
);
#define dm_SWAW_RSSI_Check ODM_SwAntDivChkPerPktRssi
//
// 2012/01/12 MH Check afapter status. Temp fix BSOD.
//
#define HAL_ADAPTER_STS_CHK(pDM_Odm)\
if (pDM_Odm->Adapter == NULL)\
{\
return;\
}\
//
// For new definition in MP temporarily fro power tracking,
//
#define odm_TXPowerTrackingDirectCall(_Adapter) \
IS_HARDWARE_TYPE_8192D(_Adapter) ? odm_TXPowerTrackingCallback_ThermalMeter_92D(_Adapter) : \
IS_HARDWARE_TYPE_8192C(_Adapter) ? odm_TXPowerTrackingCallback_ThermalMeter_92C(_Adapter) : \
IS_HARDWARE_TYPE_8723A(_Adapter) ? odm_TXPowerTrackingCallback_ThermalMeter_8723A(_Adapter) :\
odm_TXPowerTrackingCallback_ThermalMeter_8188E(_Adapter)
void
ODM_SetTxAntByTxInfo_88C_92D(
PDM_ODM_T pDM_Odm,
pu1Byte pDesc,
u1Byte macId
);
#endif // #if (DM_ODM_SUPPORT_TYPE == ODM_MP)
void
ODM_AntselStatistics_88C(
PDM_ODM_T pDM_Odm,
@ -1911,8 +1450,6 @@ ODM_AntselStatistics_88C(
bool isCCKrate
);
#if ( DM_ODM_SUPPORT_TYPE & (ODM_MP |ODM_CE))
void
ODM_SingleDualAntennaDefaultSetting(
PDM_ODM_T pDM_Odm
@ -1924,10 +1461,6 @@ ODM_SingleDualAntennaDetection(
u1Byte mode
);
#endif // #if ((DM_ODM_SUPPORT_TYPE==ODM_MP)||(DM_ODM_SUPPORT_TYPE==ODM_CE))
#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
void odm_dtc(PDM_ODM_T pDM_Odm);
#endif /* #if (DM_ODM_SUPPORT_TYPE == ODM_CE) */
#endif

View file

@ -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,7 +62,6 @@ The protection mechanism is through the pending queue.
u8 bio_irp_timeout;
u8 bio_timer_cancel;
#endif
#endif
};
@ -83,7 +81,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);
@ -100,7 +97,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);

View file

@ -237,10 +237,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)

View file

@ -156,12 +156,10 @@ 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__

View file

@ -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,7 +30,6 @@
#include <linux/semaphore.h>
#endif
#include <linux/sem.h>
#endif
#else
#include <wlan_bssdef.h>
#endif//CONFIG_RTL8711FW

View file

@ -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>
@ -56,14 +55,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

View file

@ -112,7 +112,7 @@ static NDIS_STATUS oid_null_function(struct oid_par_priv* poid_par_priv)
}
#endif
#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT)
#if defined(CONFIG_WIRELESS_EXT)
extern struct iw_handler_def rtw_handlers_def;
#endif

View file

@ -590,19 +590,12 @@ extern void rtw_cpwm_event_callback(_adapter *adapter, u8 *pbuf);
void indicate_wx_scan_complete_event(_adapter *padapter);
void rtw_indicate_wx_assoc_event(_adapter *padapter);
void rtw_indicate_wx_disassoc_event(_adapter *padapter);
#if defined (PLATFORM_LINUX)
extern int event_thread(void *context);
extern void rtw_join_timeout_handler(void* FunctionContext);
extern void _rtw_scan_timeout_handler(void* FunctionContext);
#endif
extern void rtw_free_network_queue(_adapter *adapter,u8 isfreeall);
extern int rtw_init_mlme_priv(_adapter *adapter);// (struct mlme_priv *pmlmepriv);
extern void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv);
extern sint rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv);
extern sint rtw_set_key(_adapter *adapter,struct security_priv *psecuritypriv,sint keyid, u8 set_tx);
extern sint rtw_set_auth(_adapter *adapter,struct security_priv *psecuritypriv);

View file

@ -118,15 +118,9 @@ struct mp_xmit_frame
#ifdef CONFIG_USB_HCI
//insert urb, irp, and irpcnt info below...
//max frag_cnt = 8
u8 *mem_addr;
u32 sz[8];
#if defined(PLATFORM_LINUX)
PURB pxmit_urb[8];
#endif
u8 bpending[8];
sint ac_tag[8];
sint last[8];

View file

@ -251,15 +251,11 @@ 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
#endif
#if defined(PLATFORM_LINUX)
struct tasklet_struct irq_prepare_beacon_tasklet;
struct tasklet_struct recv_tasklet;
struct sk_buff_head free_recv_skb_queue;
@ -272,7 +268,6 @@ struct recv_priv
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
_queue recv_buf_pending_queue;
#endif // CONFIG_USE_USB_BUFFER_ALLOC_RX
#endif //defined(PLATFORM_LINUX)
u8 *pallocated_recv_buf;
u8 *precv_buf; // 4 alignment
@ -357,21 +352,17 @@ struct recv_buf
#ifdef CONFIG_USB_HCI
#if defined(PLATFORM_LINUX)
PURB purb;
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
u32 alloc_sz;
#endif
u8 irp_pending;
int transfer_len;
#endif
#ifdef PLATFORM_LINUX
_pkt *pskb;
u8 reuse;
#endif
};

View file

@ -424,8 +424,6 @@ 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
#endif //__RTL871X_SECURITY_H_

View file

@ -263,9 +263,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 {
@ -314,16 +312,10 @@ struct xmit_buf
//u32 sz[8];
u32 ff_hwaddr;
#if defined(PLATFORM_LINUX)
PURB pxmit_urb[8];
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
#endif
u8 bpending[8];
sint last[8];
#endif
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
@ -484,10 +476,7 @@ struct xmit_priv {
#ifdef CONFIG_USB_HCI
_sema tx_retevt;//all tx return event;
u8 txirp_cnt;//
#ifdef PLATFORM_LINUX
struct tasklet_struct xmit_tasklet;
#endif
//per AC pending irp
int beq_cnt;
int bkq_cnt;
@ -501,17 +490,13 @@ 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
#endif
#endif
_queue free_xmitbuf_queue;

View file

@ -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);

View file

@ -656,7 +656,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;
@ -665,17 +664,11 @@ 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
#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
#if defined(PLATFORM_LINUX)
/**
* struct rtw_ieee80211_ht_cap - HT capabilities
*
@ -707,12 +700,9 @@ struct ieee80211_ht_addt_info {
} __attribute__ ((packed));
struct HT_caps_element
{
union
{
struct
{
struct HT_caps_element {
union {
struct {
__le16 HT_caps_info;
unsigned char AMPDU_para;
unsigned char MCS_rate[16];
@ -721,42 +711,34 @@ struct HT_caps_element
unsigned char ASEL_caps;
} HT_cap_element;
unsigned char HT_cap[26];
}u;
} u;
} __attribute__ ((packed));
struct HT_info_element
{
struct HT_info_element {
unsigned char primary_channel;
unsigned char infos[5];
unsigned char MCS_rate[16];
} __attribute__ ((packed));
struct AC_param
{
struct AC_param {
unsigned char ACI_AIFSN;
unsigned char CW;
__le16 TXOP_limit;
} __attribute__ ((packed));
struct WMM_para_element
{
struct WMM_para_element {
unsigned char QoS_info;
unsigned char reserved;
struct AC_param ac_param[4];
} __attribute__ ((packed));
struct ADDBA_request
{
struct ADDBA_request {
unsigned char dialog_token;
unsigned short BA_para_set;
unsigned short BA_timeout_value;
unsigned short BA_starting_seqctrl;
} __attribute__ ((packed));
#endif
typedef enum _HT_CAP_AMPDU_FACTOR {
MAX_AMPDU_FACTOR_8K = 0,
MAX_AMPDU_FACTOR_16K = 1,

View file

@ -23,8 +23,6 @@
#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
@ -268,8 +266,6 @@ typedef struct _NDIS_802_11_TEST
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
#endif //end of #ifdef PLATFORM_LINUX
#ifndef Ndis802_11APMode
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
#endif