_func_exit_;
}
-thread_return rtw_cmd_thread(thread_context context)
+int rtw_cmd_thread(void *context)
{
u8 ret;
struct cmd_obj *pcmd;
return pmpframe;
}
-static thread_return mp_xmit_packet_thread(thread_context context)
+static int mp_xmit_packet_thread(void *context)
{
struct xmit_frame *pxmitframe;
struct mp_tx *pmptx;
RT_WORK_ITEM SwAntennaSwitchWorkitem;\r
#endif\r
#endif\r
-/* CE Platform use\r
-#ifdef CONFIG_SW_ANTENNA_DIVERSITY\r
- _timer SwAntennaSwitchTimer; \r
- u8Byte lastTxOkCnt;\r
- u8Byte lastRxOkCnt;\r
- u8Byte TXByteCnt_A;\r
- u8Byte TXByteCnt_B;\r
- u8Byte RXByteCnt_A;\r
- u8Byte RXByteCnt_B;\r
- u1Byte DoubleComfirm;\r
- u1Byte TrafficLoad;\r
- //SW Antenna Switch\r
-\r
-\r
-#endif\r
-*/\r
#ifdef CONFIG_HW_ANTENNA_DIVERSITY\r
//Hybrid Antenna Diversity\r
u4Byte CCK_Ant1_Cnt[ASSOCIATE_ENTRY_NUM];\r
{
#ifdef CONFIG_SDIO_HCI
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(dst_adapter);
- //_thread_hdl_ SdioXmitThread;
_sema temp_SdioXmitSema;
_sema temp_SdioXmitTerminateSema;
- //u8 SdioTxFIFOFreePage[SDIO_TX_FREE_PG_QUEUE];
_lock temp_SdioTxFIFOFreePageLock;
memcpy(&temp_SdioXmitSema, &(pHalData->SdioXmitSema), sizeof(_sema));
typedef struct loopbackdata
{
_sema sema;
- _thread_hdl_ lbkthread;
+ void * lbkthread;
u8 bstop;
u32 cnt;
u16 size;
u8 init_adpt_in_progress;
u8 bHaltInProgress;
- _thread_hdl_ cmdThread;
- _thread_hdl_ evtThread;
- _thread_hdl_ xmitThread;
- _thread_hdl_ recvThread;
+ void *cmdThread;
+ void *evtThread;
+ void *xmitThread;
+ void *recvThread;
void (*intf_start)(_adapter * adapter);
void (*intf_stop)(_adapter * adapter);
u8 io_irp_cnt;
u8 bio_irp_pending;
_sema io_retevt;
- _timer io_timer;
+ struct timer_list io_timer;
u8 bio_irp_timeout;
u8 bio_timer_cancel;
#endif
#else
typedef struct semaphore _mutex;
#endif
-typedef struct timer_list _timer;
struct __queue {
struct list_head queue;
_lock lock;
};
-typedef unsigned char _buffer;
-
typedef struct __queue _queue;
typedef struct list_head _list;
-typedef void* _thread_hdl_;
-typedef int thread_return;
-typedef void* thread_context;
-
#define thread_exit() complete_and_exit(NULL, 0)
typedef void timer_hdl_return;
list_del_init(plist);
}
-static inline void _init_timer(_timer *ptimer, struct net_device *nic_hdl,
+static inline void _init_timer(struct timer_list *ptimer, struct net_device *nic_hdl,
void *pfunc, void* cntx)
{
//setup_timer(ptimer, pfunc,(u32)cntx);
init_timer(ptimer);
}
-static inline void _set_timer(_timer *ptimer,u32 delay_time)
+static inline void _set_timer(struct timer_list *ptimer,u32 delay_time)
{
mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
}
-static inline void _cancel_timer(_timer *ptimer,u8 *bcancelled)
+static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled)
{
del_timer_sync(ptimer);
*bcancelled= true;//TRUE ==1; FALSE==0
extern void rtw_yield_os(void);
-static inline unsigned char _cancel_timer_ex(_timer *ptimer)
+static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer)
{
return del_timer_sync(ptimer);
}
-static __inline void thread_enter(char *name)
+static inline void thread_enter(char *name)
{
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(3,7,0))
daemonize("%s", name);
BT_TRAFFIC_STATISTICS Bt30TrafficStatistics;
} BT_TRAFFIC, *PBT_TRAFFIC;
-#define RT_WORK_ITEM _workitem
-#define RT_THREAD _thread_hdl_
-
typedef struct _BT_SECURITY
{
// WPA auth state
// May need to remove to BTSecInfo ...
- //BT_STATE_WPA_AUTH BTWPAAuthState;
- //u8 PMK[PMK_LEN];
RT_TIMER BTWPAAuthTimer;
OCTET_STRING RSNIE;
u8 RSNIEBuf[MAXRSNIELEN];
BT_SECURITY BtSec;
#if(BT_THREAD == 0)
- RT_WORK_ITEM HCICmdWorkItem;
+ _workitem HCICmdWorkItem;
RT_TIMER BTHCICmdTimer;
#endif
#if (SENDTXMEHTOD==0)
- RT_WORK_ITEM HCISendACLDataWorkItem;
+ _workitem HCISendACLDataWorkItem;
RT_TIMER BTHCISendAclDataTimer;
#elif(SENDTXMEHTOD==2)
- RT_THREAD BTTxThread;
+ void *BTTxThread;
#endif
- RT_WORK_ITEM BTPsDisableWorkItem;
- RT_WORK_ITEM BTConnectWorkItem;
+ _workitem BTPsDisableWorkItem;
+ _workitem BTConnectWorkItem;
RT_TIMER BTHCIDiscardAclDataTimer;
RT_TIMER BTHCIJoinTimeoutTimer;
RT_TIMER BTTestSendPacketTimer;
u32 prv_traffic_idx; // edca turbo
-/*
- // for dm_RF_Saving
- u8 initialize;
- u32 rf_saving_Reg874;
- u32 rf_saving_RegC70;
- u32 rf_saving_Reg85C;
- u32 rf_saving_RegA74;
-*/
- //for Antenna diversity
-#ifdef CONFIG_ANTENNA_DIVERSITY
-// SWAT_T DM_SWAT_Table;
-#endif
-
-#ifdef CONFIG_SW_ANTENNA_DIVERSITY
-// _timer SwAntennaSwitchTimer;
-/*
- u64 lastTxOkCnt;
- u64 lastRxOkCnt;
- u64 TXByteCnt_A;
- u64 TXByteCnt_B;
- u64 RXByteCnt_A;
- u64 RXByteCnt_B;
- u8 DoubleComfirm;
- u8 TrafficLoad;
-*/
-#endif
-
s32 OFDM_Pkt_Cnt;
u8 RSSI_Select;
-// u8 DIG_Dynamic_MIN ;
-//###### duplicate code,will move to ODM #########
- // Add for Reading Initial Data Rate SEL Register 0x484 during watchdog. Using for fill tx desc. 2011.3.21 by Thomas
u8 INIDATA_RATE[32];
};
void rtl8723a_InitHalDm(PADAPTER padapter);
void rtl8723a_HalDmWatchDog(PADAPTER padapter);
-
-
#endif
// HIQ, MID, LOW, PUB free pages; padapter->xmitpriv.free_txpg
u8 SdioTxFIFOFreePage[SDIO_TX_FREE_PG_QUEUE];
_lock SdioTxFIFOFreePageLock;
- _thread_hdl_ SdioXmitThread;
+ void *SdioXmitThread;
_sema SdioXmitSema;
_sema SdioXmitTerminateSema;
extern void rtw_free_evt_obj(struct evt_obj *pcmd);
#endif
-thread_return rtw_cmd_thread(thread_context context);
+int rtw_cmd_thread(void *context);
extern u32 rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
extern void rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
LED_STATE_871x CurrLedState; // Current LED state.
LED_STATE_871x BlinkingLedState; // Next state for blinking, either RTW_LED_ON or RTW_LED_OFF are.
- u8 bLedOn; // true if LED is ON, false if LED is OFF.
+ u8 bLedOn; // true if LED is ON, false if LED is OFF.
- u8 bLedBlinkInProgress; // true if it is blinking, false o.w..
+ u8 bLedBlinkInProgress; // true if it is blinking, false o.w..
- u8 bLedWPSBlinkInProgress;
+ u8 bLedWPSBlinkInProgress;
- u32 BlinkTimes; // Number of times to toggle led state for blinking.
+ u32 BlinkTimes; // Number of times to toggle led state for blinking.
- _timer BlinkTimer; // Timer object for led blinking.
+ struct timer_list BlinkTimer; // Timer object for led blinking.
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
- u8 bSWLedCtrl;
+ u8 bSWLedCtrl;
// ALPHA, added by chiyoko, 20090106
- u8 bLedNoLinkBlinkInProgress;
- u8 bLedLinkBlinkInProgress;
- u8 bLedStartToLinkBlinkInProgress;
- u8 bLedScanBlinkInProgress;
+ u8 bLedNoLinkBlinkInProgress;
+ u8 bLedLinkBlinkInProgress;
+ u8 bLedStartToLinkBlinkInProgress;
+ u8 bLedScanBlinkInProgress;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
_workitem BlinkWorkItem; // Workitem used by BlinkTimer to manipulate H/W to blink LED.
u64 last_tx_pkts;
uint last_rx_pkts;
sint traffic_busy;
- _timer sitesurvey_ctrl_timer;
+ struct timer_list sitesurvey_ctrl_timer;
};
typedef struct _RT_LINK_DETECT_T{
#ifdef CONFIG_IOCTL_CFG80211
struct cfg80211_wifidirect_info{
- _timer remain_on_ch_timer;
- u8 restore_channel;
+ struct timer_list remain_on_ch_timer;
+ u8 restore_channel;
struct ieee80211_channel remain_on_ch_channel;
enum nl80211_channel_type remain_on_ch_type;
u64 remain_on_ch_cookie;
struct wifidirect_info{
_adapter* padapter;
- _timer find_phase_timer;
- _timer restore_p2p_state_timer;
+ struct timer_list find_phase_timer;
+ struct timer_list restore_p2p_state_timer;
// Used to do the scanning. After confirming the peer is availalble, the driver transmits the P2P frame to peer.
- _timer pre_tx_scan_timer;
+ struct timer_list pre_tx_scan_timer;
#ifdef CONFIG_CONCURRENT_MODE
// Used to switch the channel between legacy AP and listen state.
- _timer ap_p2p_switch_timer;
+ struct timer_list ap_p2p_switch_timer;
#endif
struct tx_provdisc_req_info tx_prov_disc_info;
struct rx_provdisc_req_info rx_prov_disc_info;
u32 scan_interval;
- _timer assoc_timer;
+ struct timer_list assoc_timer;
uint assoc_by_bssid;
uint assoc_by_rssi;
- _timer scan_to_timer; // driver itself handles scan_timeout status.
+ struct timer_list scan_to_timer; // driver itself handles scan_timeout status.
u32 scan_start_time; // used to evaluate the time spent in scanning
#ifdef CONFIG_SET_SCAN_DENY_TIMER
- _timer set_scan_deny_timer;
+ struct timer_list set_scan_deny_timer;
ATOMIC_T set_scan_deny; //0: allowed, 1: deny
#endif
#endif
RT_LINK_DETECT_T LinkDetectInfo;
- _timer dynamic_chk_timer; //dynamic/periodic check timer
+ struct timer_list dynamic_chk_timer; //dynamic/periodic check timer
u8 key_mask; //use for ips to set wep key after ips_leave
u8 acm_mask; // for wmm acm mask
#ifdef CONFIG_INTEL_WIDI
int widi_state;
int listen_state;
- _timer listen_timer;
+ struct timer_list listen_timer;
ATOMIC_T rx_probe_rsp; // 1:receive probe respone from RDS source.
u8 *l2sdTaBuffer;
u8 channel_idx;
struct ss_res sitesurvey_res;
struct mlme_ext_info mlmext_info;//for sta/adhoc mode, including current scanning/connecting/connected related info.
//for ap mode, network includes ap's cap_info
- _timer survey_timer;
- _timer link_timer;
- //_timer ADDBA_timer;
+ struct timer_list survey_timer;
+ struct timer_list link_timer;
u16 chan_scan_time;
u8 scan_abort;
u8 *pallocated_buf;
u8 *buf;
u32 buf_size, write_size;
- _thread_hdl_ PktTxThread;
+ void *PktTxThread;
};
#include <Hal8723APhyCfg.h>
bool bMptDrvUnload;
_sema MPh2c_Sema;
- _timer MPh2c_timeout_timer;
+ struct timer_list MPh2c_timeout_timer;
// Event used to sync H2c for BT control
bool MptH2cRspEvent;
#ifdef CONFIG_LPS_RPWM_TIMER
u8 brpwmtimeout;
_workitem rpwmtimeoutwi;
- _timer pwr_rpwm_timer;
+ struct timer_list pwr_rpwm_timer;
#endif // CONFIG_LPS_RPWM_TIMER
u8 bpower_saving;
u8 wowlan_wake_reason;
u32 wowlan_pattern_context[8][5];
#endif // CONFIG_WOWLAN
- _timer pwr_state_check_timer;
+ struct timer_list pwr_state_check_timer;
int pwr_state_check_interval;
u8 pwr_state_check_cnts;
u16 wend_b;
u8 wsize_b;
_queue pending_recvframe_queue;
- _timer reordering_ctrl_timer;
+ struct timer_list reordering_ctrl_timer;
};
struct stainfo_rxcache {
u16 tid_rxseq[16];
-/*
- unsigned short tid0_rxseq;
- unsigned short tid1_rxseq;
- unsigned short tid2_rxseq;
- unsigned short tid3_rxseq;
- unsigned short tid4_rxseq;
- unsigned short tid5_rxseq;
- unsigned short tid6_rxseq;
- unsigned short tid7_rxseq;
- unsigned short tid8_rxseq;
- unsigned short tid9_rxseq;
- unsigned short tid10_rxseq;
- unsigned short tid11_rxseq;
- unsigned short tid12_rxseq;
- unsigned short tid13_rxseq;
- unsigned short tid14_rxseq;
- unsigned short tid15_rxseq;
-*/
};
int FalseAlmCnt_all;
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
- _timer signal_stat_timer;
+ struct timer_list signal_stat_timer;
u32 signal_stat_sampling_interval;
//u32 signal_stat_converging_constant;
struct signal_stat signal_qual_data;
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
-__inline static u8 *get_rxmem(union recv_frame *precvframe)
+static inline u8 *get_rxmem(union recv_frame *precvframe)
{
//always return rx_head...
if(precvframe==NULL)
return precvframe->u.hdr.rx_head;
}
-__inline static u8 *get_rx_status(union recv_frame *precvframe)
+static inline u8 *get_rx_status(union recv_frame *precvframe)
{
return get_rxmem(precvframe);
}
-__inline static u8 *get_recvframe_data(union recv_frame *precvframe)
+static inline u8 *get_recvframe_data(union recv_frame *precvframe)
{
//alwasy return rx_data
}
-__inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz)
+static inline u8 *recvframe_push(union recv_frame *precvframe, sint sz)
{
// append data before rx_data
}
-__inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
+static inline u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
{
// rx_data += sz; move rx_data sz bytes hereafter
}
-__inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
+static inline u8 *recvframe_put(union recv_frame *precvframe, sint sz)
{
// rx_tai += sz; move rx_tail sz bytes hereafter
-__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
+static inline u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
{
// rmv data from rx_tail (by yitsen)
-__inline static _buffer * get_rxbuf_desc(union recv_frame *precvframe)
+static inline unsigned char *get_rxbuf_desc(union recv_frame *precvframe)
{
- _buffer * buf_desc;
+ unsigned char *buf_desc;
- if(precvframe==NULL)
+ if (precvframe == NULL)
return NULL;
return buf_desc;
}
-__inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
+static inline union recv_frame *rxmem_to_recvframe(u8 *rxmem)
{
//due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame
//from any given member of recv_frame.
}
-__inline static union recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
+static inline union recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
{
u8 * buf_star;
return precv_frame;
}
-__inline static u8 *pkt_to_recvmem(struct sk_buff *pkt)
+static inline u8 *pkt_to_recvmem(struct sk_buff *pkt)
{
// return the rx_head
}
-__inline static u8 *pkt_to_recvdata(struct sk_buff *pkt)
+static inline u8 *pkt_to_recvdata(struct sk_buff *pkt)
{
// return the rx_data
}
-__inline static sint get_recvframe_len(union recv_frame *precvframe)
+static inline sint get_recvframe_len(union recv_frame *precvframe)
{
return precvframe->u.hdr.len;
}
-__inline static s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
+static inline s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
{
s32 SignalPower; // in dBm.
u8 binstallGrpkey;
u8 busetkipkey;
- //_timer tkip_timer;
u8 bcheck_grpkey;
u8 bgrpkey_handshake;
- //u8 packet_cnt;//unused, removed
-
s32 sw_encrypt;//from registry_priv
s32 sw_decrypt;//from registry_priv
u8 ANonce[32];
u32 TDLS_PeerKey_Lifetime;
u16 TPK_count;
- _timer TPK_timer;
+ struct timer_list TPK_timer;
struct TDLS_PeerKey tpk;
_adapter *padapter;
u16 stat_code;
u16 ch_switch_time;
u16 ch_switch_timeout;
u8 option;
- _timer option_timer;
- _timer base_ch_timer;
- _timer off_ch_timer;
+ struct timer_list option_timer;
+ struct timer_list base_ch_timer;
+ struct timer_list off_ch_timer;
- _timer handshake_timer;
- _timer alive_timer1;
- _timer alive_timer2;
+ struct timer_list handshake_timer;
+ struct timer_list alive_timer1;
+ struct timer_list alive_timer2;
u8 timer_flag;
u8 alive_count;
#endif //CONFIG_TDLS
//for A-MPDU TX, ADDBA timeout check
- _timer addba_retry_timer;
+ struct timer_list addba_retry_timer;
//for A-MPDU Rx reordering buffer control
struct recv_reorder_ctrl recvreorder_ctrl[16];
struct pkt_file {
struct sk_buff *pkt;
__kernel_size_t pkt_len; //the remainder length of the open_file
- _buffer *cur_buffer;
+ unsigned char *cur_buffer;
u8 *buf_start;
u8 *cur_addr;
__kernel_size_t buf_len;