diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index f6466e4..9379d2a 100755 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -43,7 +43,7 @@ sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv) { sint res=_SUCCESS; -_func_enter_; +; _rtw_init_sema(&(pcmdpriv->cmd_queue_sema), 0); //_rtw_init_sema(&(pcmdpriv->cmd_done_sema), 0); @@ -78,7 +78,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -91,7 +91,7 @@ sint _rtw_init_evt_priv(struct evt_priv *pevtpriv) { sint res=_SUCCESS; -_func_enter_; +; #ifdef CONFIG_H2CLBK _rtw_init_sema(&(pevtpriv->lbkevt_done), 0); @@ -128,14 +128,14 @@ exit: pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1); #endif -_func_exit_; +; return res; } void _rtw_free_evt_priv (struct evt_priv *pevtpriv) { -_func_enter_; +; RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("+_rtw_free_evt_priv \n")); @@ -165,13 +165,13 @@ _func_enter_; RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("-_rtw_free_evt_priv \n")); -_func_exit_; +; } void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv) { -_func_enter_; +; if(pcmdpriv){ _rtw_spinlock_free(&(pcmdpriv->cmd_queue.lock)); @@ -185,7 +185,7 @@ _func_enter_; if (pcmdpriv->rsp_allocated_buf) rtw_mfree(pcmdpriv->rsp_allocated_buf, MAX_RSPSZ + 4); } -_func_exit_; +; } /* @@ -202,7 +202,7 @@ sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj) { _irqL irqL; -_func_enter_; +; if (obj == NULL) goto exit; @@ -217,7 +217,7 @@ _func_enter_; exit: -_func_exit_; +; return _SUCCESS; } @@ -227,7 +227,7 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue) _irqL irqL; struct cmd_obj *obj; -_func_enter_; +; //_enter_critical_bh(&(queue->lock), &irqL); _enter_critical(&queue->lock, &irqL); @@ -242,7 +242,7 @@ _func_enter_; //_exit_critical_bh(&(queue->lock), &irqL); _exit_critical(&queue->lock, &irqL); -_func_exit_; +; return obj; } @@ -250,35 +250,35 @@ _func_exit_; u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) { u32 res; -_func_enter_; +; res = _rtw_init_cmd_priv (pcmdpriv); -_func_exit_; +; return res; } u32 rtw_init_evt_priv (struct evt_priv *pevtpriv) { int res; -_func_enter_; +; res = _rtw_init_evt_priv(pevtpriv); -_func_exit_; +; return res; } void rtw_free_evt_priv (struct evt_priv *pevtpriv) { -_func_enter_; +; RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("rtw_free_evt_priv\n")); _rtw_free_evt_priv(pevtpriv); -_func_exit_; +; } void rtw_free_cmd_priv (struct cmd_priv *pcmdpriv) { -_func_enter_; +; RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("rtw_free_cmd_priv\n")); _rtw_free_cmd_priv(pcmdpriv); -_func_exit_; +; } int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj); @@ -329,7 +329,7 @@ u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) int res = _FAIL; struct adapter *padapter = pcmdpriv->padapter; -_func_enter_; +; if (cmd_obj == NULL) { goto exit; @@ -355,7 +355,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -364,25 +364,25 @@ struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv) { struct cmd_obj *cmd_obj; -_func_enter_; +; cmd_obj = _rtw_dequeue_cmd(&pcmdpriv->cmd_queue); -_func_exit_; +; return cmd_obj; } void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv) { -_func_enter_; +; pcmdpriv->cmd_done_cnt++; //_rtw_up_sema(&(pcmdpriv->cmd_done_sema)); -_func_exit_; +; } void rtw_free_cmd_obj(struct cmd_obj *pcmd) { -_func_enter_; +; if((pcmd->cmdcode!=_JoinBss_CMD_) &&(pcmd->cmdcode!= _CreateBss_CMD_)) { @@ -402,7 +402,7 @@ _func_enter_; //free cmd_obj rtw_mfree((unsigned char*)pcmd, sizeof(struct cmd_obj)); -_func_exit_; +; } @@ -427,7 +427,7 @@ thread_return rtw_cmd_thread(thread_context context) struct adapter *padapter = (struct adapter *)context; struct cmd_priv *pcmdpriv = &(padapter->cmdpriv); -_func_enter_; +; thread_enter("RTW_CMD_THREAD"); @@ -568,7 +568,7 @@ post_process: _rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema); -_func_exit_; +; thread_exit(); @@ -582,7 +582,7 @@ u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj) int res; _queue *queue = &pevtpriv->evt_queue; -_func_enter_; +; res = _SUCCESS; @@ -601,7 +601,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -611,7 +611,7 @@ struct evt_obj *rtw_dequeue_evt(_queue *queue) _irqL irqL; struct evt_obj *pevtobj; -_func_enter_; +; _enter_critical_bh(&queue->lock, &irqL); @@ -625,29 +625,29 @@ _func_enter_; _exit_critical_bh(&queue->lock, &irqL); -_func_exit_; +; return pevtobj; } void rtw_free_evt_obj(struct evt_obj *pevtobj) { -_func_enter_; +; if(pevtobj->parmbuf) rtw_mfree((unsigned char*)pevtobj->parmbuf, pevtobj->evtsz); rtw_mfree((unsigned char*)pevtobj, sizeof(struct evt_obj)); -_func_exit_; +; } void rtw_evt_notify_isr(struct evt_priv *pevtpriv) { -_func_enter_; +; pevtpriv->evt_done_cnt++; _rtw_up_sema(&(pevtpriv->evt_notify)); -_func_exit_; +; } #endif @@ -663,7 +663,7 @@ u8 rtw_setstandby_cmd(struct adapter *padapter, uint action) u8 ret = _SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if (ph2c == NULL) { @@ -686,7 +686,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; } @@ -708,7 +708,7 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, NDIS_802_11_SSID *ssid, int ssi struct wifidirect_info *pwdinfo= &(padapter->wdinfo); #endif //CONFIG_P2P -_func_enter_; +; #ifdef CONFIG_LPS if(check_fwstate(pmlmepriv, _FW_LINKED) == true){ @@ -791,7 +791,7 @@ _func_enter_; _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); } -_func_exit_; +; return res; } @@ -803,7 +803,7 @@ u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset) struct cmd_priv* pcmdpriv = &padapter->cmdpriv; u8 res = _SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if (ph2c == NULL) { @@ -829,7 +829,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; } @@ -841,7 +841,7 @@ u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset) struct cmd_priv* pcmdpriv=&padapter->cmdpriv; u8 res = _SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if (ph2c == NULL) { @@ -863,7 +863,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; } @@ -885,7 +885,7 @@ u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch) // struct registry_priv* pregistry_priv = &padapter->registrypriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ @@ -909,7 +909,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; } @@ -919,7 +919,7 @@ u8 rtw_setbbreg_cmd(struct adapter*padapter, u8 offset, u8 val) struct writeBB_parm* pwritebbparm; struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ res= _FAIL; @@ -940,7 +940,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; } @@ -951,7 +951,7 @@ u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ res=_FAIL; @@ -975,7 +975,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; } @@ -985,7 +985,7 @@ u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val) struct writeRF_parm* pwriterfparm; struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ res= _FAIL; @@ -1006,7 +1006,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; } @@ -1017,7 +1017,7 @@ u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ @@ -1045,30 +1045,30 @@ _func_enter_; exit: -_func_exit_; +; return res; } void rtw_getbbrfreg_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd) { - _func_enter_; + ; //rtw_free_cmd_obj(pcmd); rtw_mfree((unsigned char*) pcmd->parmbuf, pcmd->cmdsz); rtw_mfree((unsigned char*) pcmd, sizeof(struct cmd_obj)); -_func_exit_; +; } void rtw_readtssi_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd) { - _func_enter_; + ; rtw_mfree((unsigned char*) pcmd->parmbuf, pcmd->cmdsz); rtw_mfree((unsigned char*) pcmd, sizeof(struct cmd_obj)); -_func_exit_; +; } u8 rtw_createbss_cmd(struct adapter *padapter) @@ -1079,7 +1079,7 @@ u8 rtw_createbss_cmd(struct adapter *padapter) WLAN_BSSID_EX *pdev_network = &padapter->registrypriv.dev_network; u8 res=_SUCCESS; -_func_enter_; +; rtw_led_control(padapter, LED_CTL_START_TO_LINK); @@ -1108,7 +1108,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1119,7 +1119,7 @@ u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, unsigned struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(pcmd==NULL){ @@ -1138,7 +1138,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1161,7 +1161,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -_func_enter_; +; rtw_led_control(padapter, LED_CTL_START_TO_LINK); @@ -1309,7 +1309,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1321,7 +1321,7 @@ u8 rtw_disassoc_cmd(struct adapter*padapter, u32 deauth_timeout_ms, bool enqueue struct cmd_priv *cmdpriv = &padapter->cmdpriv; u8 res = _SUCCESS; -_func_enter_; +; RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_disassoc_cmd\n")); @@ -1352,7 +1352,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1365,7 +1365,7 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTU struct cmd_priv *pcmdpriv= &padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; psetop = (struct setopmode_parm*)rtw_zmalloc(sizeof(struct setopmode_parm)); if(psetop==NULL){ @@ -1391,7 +1391,7 @@ _func_enter_; } exit: -_func_exit_; +; return res; } @@ -1408,7 +1408,7 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key, bool en struct sta_info* sta = (struct sta_info* )psta; u8 res=_SUCCESS; -_func_enter_; +; psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm)); if(psetstakey_para==NULL){ @@ -1472,7 +1472,7 @@ _func_enter_; } exit: -_func_exit_; +; return res; } @@ -1488,7 +1488,7 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue) struct sta_info* sta = (struct sta_info* )psta; u8 res=_SUCCESS; -_func_enter_; +; if(!enqueue) { @@ -1533,7 +1533,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1544,7 +1544,7 @@ u8 rtw_setrttbl_cmd(struct adapter *padapter, struct setratable_parm *prate_tab struct setratable_parm * psetrttblparm; struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ @@ -1565,7 +1565,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; } @@ -1576,7 +1576,7 @@ u8 rtw_getrttbl_cmd(struct adapter *padapter, struct getratable_rsp *pval) struct getratable_parm * pgetrttblparm; struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ @@ -1604,7 +1604,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; } @@ -1618,7 +1618,7 @@ u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr) u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ @@ -1650,7 +1650,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1663,7 +1663,7 @@ u8 rtw_addbareq_cmd(struct adapter*padapter, u8 tid, u8 *addr) u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ @@ -1690,7 +1690,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1702,7 +1702,7 @@ u8 rtw_reset_securitypriv_cmd(struct adapter*padapter) struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ @@ -1729,7 +1729,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -1742,7 +1742,7 @@ u8 rtw_free_assoc_resources_cmd(struct adapter*padapter) struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ @@ -1769,7 +1769,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -1782,7 +1782,7 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter*padapter) struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; #ifdef CONFIG_CONCURRENT_MODE if (padapter->adapter_type != PRIMARY_ADAPTER && padapter->pbuddy_adapter) @@ -1814,7 +1814,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -1828,7 +1828,7 @@ u8 rtw_set_ch_cmd(struct adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueu u8 res=_SUCCESS; -_func_enter_; +; DBG_871X(FUNC_NDEV_FMT" ch:%u, bw:%u, ch_offset:%u\n", FUNC_NDEV_ARG(padapter->pnetdev), ch, bw, ch_offset); @@ -1870,7 +1870,7 @@ exit: DBG_871X(FUNC_NDEV_FMT" res:%u\n", FUNC_NDEV_ARG(padapter->pnetdev), res); -_func_exit_; +; return res; } @@ -1883,7 +1883,7 @@ u8 rtw_set_chplan_cmd(struct adapter*padapter, u8 chplan, u8 enqueue) u8 res=_SUCCESS; -_func_enter_; +; RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_chplan_cmd\n")); @@ -1929,7 +1929,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1942,7 +1942,7 @@ u8 rtw_led_blink_cmd(struct adapter*padapter, PLED_871x pLed) u8 res=_SUCCESS; -_func_enter_; +; RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_led_blink_cmd\n")); @@ -1966,7 +1966,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1980,7 +1980,7 @@ u8 rtw_set_csa_cmd(struct adapter*padapter, u8 new_ch_no) u8 res=_SUCCESS; -_func_enter_; +; RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_csa_cmd\n")); @@ -2004,7 +2004,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -2018,7 +2018,7 @@ u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option) u8 res=_SUCCESS; -_func_enter_; +; #ifdef CONFIG_TDLS @@ -2049,7 +2049,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -2062,7 +2062,7 @@ u8 rtw_event_polling_cmd(struct adapter*padapter) struct cmd_priv *pcmdpriv=&padapter->cmdpriv; u8 res=_SUCCESS; -_func_enter_; +; #if defined(CONFIG_CONCURRENT_MODE) if (padapter->adapter_type != PRIMARY_ADAPTER) @@ -2096,7 +2096,7 @@ _func_enter_; exit: - _func_exit_; + ; return res; } @@ -2289,7 +2289,7 @@ void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_type) struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); u8 mstatus; -_func_enter_; +; if((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) || (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) @@ -2364,7 +2364,7 @@ _func_enter_; break; } -_func_exit_; +; } u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue) @@ -2375,7 +2375,7 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue) //struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter); u8 res = _SUCCESS; -_func_enter_; +; //if(!pwrctrlpriv->bLeisurePs) // return res; @@ -2415,7 +2415,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -2437,7 +2437,7 @@ u8 rtw_rpt_timer_cfg_cmd(struct adapter*padapter, u16 minRptTime) u8 res = _SUCCESS; -_func_enter_; +; ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(ph2c==NULL){ res= _FAIL; @@ -2458,7 +2458,7 @@ _func_enter_; res = rtw_enqueue_cmd(pcmdpriv, ph2c); exit: -_func_exit_; +; return res; @@ -2480,7 +2480,7 @@ u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna,u8 enqueue) u8 bSupportAntDiv = false; u8 res = _SUCCESS; -_func_enter_; +; rtw_hal_get_def_var(padapter, HAL_DEF_IS_SUPPORT_ANT_DIV, &(bSupportAntDiv)); if(false == bSupportAntDiv ) return res; @@ -2511,7 +2511,7 @@ _func_enter_; } exit: -_func_exit_; +; return res; @@ -2544,7 +2544,7 @@ u8 p2p_protocol_wk_cmd(struct adapter*padapter, int intCmdType ) struct cmd_priv *pcmdpriv = &padapter->cmdpriv; u8 res = _SUCCESS; -_func_enter_; +; if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { @@ -2574,7 +2574,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -2588,7 +2588,7 @@ u8 rtw_ps_cmd(struct adapter*padapter) struct cmd_priv *pcmdpriv = &padapter->cmdpriv; u8 res = _SUCCESS; -_func_enter_; +; #ifdef CONFIG_CONCURRENT_MODE if (padapter->adapter_type != PRIMARY_ADAPTER) @@ -2616,7 +2616,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -2936,7 +2936,7 @@ void rtw_survey_cmd_callback(struct adapter* padapter , struct cmd_obj *pcmd) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -_func_enter_; +; if(pcmd->res == H2C_DROPPED) { @@ -2952,14 +2952,14 @@ _func_enter_; // free cmd rtw_free_cmd_obj(pcmd); -_func_exit_; +; } void rtw_disassoc_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd) { _irqL irqL; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -_func_enter_; +; if (pcmd->res != H2C_SUCCESS) { @@ -2981,7 +2981,7 @@ _func_enter_; exit: -_func_exit_; +; } @@ -2989,7 +2989,7 @@ void rtw_joinbss_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -_func_enter_; +; if(pcmd->res == H2C_DROPPED) { @@ -3005,7 +3005,7 @@ _func_enter_; rtw_free_cmd_obj(pcmd); -_func_exit_; +; } void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) @@ -3018,7 +3018,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX *)pcmd->parmbuf; struct wlan_network *tgt_network = &(pmlmepriv->cur_network); -_func_enter_; +; if((pcmd->res != H2C_SUCCESS)) { @@ -3112,7 +3112,7 @@ createbss_cmd_fail: rtw_free_cmd_obj(pcmd); -_func_exit_; +; } @@ -3125,7 +3125,7 @@ void rtw_setstaKey_cmdrsp_callback(struct adapter* padapter , struct cmd_obj *p struct set_stakey_rsp* psetstakey_rsp = (struct set_stakey_rsp*) (pcmd->rsp); struct sta_info* psta = rtw_get_stainfo(pstapriv, psetstakey_rsp->addr); -_func_enter_; +; if(psta==NULL) { @@ -3139,7 +3139,7 @@ exit: rtw_free_cmd_obj(pcmd); -_func_exit_; +; } void rtw_setassocsta_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd) @@ -3151,7 +3151,7 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter* padapter, struct cmd_obj * struct set_assocsta_rsp* passocsta_rsp = (struct set_assocsta_rsp*) (pcmd->rsp); struct sta_info* psta = rtw_get_stainfo(pstapriv, passocsta_parm->addr); -_func_enter_; +; if(psta==NULL) { @@ -3172,15 +3172,15 @@ _func_enter_; exit: rtw_free_cmd_obj(pcmd); -_func_exit_; +; } void rtw_getrttbl_cmd_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd); void rtw_getrttbl_cmd_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd) { -_func_enter_; +; rtw_free_cmd_obj(pcmd); -_func_exit_; +; } diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index 42c593c..d1023bd 100755 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -153,7 +153,7 @@ u8 *rtw_set_ie uint *frlen //frame length ) { -_func_enter_; +; *pbuf = (u8)index; *(pbuf + 1) = (u8)len; @@ -164,7 +164,7 @@ _func_enter_; *frlen = *frlen + (len + 2); return (pbuf + len + 2); -_func_exit_; +; } inline u8 *rtw_set_ie_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode, @@ -227,9 +227,9 @@ u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit) { sint tmp,i; u8 *p; -_func_enter_; +; if (limit < 1){ - _func_exit_; + ; return NULL; } @@ -252,7 +252,7 @@ _func_enter_; if (i >= limit) break; } -_func_exit_; +; return NULL; } @@ -356,7 +356,7 @@ exit: void rtw_set_supported_rate(u8* SupportedRates, uint mode) { -_func_enter_; +; _rtw_memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX); @@ -382,13 +382,13 @@ _func_enter_; break; } -_func_exit_; +; } uint rtw_get_rateset_len(u8 *rateset) { uint i = 0; -_func_enter_; +; while(1) { if ((rateset[i]) == 0) @@ -399,7 +399,7 @@ _func_enter_; i++; } -_func_exit_; +; return i; } @@ -410,7 +410,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) WLAN_BSSID_EX* pdev_network = &pregistrypriv->dev_network; u8* ie = pdev_network->IEs; -_func_enter_; +; //timestamp will be inserted by hardware sz += 8; @@ -489,7 +489,7 @@ _func_enter_; //pdev_network->IELength = sz; //update IELength -_func_exit_; +; //return _SUCCESS; @@ -764,7 +764,7 @@ int rtw_get_wapi_ie(u8 *in_ie,uint in_len,u8 *wapi_ie,u16 *wapi_len) u8 wapi_oui1[4]={0x0,0x14,0x72,0x01}; u8 wapi_oui2[4]={0x0,0x14,0x72,0x02}; -_func_enter_; +; cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_); while(cntiopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr); - _func_enter_; + ; _read8 = pintfhdl->io_ops._read8; r_val = _read8(pintfhdl, addr); - _func_exit_; + ; return r_val; } @@ -74,11 +74,11 @@ u16 _rtw_read16(struct adapter *adapter, u32 addr) struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr); - _func_enter_; + ; _read16 = pintfhdl->io_ops._read16; r_val = _read16(pintfhdl, addr); - _func_exit_; + ; return rtw_le16_to_cpu(r_val); } @@ -89,11 +89,11 @@ u32 _rtw_read32(struct adapter *adapter, u32 addr) struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr); - _func_enter_; + ; _read32 = pintfhdl->io_ops._read32; r_val = _read32(pintfhdl, addr); - _func_exit_; + ; return rtw_le32_to_cpu(r_val); } @@ -105,11 +105,11 @@ int _rtw_write8(struct adapter *adapter, u32 addr, u8 val) struct intf_hdl *pintfhdl = &(pio_priv->intf); int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val); int ret; - _func_enter_; + ; _write8 = pintfhdl->io_ops._write8; ret = _write8(pintfhdl, addr, val); - _func_exit_; + ; return RTW_STATUS_CODE(ret); } @@ -120,12 +120,12 @@ int _rtw_write16(struct adapter *adapter, u32 addr, u16 val) struct intf_hdl *pintfhdl = &(pio_priv->intf); int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val); int ret; - _func_enter_; + ; _write16 = pintfhdl->io_ops._write16; val = rtw_cpu_to_le16(val); ret = _write16(pintfhdl, addr, val); - _func_exit_; + ; return RTW_STATUS_CODE(ret); } @@ -136,12 +136,12 @@ int _rtw_write32(struct adapter *adapter, u32 addr, u32 val) struct intf_hdl *pintfhdl = &(pio_priv->intf); int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val); int ret; - _func_enter_; + ; _write32 = pintfhdl->io_ops._write32; val = rtw_cpu_to_le32(val); ret = _write32(pintfhdl, addr, val); - _func_exit_; + ; return RTW_STATUS_CODE(ret); } @@ -153,11 +153,11 @@ int _rtw_writeN(struct adapter *adapter, u32 addr ,u32 length , u8 *pdata) struct intf_hdl *pintfhdl = (struct intf_hdl*)(&(pio_priv->intf)); int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr,u32 length, u8 *pdata); int ret; - _func_enter_; + ; _writeN = pintfhdl->io_ops._writeN; ret = _writeN(pintfhdl, addr,length,pdata); - _func_exit_; + ; return RTW_STATUS_CODE(ret); } @@ -168,11 +168,11 @@ int _rtw_write8_async(struct adapter *adapter, u32 addr, u8 val) struct intf_hdl *pintfhdl = &(pio_priv->intf); int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val); int ret; - _func_enter_; + ; _write8_async = pintfhdl->io_ops._write8_async; ret = _write8_async(pintfhdl, addr, val); - _func_exit_; + ; return RTW_STATUS_CODE(ret); } @@ -183,11 +183,11 @@ int _rtw_write16_async(struct adapter *adapter, u32 addr, u16 val) struct intf_hdl *pintfhdl = &(pio_priv->intf); int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val); int ret; - _func_enter_; + ; _write16_async = pintfhdl->io_ops._write16_async; val = rtw_cpu_to_le16(val); ret = _write16_async(pintfhdl, addr, val); - _func_exit_; + ; return RTW_STATUS_CODE(ret); } @@ -198,11 +198,11 @@ int _rtw_write32_async(struct adapter *adapter, u32 addr, u32 val) struct intf_hdl *pintfhdl = &(pio_priv->intf); int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val); int ret; - _func_enter_; + ; _write32_async = pintfhdl->io_ops._write32_async; val = rtw_cpu_to_le32(val); ret = _write32_async(pintfhdl, addr, val); - _func_exit_; + ; return RTW_STATUS_CODE(ret); } @@ -214,7 +214,7 @@ void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem) struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); - _func_enter_; + ; if( (adapter->bDriverStopped ==true) || (adapter->bSurpriseRemoved == true)) { @@ -226,7 +226,7 @@ void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem) _read_mem(pintfhdl, addr, cnt, pmem); - _func_exit_; + ; } @@ -237,13 +237,13 @@ void _rtw_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem) struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); - _func_enter_; + ; _write_mem = pintfhdl->io_ops._write_mem; _write_mem(pintfhdl, addr, cnt, pmem); - _func_exit_; + ; } @@ -254,7 +254,7 @@ void _rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem) struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); - _func_enter_; + ; if( (adapter->bDriverStopped ==true) || (adapter->bSurpriseRemoved == true)) { @@ -266,7 +266,7 @@ void _rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem) _read_port(pintfhdl, addr, cnt, pmem); - _func_exit_; + ; } @@ -291,13 +291,13 @@ u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem) struct intf_hdl *pintfhdl = &(pio_priv->intf); u32 ret = _SUCCESS; - _func_enter_; + ; _write_port = pintfhdl->io_ops._write_port; ret = _write_port(pintfhdl, addr, cnt, pmem); - _func_exit_; + ; return ret; } diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index 74e7e9a..e358434 100755 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -56,7 +56,7 @@ u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid) u8 i; u8 ret=true; -_func_enter_; +; if (ssid->SsidLength > 32) { RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid length >32\n")); @@ -78,7 +78,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; } @@ -93,7 +93,7 @@ u8 rtw_do_join(struct adapter * padapter) _queue *queue = &(pmlmepriv->scanned_queue); u8 ret=_SUCCESS; -_func_enter_; +; _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); phead = get_list_head(queue); @@ -205,7 +205,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; } @@ -218,7 +218,7 @@ u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -_func_enter_; +; DBG_871X_LEVEL(_drv_always_, "set bssid:%pM\n", bssid); @@ -289,7 +289,7 @@ exit: RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_bssid: status=%d\n", status)); -_func_exit_; +; return status; } @@ -303,7 +303,7 @@ u8 rtw_set_802_11_ssid(struct adapter* padapter, NDIS_802_11_SSID *ssid) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_network *pnetwork = &pmlmepriv->cur_network; -_func_enter_; +; DBG_871X_LEVEL(_drv_always_, "set ssid [%s] fw_state=0x%08x\n", ssid->Ssid, get_fwstate(pmlmepriv)); @@ -412,7 +412,7 @@ exit: RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("-rtw_set_802_11_ssid: status=%d\n", status)); -_func_exit_; +; return status; @@ -427,7 +427,7 @@ u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, NDIS_802_11_SSID bool ssid_valid = true; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -_func_enter_; +; if (!ssid || rtw_validate_ssid(ssid) == false) ssid_valid = false; @@ -486,7 +486,7 @@ release_mlme_lock: exit: -_func_exit_; +; return status; } @@ -499,7 +499,7 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter, struct wlan_network *cur_network = &pmlmepriv->cur_network; NDIS_802_11_NETWORK_INFRASTRUCTURE* pold_state = &(cur_network->network.InfrastructureMode); -_func_enter_; +; RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_notice_, ("+rtw_set_802_11_infrastructure_mode: old=%d new=%d fw_state=0x%08x\n", @@ -573,7 +573,7 @@ _func_enter_; _exit_critical_bh(&pmlmepriv->lock, &irqL); } -_func_exit_; +; return true; } @@ -584,7 +584,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter) _irqL irqL; struct mlme_priv * pmlmepriv = &padapter->mlmepriv; -_func_enter_; +; _enter_critical_bh(&pmlmepriv->lock, &irqL); @@ -601,7 +601,7 @@ _func_enter_; _exit_critical_bh(&pmlmepriv->lock, &irqL); -_func_exit_; +; return true; } @@ -612,7 +612,7 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, NDIS_802_11_SSID *ps struct mlme_priv *pmlmepriv= &padapter->mlmepriv; u8 res=true; -_func_enter_; +; RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("+rtw_set_802_11_bssid_list_scan(), fw_state=%x\n", get_fwstate(pmlmepriv))); @@ -653,7 +653,7 @@ _func_enter_; } exit: -_func_exit_; +; return res; } @@ -664,7 +664,7 @@ u8 rtw_set_802_11_authentication_mode(struct adapter* padapter, NDIS_802_11_AUTH int res; u8 ret; -_func_enter_; +; RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("set_802_11_auth.mode(): mode=%x\n", authmode)); @@ -687,7 +687,7 @@ _func_enter_; else ret=false; -_func_exit_; +; return ret; } @@ -700,7 +700,7 @@ u8 rtw_set_802_11_add_wep(struct adapter* padapter, NDIS_802_11_WEP *wep){ struct security_priv* psecuritypriv=&(padapter->securitypriv); u8 ret=_SUCCESS; -_func_enter_; +; bdefaultkey=(wep->KeyIndex & 0x40000000) > 0 ? false : true; //for ??? btransmitkey= (wep->KeyIndex & 0x80000000) > 0 ? true : false; //for ??? @@ -750,7 +750,7 @@ _func_enter_; ret= false; exit: -_func_exit_; +; return ret; @@ -760,7 +760,7 @@ u8 rtw_set_802_11_remove_wep(struct adapter* padapter, u32 keyindex){ u8 ret=_SUCCESS; -_func_enter_; +; if (keyindex >= 0x80000000 || padapter == NULL){ @@ -793,7 +793,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; @@ -808,7 +808,7 @@ u8 rtw_set_802_11_add_key(struct adapter* padapter, NDIS_802_11_KEY *key){ u8 bgrouptkey = false;//can be remove later u8 ret=_SUCCESS; -_func_enter_; +; if (((key->KeyIndex & 0x80000000) == 0) && ((key->KeyIndex & 0x40000000) > 0)){ @@ -1159,7 +1159,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; } @@ -1173,7 +1173,7 @@ u8 rtw_set_802_11_remove_key(struct adapter* padapter, NDIS_802_11_REMOVE_KEY *k u8 keyIndex = (u8)key->KeyIndex & 0x03; u8 ret=_SUCCESS; -_func_enter_; +; if ((key->KeyIndex & 0xbffffffc) > 0) { ret=_FAIL; @@ -1211,7 +1211,7 @@ _func_enter_; exit: -_func_exit_; +; return true; diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index f26bcb2..614f4d0 100755 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -51,7 +51,7 @@ sint _rtw_init_mlme_priv (struct adapter* padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; sint res = _SUCCESS; -_func_enter_; +; // We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc(). //_rtw_memset((u8 *)pmlmepriv, 0, sizeof(struct mlme_priv)); @@ -102,7 +102,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -154,7 +154,7 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv) void _rtw_free_mlme_priv (struct mlme_priv *pmlmepriv) { -_func_enter_; +; rtw_free_mlme_priv_ie_data(pmlmepriv); @@ -165,14 +165,14 @@ _func_enter_; rtw_vmfree(pmlmepriv->free_bss_buf, MAX_BSS_CNT * sizeof(struct wlan_network)); } } -_func_exit_; +; } sint _rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork) { _irqL irqL; -_func_enter_; +; if (pnetwork == NULL) goto exit; @@ -185,7 +185,7 @@ _func_enter_; exit: -_func_exit_; +; return _SUCCESS; } @@ -196,7 +196,7 @@ struct wlan_network *_rtw_dequeue_network(_queue *queue) struct wlan_network *pnetwork; -_func_enter_; +; _enter_critical_bh(&queue->lock, &irqL); @@ -213,7 +213,7 @@ _func_enter_; _exit_critical_bh(&queue->lock, &irqL); -_func_exit_; +; return pnetwork; } @@ -225,7 +225,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )//(_queue * _queue *free_queue = &pmlmepriv->free_bss_pool; _list* plist = NULL; -_func_enter_; +; _enter_critical_bh(&free_queue->lock, &irqL); @@ -251,7 +251,7 @@ _func_enter_; exit: _exit_critical_bh(&free_queue->lock, &irqL); -_func_exit_; +; return pnetwork; } @@ -263,7 +263,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv ,struct wlan_network *pnetwor _irqL irqL; _queue *free_queue = &(pmlmepriv->free_bss_pool); -_func_enter_; +; if (pnetwork == NULL) goto exit; @@ -299,7 +299,7 @@ _func_enter_; exit: -_func_exit_; +; } @@ -308,7 +308,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network * _queue *free_queue = &(pmlmepriv->free_bss_pool); -_func_enter_; +; if (pnetwork == NULL) goto exit; @@ -328,7 +328,7 @@ _func_enter_; exit: -_func_exit_; +; } @@ -346,7 +346,7 @@ struct wlan_network *_rtw_find_network(_queue *scanned_queue, u8 *addr) struct wlan_network *pnetwork = NULL; u8 zero_addr[ETH_ALEN] = {0,0,0,0,0,0}; -_func_enter_; +; if(_rtw_memcmp(zero_addr, addr, ETH_ALEN)){ pnetwork=NULL; @@ -375,7 +375,7 @@ _func_enter_; exit: -_func_exit_; +; return pnetwork; @@ -390,7 +390,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall) struct mlme_priv* pmlmepriv = &padapter->mlmepriv; _queue *scanned_queue = &pmlmepriv->scanned_queue; -_func_enter_; +; _enter_critical_bh(&scanned_queue->lock, &irqL); @@ -411,7 +411,7 @@ _func_enter_; _exit_critical_bh(&scanned_queue->lock, &irqL); -_func_exit_; +; } @@ -421,7 +421,7 @@ _func_exit_; sint rtw_if_up(struct adapter *padapter) { sint res; -_func_enter_; +; if( padapter->bDriverStopped || padapter->bSurpriseRemoved || (check_fwstate(&padapter->mlmepriv, _FW_LINKED)== false)){ @@ -431,7 +431,7 @@ _func_enter_; else res= true; -_func_exit_; +; return res; } @@ -440,14 +440,14 @@ void rtw_generate_random_ibss(u8* pibss) { u32 curtime = rtw_get_current_time(); -_func_enter_; +; pibss[0] = 0x02; //in ad-hoc mode bit1 must set to 1 pibss[1] = 0x11; pibss[2] = 0x87; pibss[3] = (u8)(curtime & 0xff) ;//p[0]; pibss[4] = (u8)((curtime>>8) & 0xff) ;//p[1]; pibss[5] = (u8)((curtime>>16) & 0xff) ;//p[2]; -_func_exit_; +; return; } @@ -460,11 +460,11 @@ u8 *rtw_get_capability_from_ie(u8 *ie) u16 rtw_get_capability(WLAN_BSSID_EX *bss) { u16 val; -_func_enter_; +; _rtw_memcpy((u8 *)&val, rtw_get_capability_from_ie(bss->IEs), 2); -_func_exit_; +; return le16_to_cpu(val); } @@ -482,27 +482,27 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie) int rtw_init_mlme_priv (struct adapter *padapter)//(struct mlme_priv *pmlmepriv) { int res; -_func_enter_; +; res = _rtw_init_mlme_priv(padapter);// (pmlmepriv); -_func_exit_; +; return res; } void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv) { -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("rtw_free_mlme_priv\n")); _rtw_free_mlme_priv (pmlmepriv); -_func_exit_; +; } int rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork); int rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork) { int res; -_func_enter_; +; res = _rtw_enqueue_network(queue, pnetwork); -_func_exit_; +; return res; } @@ -510,9 +510,9 @@ _func_exit_; static struct wlan_network *rtw_dequeue_network(_queue *queue) { struct wlan_network *pnetwork; -_func_enter_; +; pnetwork = _rtw_dequeue_network(queue); -_func_exit_; +; return pnetwork; } @@ -520,36 +520,36 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv ); struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv )//(_queue *free_queue) { struct wlan_network *pnetwork; -_func_enter_; +; pnetwork = _rtw_alloc_network(pmlmepriv); -_func_exit_; +; return pnetwork; } void rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 is_freeall); void rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 is_freeall)//(struct wlan_network *pnetwork, _queue *free_queue) { -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("rtw_free_network==> ssid = %s \n\n" , pnetwork->network.Ssid.Ssid)); _rtw_free_network(pmlmepriv, pnetwork, is_freeall); -_func_exit_; +; } void rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork ); void rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork ) { -_func_enter_; +; //RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("rtw_free_network==> ssid = %s \n\n" , pnetwork->network.Ssid.Ssid)); _rtw_free_network_nolock(pmlmepriv, pnetwork); -_func_exit_; +; } void rtw_free_network_queue(struct adapter* dev, u8 isfreeall) { -_func_enter_; +; _rtw_free_network_queue(dev, isfreeall); -_func_exit_; +; } /* @@ -601,7 +601,7 @@ int is_same_network(WLAN_BSSID_EX *src, WLAN_BSSID_EX *dst, u8 feature) { u16 s_cap, d_cap; -_func_enter_; +; #ifdef PLATFORM_OS_XP if ( ((uint)dst) <= 0x7fffffff || @@ -625,7 +625,7 @@ _func_enter_; s_cap = le16_to_cpu(s_cap); d_cap = le16_to_cpu(d_cap); -_func_exit_; +; #ifdef CONFIG_P2P if ((feature == 1) && // 1: P2P supported @@ -653,7 +653,7 @@ struct wlan_network * rtw_get_oldest_wlan_network(_queue *scanned_queue) struct wlan_network *pwlan = NULL; struct wlan_network *oldest = NULL; -_func_enter_; +; phead = get_list_head(scanned_queue); plist = get_next(phead); @@ -674,7 +674,7 @@ _func_enter_; plist = get_next(plist); } -_func_exit_; +; return oldest; } @@ -694,7 +694,7 @@ void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src, u8 sq_final; long rssi_final; -_func_enter_; +; #ifdef CONFIG_ANTENNA_DIVERSITY rtw_hal_antdiv_rssi_compared(padapter, dst, src); //this will update src.Rssi, need consider again @@ -754,14 +754,14 @@ _func_enter_; } #endif -_func_exit_; +; } static void update_current_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork) { struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); -_func_enter_; +; if ( (check_fwstate(pmlmepriv, _FW_LINKED)== true) && (is_same_network(&(pmlmepriv->cur_network.network), pnetwork, 0))) { @@ -770,7 +770,7 @@ _func_enter_; pmlmepriv->cur_network.network.IELength); } -_func_exit_; +; } @@ -795,7 +795,7 @@ void rtw_update_scanned_network(struct adapter *adapter, WLAN_BSSID_EX *target) int target_find = 0; u8 feature = 0; -_func_enter_; +; _enter_critical_bh(&queue->lock, &irqL); phead = get_list_head(queue); @@ -916,7 +916,7 @@ _func_enter_; exit: _exit_critical_bh(&queue->lock, &irqL); -_func_exit_; +; } void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork); @@ -926,7 +926,7 @@ void rtw_add_network(struct adapter *adapter, WLAN_BSSID_EX *pnetwork) struct mlme_priv *pmlmepriv = &(((struct adapter *)adapter)->mlmepriv); //_queue *queue = &(pmlmepriv->scanned_queue); -_func_enter_; +; //_enter_critical_bh(&queue->lock, &irqL); @@ -940,7 +940,7 @@ _func_enter_; //_exit_critical_bh(&queue->lock, &irqL); -_func_exit_; +; } //select the desired network based on the capability of the (i)bss. @@ -1014,9 +1014,9 @@ int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwor void rtw_atimdone_event_callback(struct adapter *adapter , u8 *pbuf) { -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("receive atimdone_evet\n")); -_func_exit_; +; return; } @@ -1028,7 +1028,7 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf) WLAN_BSSID_EX *pnetwork; struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); -_func_enter_; +; pnetwork = (WLAN_BSSID_EX *)pbuf; @@ -1080,7 +1080,7 @@ exit: _exit_critical_bh(&pmlmepriv->lock, &irqL); -_func_exit_; +; return; } @@ -1099,7 +1099,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf) #endif -_func_enter_; +; _enter_critical_bh(&pmlmepriv->lock, &irqL); if(pmlmepriv->wps_probe_req_ie) @@ -1259,7 +1259,7 @@ _func_enter_; rtw_cfg80211_surveydone_event_callback(adapter); #endif //CONFIG_IOCTL_CFG80211 -_func_exit_; +; } @@ -1280,7 +1280,7 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv) _queue *scan_queue = &pmlmepriv->scanned_queue; _list *plist, *phead, *ptemp; -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n")); _enter_critical_bh(&scan_queue->lock, &irqL0); @@ -1301,7 +1301,7 @@ _func_enter_; _exit_critical_bh(&free_queue->lock, &irqL); _exit_critical_bh(&scan_queue->lock, &irqL0); -_func_exit_; +; } /* @@ -1318,7 +1318,7 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue) #ifdef CONFIG_TDLS struct tdls_info *ptdlsinfo = &adapter->tdlsinfo; #endif //CONFIG_TDLS -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+rtw_free_assoc_resources\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("tgt_network->network.MacAddress="MAC_FMT" ssid=%s\n", @@ -1414,7 +1414,7 @@ _func_enter_; adapter->securitypriv.key_mask = 0; -_func_exit_; +; } @@ -1426,7 +1426,7 @@ void rtw_indicate_connect(struct adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_indicate_connect\n")); @@ -1471,7 +1471,7 @@ _func_enter_; RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("-rtw_indicate_connect: fw_state=0x%08x\n", get_fwstate(pmlmepriv))); -_func_exit_; +; } @@ -1488,7 +1488,7 @@ void rtw_indicate_disconnect( struct adapter *padapter ) struct sta_info *psta; struct sta_priv *pstapriv = &padapter->stapriv; -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("+rtw_indicate_disconnect\n")); @@ -1537,7 +1537,7 @@ _func_enter_; rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 1); #endif -_func_exit_; +; } inline void rtw_indicate_scan_done( struct adapter *padapter, bool aborted) @@ -1778,7 +1778,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf) struct wlan_network *pcur_wlan = NULL, *ptarget_wlan = NULL; unsigned int the_same_macaddr = false; -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("joinbss event call back received with res=%d\n", pnetwork->join_res)); @@ -1954,14 +1954,14 @@ _func_enter_; ignore_joinbss_callback: _exit_critical_bh(&pmlmepriv->lock, &irqL); - _func_exit_; + ; } void rtw_joinbss_event_callback(struct adapter *adapter, u8 *pbuf) { struct wlan_network *pnetwork = (struct wlan_network *)pbuf; -_func_enter_; +; mlmeext_joinbss_event_callback(adapter, pnetwork->join_res); @@ -1975,7 +1975,7 @@ _func_enter_; dc_resume_xmit(adapter); #endif -_func_exit_; +; } u8 search_max_mac_id(struct adapter *padapter) @@ -2046,7 +2046,7 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf) struct wlan_network *cur_network = &(pmlmepriv->cur_network); struct wlan_network *ptarget_wlan = NULL; -_func_enter_; +; if(rtw_access_ctrl(adapter, pstassoc->macaddr) == false) return; @@ -2156,7 +2156,7 @@ _func_enter_; mlmeext_sta_add_event_callback(adapter, psta); exit: -_func_exit_; +; } @@ -2173,7 +2173,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf) struct sta_priv *pstapriv = &adapter->stapriv; struct wlan_network *tgt_network = &(pmlmepriv->cur_network); -_func_enter_; +; psta = rtw_get_stainfo(&adapter->stapriv, pstadel->macaddr); if(psta) @@ -2301,7 +2301,7 @@ _func_enter_; _exit_critical_bh(&pmlmepriv->lock, &irqL2); -_func_exit_; +; } @@ -2312,7 +2312,7 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf) struct reportpwrstate_parm *preportpwrstate; #endif -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("+rtw_cpwm_event_callback !!!\n")); #ifdef CONFIG_LPS_LCLK @@ -2321,7 +2321,7 @@ _func_enter_; cpwm_int_hdl(padapter, preportpwrstate); #endif -_func_exit_; +; } @@ -2337,7 +2337,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter) int do_join_r; #endif //CONFIG_LAYER2_ROAMING -_func_enter_; +; DBG_871X("%s, fw_state=%x\n", __FUNCTION__, get_fwstate(pmlmepriv)); if(adapter->bDriverStopped ||adapter->bSurpriseRemoved) @@ -2392,7 +2392,7 @@ _func_enter_; drvext_assoc_fail_indicate(&adapter->drvextpriv); #endif -_func_exit_; +; } @@ -2714,7 +2714,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv ) struct wlan_network *candidate = NULL; u8 bSupportAntDiv = false; -_func_enter_; +; _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); phead = get_list_head(queue); @@ -2778,7 +2778,7 @@ _func_enter_; exit: _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); -_func_exit_; +; return ret; } @@ -2790,7 +2790,7 @@ sint rtw_set_auth(struct adapter * adapter,struct security_priv *psecuritypriv) struct cmd_priv *pcmdpriv=&(adapter->cmdpriv); sint res=_SUCCESS; -_func_enter_; +; pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(pcmd==NULL){ @@ -2823,7 +2823,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -2839,7 +2839,7 @@ sint rtw_set_key(struct adapter * adapter,struct security_priv *psecuritypriv,si struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); sint res=_SUCCESS; -_func_enter_; +; psetkeyparm=(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm)); if(psetkeyparm==NULL){ @@ -2918,7 +2918,7 @@ _func_enter_; rtw_mfree((u8 *) psetkeyparm, sizeof(struct setkey_parm)); } exit: -_func_exit_; +; return res; } @@ -3052,7 +3052,7 @@ sint rtw_restruct_sec_ie(struct adapter *adapter,u8 *in_ie, u8 *out_ie, uint in_ uint ndisauthmode=psecuritypriv->ndisauthtype; uint ndissecuritytype = psecuritypriv->ndisencryptstatus; -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+rtw_restruct_sec_ie: ndisauthmode=%d ndissecuritytype=%d\n", @@ -3105,7 +3105,7 @@ _func_enter_; } } -_func_exit_; +; return ielength; } @@ -3117,7 +3117,7 @@ void rtw_init_registrypriv_dev_network( struct adapter* adapter) WLAN_BSSID_EX *pdev_network = &pregistrypriv->dev_network; u8 *myhwaddr = myid(peepriv); -_func_enter_; +; _rtw_memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN); @@ -3131,7 +3131,7 @@ _func_enter_; pdev_network->Configuration.FHConfig.DwellTime = 0; -_func_exit_; +; } @@ -3144,7 +3144,7 @@ void rtw_update_registrypriv_dev_network(struct adapter* adapter) struct wlan_network *cur_network = &adapter->mlmepriv.cur_network; //struct xmit_priv *pxmitpriv = &adapter->xmitpriv; -_func_enter_; +; pdev_network->Privacy = (psecuritypriv->dot11PrivacyAlgrthm > 0 ? 1 : 0) ; // adhoc no 802.1x @@ -3197,16 +3197,16 @@ _func_enter_; //notes: translate IELength & Length after assign the Length to cmdsz in createbss_cmd(); //pdev_network->IELength = cpu_to_le32(sz); -_func_exit_; +; } void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter* adapter) { -_func_enter_; +; -_func_exit_; +; } diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index bb3fd7d..15f458b 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -11580,7 +11580,7 @@ u8 set_tx_beacon_cmd(struct adapter* padapter) u8 res = _SUCCESS; int len_diff = 0; -_func_enter_; +; if ((ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) { @@ -11611,7 +11611,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index ef1164c..8233568 100755 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -3311,7 +3311,7 @@ void find_phase_handler( struct adapter* padapter ) _irqL irqL; u8 _status = 0; -_func_enter_; +; _rtw_memset((unsigned char*)&ssid, 0, sizeof(NDIS_802_11_SSID)); _rtw_memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN ); @@ -3324,7 +3324,7 @@ _func_enter_; _exit_critical_bh(&pmlmepriv->lock, &irqL); -_func_exit_; +; } void p2p_concurrent_handler( struct adapter* padapter ); @@ -3334,7 +3334,7 @@ void restore_p2p_state_handler( struct adapter* padapter ) struct wifidirect_info *pwdinfo = &padapter->wdinfo; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -_func_enter_; +; if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL)) { @@ -3369,49 +3369,49 @@ _func_enter_; set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); #endif } -_func_exit_; +; } void pre_tx_invitereq_handler( struct adapter* padapter ) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; u8 val8 = 1; -_func_enter_; +; set_channel_bwmode(padapter, pwdinfo->invitereq_info.peer_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); issue_probereq_p2p(padapter, NULL); _set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); -_func_exit_; +; } void pre_tx_provdisc_handler( struct adapter* padapter ) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; u8 val8 = 1; -_func_enter_; +; set_channel_bwmode(padapter, pwdinfo->tx_prov_disc_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); issue_probereq_p2p(padapter, NULL); _set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); -_func_exit_; +; } void pre_tx_negoreq_handler( struct adapter* padapter ) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; u8 val8 = 1; -_func_enter_; +; set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); issue_probereq_p2p(padapter, NULL); _set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); -_func_exit_; +; } #ifdef CONFIG_CONCURRENT_MODE @@ -3423,7 +3423,7 @@ void p2p_concurrent_handler( struct adapter* padapter ) //struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv; //struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; u8 val8; -_func_enter_; +; if ( check_buddy_fwstate(padapter, _FW_LINKED ) ) { @@ -3530,7 +3530,7 @@ _func_enter_; set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); } -_func_exit_; +; } #endif @@ -3541,7 +3541,7 @@ static void ro_ch_handler(struct adapter *padapter) struct wifidirect_info *pwdinfo = &padapter->wdinfo; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; u8 ch, bw, offset; -_func_enter_; +; if (rtw_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) { if (0) @@ -3581,7 +3581,7 @@ _func_enter_; &pcfg80211_wdinfo->remain_on_ch_channel, pcfg80211_wdinfo->remain_on_ch_type, GFP_KERNEL); -_func_exit_; +; } static void ro_ch_timer_process (void *FunctionContext) @@ -4373,7 +4373,7 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType) { struct wifidirect_info *pwdinfo= &(padapter->wdinfo); -_func_enter_; +; switch(intCmdType) { @@ -4454,7 +4454,7 @@ _func_enter_; } -_func_exit_; +; } #ifdef CONFIG_P2P_PS @@ -4471,7 +4471,7 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength) u8 find_p2p = false, find_p2p_ps = false; u8 noa_offset, noa_num, noa_index; -_func_enter_; +; if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { @@ -4566,7 +4566,7 @@ _func_enter_; } } -_func_exit_; +; } void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state) @@ -4574,7 +4574,7 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state) struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct wifidirect_info *pwdinfo= &(padapter->wdinfo); -_func_enter_; +; // Pre action for p2p state switch(p2p_ps_state) @@ -4626,7 +4626,7 @@ _func_enter_; break; } -_func_exit_; +; } u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue) @@ -4637,7 +4637,7 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue) struct cmd_priv *pcmdpriv = &padapter->cmdpriv; u8 res = _SUCCESS; -_func_enter_; +; if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) #ifdef CONFIG_CONCURRENT_MODE @@ -4678,7 +4678,7 @@ _func_enter_; exit: -_func_exit_; +; return res; diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index f58180c..7515d8e 100755 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -353,7 +353,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) u8 pollingRes = _FAIL; #endif -_func_enter_; +; pslv = PS_STATE(pslv); @@ -470,7 +470,7 @@ _func_enter_; } #endif -_func_exit_; +; } u8 PS_RDY_CHECK(struct adapter * padapter); @@ -534,7 +534,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a struct sta_info *ptdls_sta; #endif //CONFIG_TDLS -_func_enter_; +; RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, ("%s: PowerMode=%d Smart_PS=%d\n", @@ -675,7 +675,7 @@ _func_enter_; _exit_pwrlock(&pwrpriv->lock); #endif -_func_exit_; +; } /* @@ -727,7 +727,7 @@ void LPS_Enter(struct adapter *padapter) struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct adapter *buddy = padapter->pbuddy_adapter; -_func_enter_; +; // DBG_871X("+LeisurePSEnter\n"); @@ -783,7 +783,7 @@ _func_enter_; // DBG_871X("-LeisurePSEnter\n"); -_func_exit_; +; } // @@ -798,7 +798,7 @@ void LPS_Leave(struct adapter *padapter) u32 start_time; u8 bAwake = false; -_func_enter_; +; #ifdef CONFIG_CONCURRENT_MODE if (padapter->iface_type != IFACE_PORT0) @@ -822,7 +822,7 @@ _func_enter_; // DBG_871X("-LeisurePSLeave\n"); -_func_exit_; +; } #endif @@ -835,7 +835,7 @@ void LeaveAllPowerSaveMode(IN struct adapter *Adapter) struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv); u8 enqueue = 0; -_func_enter_; +; //DBG_871X("%s.....\n",__FUNCTION__); if (check_fwstate(pmlmepriv, _FW_LINKED) == true) @@ -884,7 +884,7 @@ _func_enter_; } } -_func_exit_; +; } #ifdef CONFIG_LPS_LCLK @@ -895,7 +895,7 @@ void LPS_Leave_check( u32 start_time; u8 bReady; -_func_enter_; +; pwrpriv = adapter_to_pwrctl(padapter); @@ -930,7 +930,7 @@ _func_enter_; rtw_msleep_os(1); } -_func_exit_; +; } /* @@ -946,7 +946,7 @@ void cpwm_int_hdl( { struct pwrctrl_priv *pwrpriv; -_func_enter_; +; pwrpriv = adapter_to_pwrctl(padapter); _enter_pwrlock(&pwrpriv->lock); @@ -978,7 +978,7 @@ exit: RT_TRACE(_module_rtl871x_pwrctrl_c_, _drv_notice_, ("cpwm_int_hdl: cpwm=0x%02x\n", pwrpriv->cpwm)); -_func_exit_; +; } static void cpwm_event_callback(struct work_struct *work) @@ -1097,7 +1097,7 @@ s32 rtw_register_tx_alive(struct adapter *padapter) struct pwrctrl_priv *pwrctrl; u8 pslv; -_func_enter_; +; res = _SUCCESS; pwrctrl = adapter_to_pwrctl(padapter); @@ -1139,7 +1139,7 @@ _func_enter_; } #endif // CONFIG_DETECT_CPWM_BY_POLLING -_func_exit_; +; return res; } @@ -1163,7 +1163,7 @@ s32 rtw_register_cmd_alive(struct adapter *padapter) struct pwrctrl_priv *pwrctrl; u8 pslv; -_func_enter_; +; res = _SUCCESS; pwrctrl = adapter_to_pwrctl(padapter); @@ -1205,7 +1205,7 @@ _func_enter_; } #endif // CONFIG_DETECT_CPWM_BY_POLLING -_func_exit_; +; return res; } @@ -1223,7 +1223,7 @@ s32 rtw_register_rx_alive(struct adapter *padapter) { struct pwrctrl_priv *pwrctrl; -_func_enter_; +; pwrctrl = adapter_to_pwrctl(padapter); @@ -1236,7 +1236,7 @@ _func_enter_; _exit_pwrlock(&pwrctrl->lock); -_func_exit_; +; return _SUCCESS; } @@ -1254,7 +1254,7 @@ s32 rtw_register_evt_alive(struct adapter *padapter) { struct pwrctrl_priv *pwrctrl; -_func_enter_; +; pwrctrl = adapter_to_pwrctl(padapter); @@ -1267,7 +1267,7 @@ _func_enter_; _exit_pwrlock(&pwrctrl->lock); -_func_exit_; +; return _SUCCESS; } @@ -1283,7 +1283,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter) { struct pwrctrl_priv *pwrctrl; -_func_enter_; +; pwrctrl = adapter_to_pwrctl(padapter); @@ -1307,7 +1307,7 @@ _func_enter_; _exit_pwrlock(&pwrctrl->lock); -_func_exit_; +; } /* @@ -1321,7 +1321,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter) { struct pwrctrl_priv *pwrctrl; -_func_enter_; +; pwrctrl = adapter_to_pwrctl(padapter); @@ -1345,7 +1345,7 @@ _func_enter_; _exit_pwrlock(&pwrctrl->lock); -_func_exit_; +; } /* @@ -1355,7 +1355,7 @@ void rtw_unregister_rx_alive(struct adapter *padapter) { struct pwrctrl_priv *pwrctrl; -_func_enter_; +; pwrctrl = adapter_to_pwrctl(padapter); @@ -1369,14 +1369,14 @@ _func_enter_; _exit_pwrlock(&pwrctrl->lock); -_func_exit_; +; } void rtw_unregister_evt_alive(struct adapter *padapter) { struct pwrctrl_priv *pwrctrl; -_func_enter_; +; pwrctrl = adapter_to_pwrctl(padapter); @@ -1388,7 +1388,7 @@ _func_enter_; _exit_pwrlock(&pwrctrl->lock); -_func_exit_; +; } #endif /* CONFIG_LPS_LCLK */ @@ -1405,7 +1405,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter) return; #endif -_func_enter_; +; _init_pwrlock(&pwrctrlpriv->lock); pwrctrlpriv->rf_pwrstate = rf_on; @@ -1474,7 +1474,7 @@ _func_enter_; #endif //CONFIG_HAS_EARLYSUSPEND || CONFIG_ANDROID_POWER -_func_exit_; +; } @@ -1488,7 +1488,7 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter) return; #endif -_func_enter_; +; //_rtw_memset((unsigned char *)pwrctrlpriv, 0, sizeof(struct pwrctrl_priv)); @@ -1507,7 +1507,7 @@ _func_enter_; _free_pwrlock(&pwrctrlpriv->lock); -_func_exit_; +; } #ifdef CONFIG_RESUME_IN_WORKQUEUE diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 85cca23..cf59ef4 100755 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -44,7 +44,7 @@ void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv) { -_func_enter_; +; _rtw_memset((u8 *)psta_recvpriv, 0, sizeof (struct sta_recv_priv)); @@ -55,7 +55,7 @@ _func_enter_; _rtw_init_queue(&psta_recvpriv->defrag_q); -_func_exit_; +; } @@ -67,7 +67,7 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) sint res=_SUCCESS; -_func_enter_; +; // We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc(). //_rtw_memset((unsigned char *)precvpriv, 0, sizeof (struct recv_priv)); @@ -129,7 +129,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -158,7 +158,7 @@ void _rtw_free_recv_priv (struct recv_priv *precvpriv) { struct adapter *padapter = precvpriv->adapter; -_func_enter_; +; rtw_free_uc_swdec_pending_queue(padapter); @@ -172,7 +172,7 @@ _func_enter_; rtw_hal_free_recv_priv(padapter); -_func_exit_; +; } @@ -183,7 +183,7 @@ union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue) _list *plist, *phead; struct adapter *padapter; struct recv_priv *precvpriv; -_func_enter_; +; if(_rtw_queue_empty(pfree_recv_queue) == true) { @@ -206,7 +206,7 @@ _func_enter_; } } -_func_exit_; +; return precvframe; @@ -240,7 +240,7 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue) struct adapter *padapter=precvframe->u.hdr.adapter; struct recv_priv *precvpriv = &padapter->recvpriv; -_func_enter_; +; #ifdef CONFIG_CONCURRENT_MODE if(padapter->adapter_type > PRIMARY_ADAPTER) @@ -278,7 +278,7 @@ _func_enter_; _exit_critical_bh(&pfree_recv_queue->lock, &irqL); -_func_exit_; +; return _SUCCESS; @@ -293,7 +293,7 @@ sint _rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue) struct adapter *padapter=precvframe->u.hdr.adapter; struct recv_priv *precvpriv = &padapter->recvpriv; -_func_enter_; +; //_rtw_init_listhead(&(precvframe->u.hdr.list)); rtw_list_delete(&(precvframe->u.hdr.list)); @@ -306,7 +306,7 @@ _func_enter_; precvpriv->free_recvframe_cnt++; } -_func_exit_; +; return _SUCCESS; } @@ -348,7 +348,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue) union recv_frame *precvframe; _list *plist, *phead; -_func_enter_; +; _rtw_spinlock(&pframequeue->lock); phead = get_list_head(pframequeue); @@ -367,7 +367,7 @@ _func_enter_; _rtw_spinunlock(&pframequeue->lock); -_func_exit_; +; } @@ -460,7 +460,7 @@ sint recvframe_chkmic(struct adapter *adapter, union recv_frame *precvframe){ struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -_func_enter_; +; stainfo=rtw_get_stainfo(&adapter->stapriv ,&prxattrib->ta[0]); @@ -584,7 +584,7 @@ _func_enter_; exit: -_func_exit_; +; return res; @@ -599,7 +599,7 @@ union recv_frame * decryptor(struct adapter *padapter,union recv_frame *precv_fr struct security_priv *psecuritypriv=&padapter->securitypriv; union recv_frame *return_packet=precv_frame; u32 res=_SUCCESS; -_func_enter_; +; RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("prxstat->decrypted=%x prxattrib->encrypt = 0x%03x\n",prxattrib->bdecrypted,prxattrib->encrypt)); @@ -687,7 +687,7 @@ _func_enter_; } //recvframe_chkmic(adapter, precv_frame); //move to recvframme_defrag function -_func_exit_; +; return return_packet; @@ -706,7 +706,7 @@ union recv_frame * portctrl(struct adapter *adapter,union recv_frame * precv_fra u16 eapol_type = 0x888e;//for Funia BD's WPA issue struct rx_pkt_attrib *pattrib; -_func_enter_; +; pstapriv = &adapter->stapriv; @@ -778,7 +778,7 @@ _func_enter_; prtnframe=precv_frame; } -_func_exit_; +; return prtnframe; @@ -792,7 +792,7 @@ sint recv_decache(union recv_frame *precv_frame, u8 bretry, struct stainfo_rxcac u16 seq_ctrl = ( (precv_frame->u.hdr.attrib.seq_num&0xffff) << 4) | (precv_frame->u.hdr.attrib.frag_num & 0xf); -_func_enter_; +; if(tid>15) { @@ -813,7 +813,7 @@ _func_enter_; prxcache->tid_rxseq[tid] = seq_ctrl; -_func_exit_; +; return _SUCCESS; @@ -1093,7 +1093,7 @@ sint sta2sta_data_frame( u8 *pframe_body = psnap_type+2+1; #endif -_func_enter_; +; if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) @@ -1275,7 +1275,7 @@ _func_enter_; } exit: -_func_exit_; +; return ret; } @@ -1298,7 +1298,7 @@ sint ap2sta_data_frame( u8 *myhwaddr = myid(&adapter->eeprompriv); sint bmcast = IS_MCAST(pattrib->dst); -_func_enter_; +; if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) && (check_fwstate(pmlmepriv, _FW_LINKED) == true @@ -1431,7 +1431,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; @@ -1453,7 +1453,7 @@ sint sta2ap_data_frame( unsigned char *mybssid = get_bssid(pmlmepriv); sint ret=_SUCCESS; -_func_enter_; +; if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) { @@ -1503,7 +1503,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; @@ -1773,7 +1773,7 @@ sint validate_recv_data_frame(struct adapter *adapter, union recv_frame *precv_f struct tdls_info *ptdlsinfo = &adapter->tdlsinfo; #endif //CONFIG_TDLS -_func_enter_; +; bretry = GetRetry(ptr); pda = get_da(ptr); @@ -1916,7 +1916,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; } @@ -2071,7 +2071,7 @@ sint validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame) u8 external_len = 0; #endif -_func_enter_; +; #ifdef CONFIG_FIND_BEST_CHANNEL @@ -2244,7 +2244,7 @@ _func_enter_; exit: -_func_exit_; +; return retval; } @@ -2269,7 +2269,7 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe) u8 *ptr = get_recvframe_data(precvframe) ; // point to frame_ctrl field struct rx_pkt_attrib *pattrib = & precvframe->u.hdr.attrib; -_func_enter_; +; if(pattrib->encrypt){ recvframe_pull_tail(precvframe, pattrib->icv_len); @@ -2325,7 +2325,7 @@ _func_enter_; _rtw_memcpy(ptr+12, &len, 2); } -_func_exit_; +; return ret; } @@ -2348,7 +2348,7 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe) struct rx_pkt_attrib *pattrib = & precvframe->u.hdr.attrib; struct _vlan *pvlan = NULL; -_func_enter_; +; psnap=(struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen + pattrib->iv_len); psnap_type=ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE; @@ -2456,7 +2456,7 @@ _func_enter_; exit: -_func_exit_; +; return ret; } @@ -2473,7 +2473,7 @@ union recv_frame * recvframe_defrag(struct adapter *adapter,_queue *defrag_q) union recv_frame* prframe, *pnextrframe; _queue *pfree_recv_queue; -_func_enter_; +; curfragnum=0; pfree_recv_queue=&adapter->recvpriv.free_recv_queue; @@ -2546,7 +2546,7 @@ _func_enter_; RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("Performance defrag!!!!!\n")); -_func_exit_; +; return prframe; } @@ -2564,7 +2564,7 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram union recv_frame *prtnframe = NULL; _queue *pfree_recv_queue, *pdefrag_q; -_func_enter_; +; pstapriv = &padapter->stapriv; @@ -2673,7 +2673,7 @@ _func_enter_; } } -_func_exit_; +; return prtnframe; @@ -3642,7 +3642,7 @@ s32 rtw_recv_entry(union recv_frame *precvframe) struct recv_priv *precvpriv; s32 ret=_SUCCESS; -_func_enter_; +; // RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("+rtw_recv_entry\n")); @@ -3660,13 +3660,13 @@ _func_enter_; precvpriv->rx_pkts++; -_func_exit_; +; return ret; _recv_entry_drop: -_func_exit_; +; return ret; } diff --git a/core/rtw_security.c b/core/rtw_security.c index d1c39db..ff42cad 100755 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -45,7 +45,7 @@ static void arcfour_init(struct arc4context *parc4ctx, u8 * key,u32 key_len) u32 stateindex; u8 * state; u32 counter; -_func_enter_; +; state = parc4ctx->state; parc4ctx->x = 0; parc4ctx->y = 0; @@ -63,7 +63,7 @@ _func_enter_; if (++keyindex >= key_len) keyindex = 0; } -_func_exit_; +; } static u32 arcfour_byte( struct arc4context *parc4ctx) { @@ -71,7 +71,7 @@ static u32 arcfour_byte( struct arc4context *parc4ctx) u32 y; u32 sx, sy; u8 * state; -_func_enter_; +; state = parc4ctx->state; x = (parc4ctx->x + 1) & 0xff; sx = state[x]; @@ -81,7 +81,7 @@ _func_enter_; parc4ctx->y = y; state[y] = (u8)sx; state[x] = (u8)sy; -_func_exit_; +; return state[(sx + sy) & 0xff]; } @@ -92,10 +92,10 @@ static void arcfour_encrypt( struct arc4context *parc4ctx, u32 len) { u32 i; -_func_enter_; +; for (i = 0; i < len; i++) dest[i] = src[i] ^ (unsigned char)arcfour_byte(parc4ctx); -_func_exit_; +; } static sint bcrc32initialized = 0; @@ -109,7 +109,7 @@ static u8 crc32_reverseBit( u8 data) static void crc32_init(void) { -_func_enter_; +; if (bcrc32initialized == 1) goto exit; else{ @@ -136,14 +136,14 @@ _func_enter_; bcrc32initialized= 1; } exit: -_func_exit_; +; } static u32 getcrc32(u8 *buf, sint len) { u8 *p; u32 crc; -_func_enter_; +; if (bcrc32initialized == 0) crc32_init(); crc = 0xffffffff; /* preload shift register, per CRC-32 spec */ @@ -152,7 +152,7 @@ _func_enter_; { crc = crc32_table[ (crc ^ *p) & 0xff] ^ (crc >> 8); } -_func_exit_; +; return ~crc; /* transmit complement, per CRC-32 spec */ } @@ -176,7 +176,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) struct security_priv *psecuritypriv=&padapter->securitypriv; struct xmit_priv *pxmitpriv=&padapter->xmitpriv; -_func_enter_; +; if(((struct xmit_frame*)pxmitframe)->buf_addr==NULL) @@ -236,7 +236,7 @@ _func_enter_; } -_func_exit_; +; } @@ -252,7 +252,7 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe) struct rx_pkt_attrib *prxattrib = &(((union recv_frame*)precvframe)->u.hdr.attrib); struct security_priv *psecuritypriv=&padapter->securitypriv; -_func_enter_; +; pframe=(unsigned char *)((union recv_frame*)precvframe)->u.hdr.rx_data; @@ -285,7 +285,7 @@ _func_enter_; } -_func_exit_; +; return; @@ -298,12 +298,12 @@ static u32 secmicgetuint32( u8 * p ) { s32 i; u32 res = 0; -_func_enter_; +; for( i=0; i<4; i++ ) { res |= ((u32)(*p++)) << (8*i); } -_func_exit_; +; return res; } @@ -311,40 +311,40 @@ static void secmicputuint32( u8 * p, u32 val ) // Convert from Us3232 to Byte[] in a portable way { long i; -_func_enter_; +; for( i=0; i<4; i++ ) { *p++ = (u8) (val & 0xff); val >>= 8; } -_func_exit_; +; } static void secmicclear(struct mic_data *pmicdata) { // Reset the state to the empty message. -_func_enter_; +; pmicdata->L = pmicdata->K0; pmicdata->R = pmicdata->K1; pmicdata->nBytesInM = 0; pmicdata->M = 0; -_func_exit_; +; } void rtw_secmicsetkey(struct mic_data *pmicdata, u8 * key ) { // Set the key -_func_enter_; +; pmicdata->K0 = secmicgetuint32( key ); pmicdata->K1 = secmicgetuint32( key + 4 ); // and reset the message secmicclear(pmicdata); -_func_exit_; +; } void rtw_secmicappendbyte(struct mic_data *pmicdata, u8 b ) { -_func_enter_; +; // Append the byte to our word-sized buffer pmicdata->M |= ((unsigned long)b) << (8*pmicdata->nBytesInM); pmicdata->nBytesInM++; @@ -364,24 +364,24 @@ _func_enter_; pmicdata->M = 0; pmicdata->nBytesInM = 0; } -_func_exit_; +; } void rtw_secmicappend(struct mic_data *pmicdata, u8 * src, u32 nbytes ) { -_func_enter_; +; // This is simple while( nbytes > 0 ) { rtw_secmicappendbyte(pmicdata, *src++ ); nbytes--; } -_func_exit_; +; } void rtw_secgetmic(struct mic_data *pmicdata, u8 * dst ) { -_func_enter_; +; // Append the minimum padding rtw_secmicappendbyte(pmicdata, 0x5a ); rtw_secmicappendbyte(pmicdata, 0 ); @@ -398,7 +398,7 @@ _func_enter_; secmicputuint32( dst+4, pmicdata->R ); // Reset to the empty message. secmicclear(pmicdata); -_func_exit_; +; } @@ -407,7 +407,7 @@ void rtw_seccalctkipmic(u8 * key,u8 *header,u8 *data,u32 data_len,u8 *mic_code, struct mic_data micdata; u8 priority[4]={0x0,0x0,0x0,0x0}; -_func_enter_; +; rtw_secmicsetkey(&micdata, key); priority[0]=pri; @@ -433,7 +433,7 @@ _func_enter_; rtw_secmicappend(&micdata, data, data_len); rtw_secgetmic(&micdata,mic_code); -_func_exit_; +; } @@ -555,7 +555,7 @@ static const unsigned short Sbox1[2][256]= /* Sbox for hash (can be in ROM static void phase1(u16 *p1k,const u8 *tk,const u8 *ta,u32 iv32) { sint i; -_func_enter_; +; /* Initialize the 80 bits of P1K[] from IV32 and TA[0..5] */ p1k[0] = Lo16(iv32); p1k[1] = Hi16(iv32); @@ -574,7 +574,7 @@ _func_enter_; p1k[4] += _S_(p1k[3] ^ TK16((i&1)+0)); p1k[4] += (unsigned short)i; /* avoid "slide attacks" */ } -_func_exit_; +; } @@ -605,7 +605,7 @@ static void phase2(u8 *rc4key,const u8 *tk,const u16 *p1k,u16 iv16) { sint i; u16 PPK[6]; /* temporary key for mixing */ -_func_enter_; +; /* Note: all adds in the PPK[] equations below are mod 2**16 */ for (i=0;i<5;i++) PPK[i]=p1k[i]; /* first, copy P1K to PPK */ PPK[5] = p1k[4] +iv16; /* next, add in IV16 */ @@ -643,7 +643,7 @@ _func_enter_; rc4key[4+2*i] = Lo8(PPK[i]); rc4key[5+2*i] = Hi8(PPK[i]); } -_func_exit_; +; } @@ -667,7 +667,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) struct security_priv *psecuritypriv=&padapter->securitypriv; struct xmit_priv *pxmitpriv=&padapter->xmitpriv; u32 res=_SUCCESS; -_func_enter_; +; if(((struct xmit_frame*)pxmitframe)->buf_addr==NULL) return _FAIL; @@ -763,7 +763,7 @@ _func_enter_; } } -_func_exit_; +; return res; } @@ -789,7 +789,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) // struct recv_priv *precvpriv=&padapter->recvpriv; u32 res=_SUCCESS; -_func_enter_; +; pframe=(unsigned char *)((union recv_frame*)precvframe)->u.hdr.rx_data; @@ -883,7 +883,7 @@ _func_enter_; } } -_func_exit_; +; exit: return res; @@ -989,24 +989,24 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext); static void xor_128(u8 *a, u8 *b, u8 *out) { sint i; -_func_enter_; +; for (i=0;i<16; i++) { out[i] = a[i] ^ b[i]; } -_func_exit_; +; } static void xor_32(u8 *a, u8 *b, u8 *out) { sint i; -_func_enter_; +; for (i=0;i<4; i++) { out[i] = a[i] ^ b[i]; } -_func_exit_; +; } @@ -1025,7 +1025,7 @@ static void next_key(u8 *key, sint round) 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x36, 0x36 }; -_func_enter_; +; sbox_key[0] = sbox(key[13]); sbox_key[1] = sbox(key[14]); sbox_key[2] = sbox(key[15]); @@ -1039,25 +1039,25 @@ _func_enter_; xor_32(&key[4], &key[0], &key[4]); xor_32(&key[8], &key[4], &key[8]); xor_32(&key[12], &key[8], &key[12]); -_func_exit_; +; } static void byte_sub(u8 *in, u8 *out) { sint i; -_func_enter_; +; for (i=0; i< 16; i++) { out[i] = sbox(in[i]); } -_func_exit_; +; } static void shift_row(u8 *in, u8 *out) { -_func_enter_; +; out[0] = in[0]; out[1] = in[5]; out[2] = in[10]; @@ -1074,7 +1074,7 @@ _func_enter_; out[13] = in[1]; out[14] = in[6]; out[15] = in[11]; -_func_exit_; +; } @@ -1089,7 +1089,7 @@ static void mix_column(u8 *in, u8 *out) u8 rotr[4]; u8 temp[4]; u8 tempb[4]; -_func_enter_; +; for (i=0 ; i<4; i++) { if ((in[i] & 0x80)== 0x80) @@ -1137,7 +1137,7 @@ _func_enter_; xor_32(add1bf7, rotr, temp); xor_32(swap_halfs, rotl,tempb); xor_32(temp, tempb, out); -_func_exit_; +; } @@ -1148,7 +1148,7 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext) u8 intermediatea[16]; u8 intermediateb[16]; u8 round_key[16]; -_func_enter_; +; for(i=0; i<16; i++) round_key[i] = key[i]; for (round = 0; round < 11; round++) @@ -1176,7 +1176,7 @@ _func_enter_; next_key(round_key, round); } } -_func_exit_; +; } @@ -1197,7 +1197,7 @@ static void construct_mic_iv( ) { sint i; -_func_enter_; +; mic_iv[0] = 0x59; if (qc_exists && a4_exists) mic_iv[1] = mpdu[30] & 0x0f; /* QoS_TC */ if (qc_exists && !a4_exists) mic_iv[1] = mpdu[24] & 0x0f; /* mute bits 7-4 */ @@ -1218,7 +1218,7 @@ _func_enter_; #endif mic_iv[14] = (unsigned char) (payload_length / 256); mic_iv[15] = (unsigned char) (payload_length % 256); -_func_exit_; +; } @@ -1235,7 +1235,7 @@ static void construct_mic_header1( uint frtype// add for CONFIG_IEEE80211W, none 11w also can use ) { -_func_enter_; +; mic_header1[0] = (u8)((header_length - 2) / 256); mic_header1[1] = (u8)((header_length - 2) % 256); #ifdef CONFIG_IEEE80211W @@ -1259,7 +1259,7 @@ _func_enter_; mic_header1[13] = mpdu[13]; mic_header1[14] = mpdu[14]; mic_header1[15] = mpdu[15]; -_func_exit_; +; } @@ -1276,7 +1276,7 @@ static void construct_mic_header2( ) { sint i; -_func_enter_; +; for (i = 0; i<16; i++) mic_header2[i]=0x00; mic_header2[0] = mpdu[16]; /* A3 */ @@ -1311,7 +1311,7 @@ _func_enter_; mic_header2[15] = mpdu[31] & 0x00; } -_func_exit_; +; } @@ -1333,7 +1333,7 @@ static void construct_ctr_preload( ) { sint i = 0; -_func_enter_; +; for (i=0; i<16; i++) ctr_preload[i] = 0x00; i = 0; @@ -1358,7 +1358,7 @@ _func_enter_; #endif ctr_preload[14] = (unsigned char) (c / 256); /* Ctr */ ctr_preload[15] = (unsigned char) (c % 256); -_func_exit_; +; } @@ -1369,12 +1369,12 @@ _func_exit_; static void bitwise_xor(u8 *ina, u8 *inb, u8 *out) { sint i; -_func_enter_; +; for (i=0; i<16; i++) { out[i] = ina[i] ^ inb[i]; } -_func_exit_; +; } @@ -1400,7 +1400,7 @@ static sint aes_cipher(u8 *key, uint hdrlen, uint frtype = GetFrameType(pframe); uint frsubtype = GetFrameSubType(pframe); -_func_enter_; +; frsubtype=frsubtype>>4; @@ -1571,7 +1571,7 @@ _func_enter_; aes128k128d(key, ctr_preload, aes_out); bitwise_xor(aes_out, padded_buffer, chain_buffer); for (j=0; j<8;j++) pframe[payload_index++] = chain_buffer[j];//for (j=0; j<8;j++) message[payload_index++] = chain_buffer[j]; -_func_exit_; +; return _SUCCESS; } @@ -1598,7 +1598,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) // uint offset = 0; u32 res=_SUCCESS; -_func_enter_; +; if(((struct xmit_frame*)pxmitframe)->buf_addr==NULL) return _FAIL; @@ -1691,7 +1691,7 @@ _func_enter_; -_func_exit_; +; return res; } @@ -1718,7 +1718,7 @@ static sint aes_decipher(u8 *key, uint hdrlen, // uint offset = 0; uint frtype = GetFrameType(pframe); uint frsubtype = GetFrameSubType(pframe); -_func_enter_; +; frsubtype=frsubtype>>4; @@ -1965,7 +1965,7 @@ _func_enter_; res = _FAIL; } } -_func_exit_; +; return res; } @@ -1987,7 +1987,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) struct security_priv *psecuritypriv=&padapter->securitypriv; // struct recv_priv *precvpriv=&padapter->recvpriv; u32 res=_SUCCESS; -_func_enter_; +; pframe=(unsigned char *)((union recv_frame*)precvframe)->u.hdr.rx_data; //4 start to encrypt each fragment if((prxattrib->encrypt==_AES_)){ @@ -2086,7 +2086,7 @@ _func_enter_; } } -_func_exit_; +; exit: return res; } @@ -3076,7 +3076,7 @@ void rtw_use_tkipkey_handler(void *FunctionContext) struct adapter *padapter = (struct adapter *)FunctionContext; -_func_enter_; +; RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler ^^^\n")); @@ -3084,7 +3084,7 @@ _func_enter_; RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("^^^rtw_use_tkipkey_handler padapter->securitypriv.busetkipkey=%d^^^\n",padapter->securitypriv.busetkipkey)); -_func_exit_; +; } diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index e44898d..3e16120 100755 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -33,7 +33,7 @@ void _rtw_init_stainfo(struct sta_info *psta); void _rtw_init_stainfo(struct sta_info *psta) { -_func_enter_; +; _rtw_memset((u8 *)psta, 0, sizeof (struct sta_info)); @@ -93,7 +93,7 @@ _func_enter_; psta->rx_vi_cnt = 0; psta->rx_vo_cnt = 0; #endif -_func_exit_; +; } @@ -102,7 +102,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) struct sta_info *psta; s32 i; -_func_enter_; +; pstapriv->pallocated_stainfo_buf = rtw_zvmalloc (sizeof(struct sta_info) * NUM_STA+ 4); @@ -165,7 +165,7 @@ _func_enter_; #endif -_func_exit_; +; return _SUCCESS; @@ -192,7 +192,7 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int void _rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv); void _rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv) { -_func_enter_; +; _rtw_spinlock_free(&psta_xmitpriv->lock); @@ -200,25 +200,25 @@ _func_enter_; _rtw_spinlock_free(&(psta_xmitpriv->bk_q.sta_pending.lock)); _rtw_spinlock_free(&(psta_xmitpriv->vi_q.sta_pending.lock)); _rtw_spinlock_free(&(psta_xmitpriv->vo_q.sta_pending.lock)); -_func_exit_; +; } static void _rtw_free_sta_recv_priv_lock(struct sta_recv_priv *psta_recvpriv) { -_func_enter_; +; _rtw_spinlock_free(&psta_recvpriv->lock); _rtw_spinlock_free(&(psta_recvpriv->defrag_q.lock)); -_func_exit_; +; } void rtw_mfree_stainfo(struct sta_info *psta); void rtw_mfree_stainfo(struct sta_info *psta) { -_func_enter_; +; if(&psta->lock != NULL) _rtw_spinlock_free(&psta->lock); @@ -226,7 +226,7 @@ _func_enter_; _rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv); _rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv); -_func_exit_; +; } @@ -238,7 +238,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv ) _list *plist, *phead; struct sta_info *psta = NULL; -_func_enter_; +; _enter_critical_bh(&pstapriv->sta_hash_lock, &irqL); @@ -255,7 +255,7 @@ _func_enter_; _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); -_func_exit_; +; } @@ -290,7 +290,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) struct recv_reorder_ctrl *preorder_ctrl; int index; -_func_enter_; +; if(pstapriv){ /* delete all reordering_ctrl_timer */ @@ -323,7 +323,7 @@ _func_enter_; } } -_func_exit_; +; return _SUCCESS; } @@ -341,7 +341,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) int i = 0; u16 wRxSeqInitialValue = 0xffff; -_func_enter_; +; pfree_sta_queue = &pstapriv->free_sta_queue; @@ -452,7 +452,7 @@ exit: _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL2); -_func_exit_; +; return psta; @@ -473,7 +473,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta) struct hw_xmit *phwxmit; -_func_enter_; +; if (psta == NULL) goto exit; @@ -652,7 +652,7 @@ _func_enter_; exit: -_func_exit_; +; return _SUCCESS; @@ -668,7 +668,7 @@ void rtw_free_all_stainfo(struct adapter *padapter) struct sta_priv *pstapriv = &padapter->stapriv; struct sta_info* pbcmc_stainfo =rtw_get_bcmc_stainfo( padapter); -_func_enter_; +; if(pstapriv->asoc_sta_count==1) goto exit; @@ -696,7 +696,7 @@ _func_enter_; exit: -_func_exit_; +; } @@ -716,7 +716,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff}; -_func_enter_; +; if(hwaddr==NULL) return NULL; @@ -752,7 +752,7 @@ _func_enter_; } _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); -_func_exit_; +; return psta; } @@ -768,7 +768,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter) struct sta_priv *pstapriv = &padapter->stapriv; //_queue *pstapending = &padapter->xmitpriv.bm_pending; -_func_enter_; +; psta = rtw_alloc_stainfo(pstapriv, bcast_addr); @@ -793,7 +793,7 @@ _func_enter_; */ exit: -_func_exit_; +; return _SUCCESS; } @@ -804,9 +804,9 @@ struct sta_info* rtw_get_bcmc_stainfo(struct adapter* padapter) struct sta_info *psta; struct sta_priv *pstapriv = &padapter->stapriv; u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff}; -_func_enter_; +; psta = rtw_get_stainfo(pstapriv, bc_addr); -_func_exit_; +; return psta; } diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 5e4759f..d92ad48 100755 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -1528,7 +1528,7 @@ _mismatch: rtw_mfree((u8 *)bssid, sizeof(WLAN_BSSID_EX)); return _FAIL; - _func_exit_; + ; } void update_beacon_info(struct adapter *padapter, u8 *pframe, uint pkt_len, struct sta_info *psta) diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 4664445..541ed32 100755 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -34,18 +34,18 @@ static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 }; static void _init_txservq(struct tx_servq *ptxservq) { -_func_enter_; +; _rtw_init_listhead(&ptxservq->tx_pending); _rtw_init_queue(&ptxservq->sta_pending); ptxservq->qcnt = 0; -_func_exit_; +; } void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv) { -_func_enter_; +; _rtw_memset((unsigned char *)psta_xmitpriv, 0, sizeof (struct sta_xmit_priv)); @@ -61,7 +61,7 @@ _func_enter_; _rtw_init_listhead(&psta_xmitpriv->legacy_dz); _rtw_init_listhead(&psta_xmitpriv->apsd); -_func_exit_; +; } @@ -74,7 +74,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ; u32 num_xmit_extbuf = NR_XMIT_EXTBUFF; -_func_enter_; +; // We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc(). //_rtw_memset((unsigned char *)pxmitpriv, 0, sizeof(struct xmit_priv)); @@ -315,7 +315,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -351,7 +351,7 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv) u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ; u32 num_xmit_extbuf = NR_XMIT_EXTBUFF; - _func_enter_; + ; rtw_hal_free_xmit_priv(padapter); @@ -423,7 +423,7 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv) out: -_func_exit_; +; } @@ -651,7 +651,7 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib struct qos_priv *pqospriv= &pmlmepriv->qospriv; sint res = _SUCCESS; - _func_enter_; + ; _rtw_open_pktfile(pkt, &pktfile); i = _rtw_pktfile_read(&pktfile, (u8*)ðerhdr, ETH_HLEN); @@ -917,7 +917,7 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib exit: -_func_exit_; +; return res; } @@ -957,7 +957,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr return _FAIL; } -_func_enter_; +; #ifdef CONFIG_USB_TX_AGGREGATION hw_hdr_offset = TXDESC_SIZE + (pxmitframe->pkt_offset * PACKET_OFFSET_SZ);; @@ -1065,7 +1065,7 @@ _func_enter_; } } -_func_exit_; +; return _SUCCESS; } @@ -1075,7 +1075,7 @@ static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmi struct pkt_attrib *pattrib = &pxmitframe->attrib; //struct security_priv *psecuritypriv=&padapter->securitypriv; -_func_enter_; +; //if((psecuritypriv->sw_encrypt)||(pattrib->bswenc)) if(pattrib->bswenc) @@ -1105,7 +1105,7 @@ _func_enter_; RT_TRACE(_module_rtl871x_xmit_c_,_drv_notice_,("### xmitframe_hwencrypt\n")); } -_func_exit_; +; return _SUCCESS; } @@ -1132,7 +1132,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat sint bmcst = IS_MCAST(pattrib->ra); -_func_enter_; +; if (pattrib->psta) { psta = pattrib->psta; @@ -1331,7 +1331,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1459,7 +1459,7 @@ s32 rtw_make_tdls_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib sint res = _SUCCESS; u16 *fctrl = &pwlanhdr->frame_ctl; -_func_enter_; +; _rtw_memset(hdr, 0, WLANHDR_OFFSET); @@ -1548,7 +1548,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1567,7 +1567,7 @@ s32 rtw_xmit_tdls_coalesce(struct adapter * padapter, struct xmit_frame * pxmitf s32 bmcst = IS_MCAST(pattrib->ra); s32 res = _SUCCESS; -_func_enter_; +; if (pattrib->psta) { psta = pattrib->psta; @@ -1656,7 +1656,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1714,7 +1714,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_fram s32 bmcst = IS_MCAST(pattrib->ra); s32 res = _SUCCESS; -_func_enter_; +; if (pattrib->psta) { @@ -1896,7 +1896,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -1930,7 +1930,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; tmp_buf = BIP_AAD; -_func_enter_; +; ori_len = BIP_AAD_SIZE+pattrib->pktlen; tmp_buf = BIP_AAD = rtw_zmalloc(ori_len); subtype = GetFrameSubType(pframe); //bit(7)~bit(2) @@ -2127,13 +2127,13 @@ _func_enter_; xmitframe_coalesce_success: _exit_critical_bh(&padapter->security_key_mutex, &irqL); rtw_mfree(BIP_AAD, ori_len); -_func_exit_; +; return _SUCCESS; xmitframe_coalesce_fail: _exit_critical_bh(&padapter->security_key_mutex, &irqL); rtw_mfree(BIP_AAD, ori_len); -_func_exit_; +; return _FAIL; } @@ -2151,7 +2151,7 @@ s32 rtw_put_snap(u8 *data, u16 h_proto) struct ieee80211_snap_hdr *snap; u8 *oui; -_func_enter_; +; snap = (struct ieee80211_snap_hdr *)data; snap->dsap = 0xaa; @@ -2169,7 +2169,7 @@ _func_enter_; *(u16 *)(data + SNAP_SIZE) = htons(h_proto); -_func_exit_; +; return SNAP_SIZE + sizeof(u16); } @@ -2183,7 +2183,7 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct registry_priv *pregistrypriv = &padapter->registrypriv; -_func_enter_; +; switch(pxmitpriv->vcs_setting) { @@ -2219,7 +2219,7 @@ _func_enter_; } -_func_exit_; +; } @@ -2260,7 +2260,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv) _list *plist, *phead; _queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue; -_func_enter_; +; _enter_critical(&pfree_queue->lock, &irqL); @@ -2297,7 +2297,7 @@ _func_enter_; _exit_critical(&pfree_queue->lock, &irqL); -_func_exit_; +; return pxmitbuf; } @@ -2307,7 +2307,7 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf) _irqL irqL; _queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue; -_func_enter_; +; if(pxmitbuf==NULL) { @@ -2326,7 +2326,7 @@ _func_enter_; _exit_critical(&pfree_queue->lock, &irqL); -_func_exit_; +; return _SUCCESS; } @@ -2338,7 +2338,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv) _list *plist, *phead; _queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue; -_func_enter_; +; //DBG_871X("+rtw_alloc_xmitbuf\n"); @@ -2381,7 +2381,7 @@ _func_enter_; _exit_critical(&pfree_xmitbuf_queue->lock, &irqL); -_func_exit_; +; return pxmitbuf; } @@ -2391,7 +2391,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf) _irqL irqL; _queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue; -_func_enter_; +; //DBG_871X("+rtw_free_xmitbuf\n"); @@ -2425,7 +2425,7 @@ _func_enter_; _exit_critical(&pfree_xmitbuf_queue->lock, &irqL); } -_func_exit_; +; return _SUCCESS; } @@ -2481,7 +2481,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)//(_queue *pf _queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue; struct adapter *padapter = pxmitpriv->adapter; -_func_enter_; +; _enter_critical_bh(&pfree_xmit_queue->lock, &irqL); @@ -2504,7 +2504,7 @@ _func_enter_; rtw_init_xmitframe(pxframe); -_func_exit_; +; return pxframe; } @@ -2516,7 +2516,7 @@ struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv) _list *plist, *phead; _queue *queue = &pxmitpriv->free_xframe_ext_queue; -_func_enter_; +; _enter_critical_bh(&queue->lock, &irqL); @@ -2537,7 +2537,7 @@ _func_enter_; rtw_init_xmitframe(pxframe); -_func_exit_; +; return pxframe; } @@ -2578,7 +2578,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram struct adapter *padapter = pxmitpriv->adapter; _pkt *pndis_pkt = NULL; -_func_enter_; +; if (pxmitframe == NULL) { RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("======rtw_free_xmitframe():pxmitframe==NULL!!!!!!!!!!\n")); @@ -2625,7 +2625,7 @@ check_pkt_complete: exit: -_func_exit_; +; return _SUCCESS; } @@ -2636,7 +2636,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue) _list *plist, *phead; struct xmit_frame *pxmitframe; -_func_enter_; +; _enter_critical_bh(&(pframequeue->lock), &irqL); @@ -2655,7 +2655,7 @@ _func_enter_; } _exit_critical_bh(&(pframequeue->lock), &irqL); -_func_exit_; +; } s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe) @@ -2726,7 +2726,7 @@ struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi struct registry_priv *pregpriv = &padapter->registrypriv; int i, inx[4]; -_func_enter_; +; inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; @@ -2782,7 +2782,7 @@ exit: _exit_critical_bh(&pxmitpriv->lock, &irqL0); -_func_exit_; +; return pxmitframe; } @@ -2791,7 +2791,7 @@ struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info * { struct tx_servq *ptxservq=NULL; -_func_enter_; +; switch (up) { @@ -2826,7 +2826,7 @@ _func_enter_; } -_func_exit_; +; return ptxservq; } @@ -2846,7 +2846,7 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits; sint res = _SUCCESS; -_func_enter_; +; if (pattrib->psta) { psta = pattrib->psta; @@ -2888,7 +2888,7 @@ _func_enter_; exit: -_func_exit_; +; return res; } @@ -2968,7 +2968,7 @@ void rtw_free_hwxmits(struct adapter *padapter) void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry) { sint i; -_func_enter_; +; for(i = 0; i < entry; i++, phwxmit++) { //_rtw_spinlock_init(&phwxmit->xmit_lock); @@ -2976,7 +2976,7 @@ _func_enter_; //phwxmit->txcmdcnt = 0; phwxmit->accnt = 0; } -_func_exit_; +; } #ifdef CONFIG_BR_EXT diff --git a/hal/hal_intf.c b/hal/hal_intf.c index 2436d6b..f3a430a 100755 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -167,7 +167,7 @@ uint rtw_hal_deinit(struct adapter *padapter) struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); int i; -_func_enter_; +; if (!is_primary_adapter(padapter)){ DBG_871X(" rtw_hal_deinit: Secondary adapter return l\n"); return status; @@ -186,7 +186,7 @@ _func_enter_; DBG_871X("\n rtw_hal_deinit: hal_init fail\n"); } -_func_exit_; +; return status; } diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index c8c27dd..f348022 100755 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -86,7 +86,7 @@ static s32 FillH2CCmd_88E(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 u32 h2c_cmd_ex = 0; s32 ret = _FAIL; -_func_enter_; +; padapter = GET_PRIMARY_ADAPTER(padapter); pHalData = GET_HAL_DATA(padapter); @@ -165,7 +165,7 @@ exit: _exit_critical_mutex(&(adapter_to_dvobj(padapter)->h2c_fwcmd_mutex), NULL); -_func_exit_; +; return ret; } @@ -206,7 +206,7 @@ u8 rtl8188e_set_rssi_cmd(struct adapter*padapter, u8 *param) { u8 res=_SUCCESS; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); -_func_enter_; +; if(pHalData->fw_ractrl == true){ }else{ @@ -214,7 +214,7 @@ _func_enter_; res=_FAIL; } -_func_exit_; +; return res; } @@ -224,7 +224,7 @@ u8 rtl8188e_set_raid_cmd(struct adapter*padapter, u32 mask) u8 buf[3]; u8 res=_SUCCESS; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); -_func_enter_; +; if(pHalData->fw_ractrl == true){ _rtw_memset(buf, 0, 3); mask = cpu_to_le32( mask ); @@ -236,7 +236,7 @@ _func_enter_; res=_FAIL; } -_func_exit_; +; return res; @@ -301,7 +301,7 @@ void rtl8188e_set_FwPwrMode_cmd(struct adapter *padapter, u8 Mode) SETPWRMODE_PARM H2CSetPwrMode; struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); u8 RLBM = 0; // 0:Min, 1:Max , 2:User define -_func_enter_; +; DBG_871X("%s: Mode=%d SmartPS=%d UAPSD=%d\n", __FUNCTION__, Mode, pwrpriv->smart_ps, padapter->registrypriv.uapsd_enable); @@ -351,7 +351,7 @@ _func_enter_; FillH2CCmd_88E(padapter, H2C_PS_PWR_MODE, sizeof(H2CSetPwrMode), (u8 *)&H2CSetPwrMode); -_func_exit_; +; } void rtl8188e_set_FwMediaStatus_cmd(struct adapter *padapter, u16 mstatus_rpt ) @@ -1018,7 +1018,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus) u8 DLBcnCount=0; u32 poll = 0; -_func_enter_; +; DBG_871X("%s mstatus(%x)\n", __FUNCTION__,mstatus); @@ -1173,7 +1173,7 @@ _func_enter_; DBG_871X_LEVEL(_drv_info_, "%s wowlan_mode is off\n", __func__); } #endif //CONFIG_WOWLAN -_func_exit_; +; } #ifdef CONFIG_P2P_PS @@ -1185,7 +1185,7 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter* padapter, u8 p2p_ps_state) struct P2P_PS_Offload_t *p2p_ps_offload = &pHalData->p2p_ps_offload; u8 i; -_func_enter_; +; #if 1 switch(p2p_ps_state) @@ -1263,7 +1263,7 @@ _func_enter_; FillH2CCmd_88E(padapter, H2C_PS_P2P_OFFLOAD, 1, (u8 *)p2p_ps_offload); #endif -_func_exit_; +; } #endif //CONFIG_P2P_PS @@ -1278,7 +1278,7 @@ u8 rtl8188e_reset_tsf(struct adapter *padapter, u8 reset_port ) u8 res=_SUCCESS; s32 ret; -_func_enter_; +; if (IFACE_PORT0==reset_port) { buf[0] = 0x1; buf[1] = 0; } else{ @@ -1287,7 +1287,7 @@ _func_enter_; ret = FillH2CCmd_88E(padapter, H2C_RESET_TSF, 2, buf); -_func_exit_; +; return res; } @@ -1374,7 +1374,7 @@ void rtl8188es_set_wowlan_cmd(struct adapter* padapter, u8 enable) u8 gpio_high_active = 0; //default low active #endif -_func_enter_; +; DBG_871X_LEVEL(_drv_always_, "+%s+\n", __func__); pwowlan_parm.mode =0; @@ -1463,7 +1463,7 @@ _func_enter_; rtw_msleep_os(2); res = FillH2CCmd_88E(padapter, H2C_COM_REMOTE_WAKE_CTRL, 3, (u8 *)&pwowlan_parm); } -_func_exit_; +; DBG_871X_LEVEL(_drv_always_, "-%s res:%d-\n", __func__, res); return ; } diff --git a/hal/rtl8188e_dm.c b/hal/rtl8188e_dm.c index 6eb6e82..2ac2177 100755 --- a/hal/rtl8188e_dm.c +++ b/hal/rtl8188e_dm.c @@ -320,7 +320,7 @@ rtl8188e_HalDmWatchDog( struct adapter *pbuddy_adapter = Adapter->pbuddy_adapter; #endif //CONFIG_CONCURRENT_MODE - _func_enter_; + ; hw_init_completed = Adapter->hw_init_completed; diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 77e46af..3b54a04 100755 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -1034,7 +1034,7 @@ void rtl8188e_InitializeFirmwareVars(struct adapter *padapter) static void rtl8188e_free_hal_data(struct adapter *padapter) { -_func_enter_; +; if(padapter->HalData) { @@ -1042,7 +1042,7 @@ _func_enter_; padapter->HalData = NULL; } -_func_exit_; +; } //=========================================================== diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index 80bf7aa..f999ab6 100755 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -1327,7 +1327,7 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) -_func_enter_; +; HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BEGIN); @@ -1730,7 +1730,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_END); #endif -_func_exit_; +; return status; } @@ -1884,7 +1884,7 @@ unsigned int rtl8188eu_inirp_init(struct adapter *Adapter) u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr); #endif -_func_enter_; +; _read_port = pintfhdl->io_ops._read_port; @@ -1928,7 +1928,7 @@ exit: RT_TRACE(_module_hci_hal_init_c_,_drv_info_,("<=== usb_inirp_init \n")); -_func_exit_; +; return status; @@ -3004,7 +3004,7 @@ void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; DM_ODM_T *podmpriv = &pHalData->odmpriv; -_func_enter_; +; switch(variable) { @@ -3839,14 +3839,14 @@ _func_enter_; break; } -_func_exit_; +; } void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8* val) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); DM_ODM_T *podmpriv = &pHalData->odmpriv; -_func_enter_; +; switch(variable) { @@ -3924,7 +3924,7 @@ _func_enter_; break; } -_func_exit_; +; } // @@ -4441,7 +4441,7 @@ void rtl8188eu_set_hal_ops(struct adapter * padapter) { struct hal_ops *pHalFunc = &padapter->HalFunc; -_func_enter_; +; #ifdef CONFIG_CONCURRENT_MODE if(padapter->isprimary) @@ -4511,6 +4511,6 @@ _func_enter_; pHalFunc->interface_ps_func = &rtl8188eu_ps_func; rtl8188e_set_hal_ops(pHalFunc); -_func_exit_; +; } diff --git a/hal/usb_ops_linux.c b/hal/usb_ops_linux.c index 6549cac..08ccda3 100755 --- a/hal/usb_ops_linux.c +++ b/hal/usb_ops_linux.c @@ -187,7 +187,7 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) u16 len; u8 data=0; - _func_enter_; + ; request = 0x05; requesttype = 0x01;//read_in @@ -198,7 +198,7 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype); - _func_exit_; + ; return data; @@ -213,7 +213,7 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) u16 len; u16 data=0; - _func_enter_; + ; request = 0x05; requesttype = 0x01;//read_in @@ -224,7 +224,7 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype); - _func_exit_; + ; return data; @@ -239,7 +239,7 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) u16 len; u32 data=0; - _func_enter_; + ; request = 0x05; requesttype = 0x01;//read_in @@ -250,7 +250,7 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype); - _func_exit_; + ; return data; @@ -266,7 +266,7 @@ static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) u8 data; int ret; - _func_enter_; + ; request = 0x05; requesttype = 0x00;//write_out @@ -279,7 +279,7 @@ static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype); - _func_exit_; + ; return ret; @@ -295,7 +295,7 @@ static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) u16 data; int ret; - _func_enter_; + ; request = 0x05; requesttype = 0x00;//write_out @@ -308,7 +308,7 @@ static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype); - _func_exit_; + ; return ret; @@ -324,7 +324,7 @@ static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) u32 data; int ret; - _func_enter_; + ; request = 0x05; requesttype = 0x00;//write_out @@ -336,7 +336,7 @@ static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) ret =usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype); - _func_exit_; + ; return ret; @@ -352,7 +352,7 @@ static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata u8 buf[VENDOR_CMD_MAX_DATA_LEN]={0}; int ret; - _func_enter_; + ; request = 0x05; requesttype = 0x00;//write_out @@ -364,7 +364,7 @@ static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, buf, len, requesttype); - _func_exit_; + ; return ret; @@ -523,7 +523,7 @@ static u32 usb_read_interrupt(struct intf_hdl *pintfhdl, u32 addr) struct recv_priv *precvpriv = &adapter->recvpriv; struct usb_device *pusbd = pdvobj->pusbdev; -_func_enter_; +; //translate DMA FIFO addr to pipehandle pipe = ffaddr2pipehdl(pdvobj, addr); @@ -542,7 +542,7 @@ _func_enter_; ret = _FAIL; } -_func_exit_; +; return ret; } @@ -995,7 +995,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) exit: -_func_exit_; +; } @@ -1011,7 +1011,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) struct recv_priv *precvpriv = &adapter->recvpriv; struct usb_device *pusbd = pdvobj->pusbdev; -_func_enter_; +; if(adapter->bDriverStopped || adapter->bSurpriseRemoved ||dvobj_to_pwrctl(pdvobj)->pnp_bstop_trx) { @@ -1058,7 +1058,7 @@ _func_enter_; ret = _FAIL; } -_func_exit_; +; return ret; } @@ -1433,7 +1433,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) exit: -_func_exit_; +; } @@ -1453,7 +1453,7 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) struct usb_device *pusbd = pdvobj->pusbdev; -_func_enter_; +; if(adapter->bDriverStopped || adapter->bSurpriseRemoved ||dvobj_to_pwrctl(pdvobj)->pnp_bstop_trx) { @@ -1541,7 +1541,7 @@ _func_enter_; ret = _FAIL; } -_func_exit_; +; return ret; } @@ -1575,7 +1575,7 @@ void rtl8188eu_xmit_tasklet(void *priv) void rtl8188eu_set_intf_ops(struct _io_ops *pops) { - _func_enter_; + ; _rtw_memset((u8 *)pops, 0, sizeof(struct _io_ops)); @@ -1605,7 +1605,7 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops) pops->_read_interrupt = &usb_read_interrupt; #endif - _func_exit_; + ; } diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 0c1c60e..d60484c 100755 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -1214,7 +1214,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param struct wifidirect_info* pwdinfo = &padapter->wdinfo; #endif //CONFIG_P2P -_func_enter_; +; DBG_8192C("%s\n", __func__); @@ -1486,7 +1486,7 @@ exit: DBG_8192C("%s, ret=%d\n", __func__, ret); - _func_exit_; + ; return ret; } diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 7bf6b55..94ee732 100755 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -760,7 +760,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, struct wifidirect_info* pwdinfo = &padapter->wdinfo; #endif //CONFIG_P2P -_func_enter_; +; param->u.crypt.err = 0; param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; @@ -1061,7 +1061,7 @@ exit: rtw_mfree((u8 *)pwep, wep_total_len); } -_func_exit_; +; return ret; } @@ -1250,7 +1250,7 @@ static int rtw_wx_get_name(struct net_device *dev, RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("cmd_code=%x\n", info->cmd)); - _func_enter_; + ; if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) { @@ -1302,7 +1302,7 @@ static int rtw_wx_get_name(struct net_device *dev, snprintf(wrqu->name, IFNAMSIZ, "unassociated"); } - _func_exit_; + ; return 0; } @@ -1311,11 +1311,11 @@ static int rtw_wx_set_freq(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { - _func_enter_; + ; RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+rtw_wx_set_freq\n")); - _func_exit_; + ; return 0; } @@ -1352,7 +1352,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ; int ret = 0; - _func_enter_; + ; if(_FAIL == rtw_pwr_wakeup(padapter)) { ret= -EPERM; @@ -1412,7 +1412,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, exit: - _func_exit_; + ; return ret; @@ -1426,7 +1426,7 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a, RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,(" rtw_wx_get_mode \n")); - _func_enter_; + ; if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) { @@ -1447,7 +1447,7 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a, wrqu->mode = IW_MODE_AUTO; } - _func_exit_; + ; return 0; @@ -1589,7 +1589,7 @@ static int rtw_wx_get_range(struct net_device *dev, u16 val; int i; - _func_enter_; + ; RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_range. cmd_code=%x\n", info->cmd)); @@ -1699,7 +1699,7 @@ static int rtw_wx_get_range(struct net_device *dev, #endif - _func_exit_; + ; return 0; @@ -1726,7 +1726,7 @@ static int rtw_wx_set_wap(struct net_device *dev, struct wlan_network *pnetwork = NULL; NDIS_802_11_AUTHENTICATION_MODE authmode; - _func_enter_; + ; /* #ifdef CONFIG_CONCURRENT_MODE if(padapter->iface_type > PRIMARY_IFACE) @@ -1816,7 +1816,7 @@ static int rtw_wx_set_wap(struct net_device *dev, exit: - _func_exit_; + ; return ret; } @@ -1836,7 +1836,7 @@ static int rtw_wx_get_wap(struct net_device *dev, RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_wap\n")); - _func_enter_; + ; if ( ((check_fwstate(pmlmepriv, _FW_LINKED)) == true) || ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == true) || @@ -1850,7 +1850,7 @@ static int rtw_wx_get_wap(struct net_device *dev, _rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); } - _func_exit_; + ; return 0; @@ -1905,7 +1905,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, #endif //CONFIG_P2P RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_set_scan\n")); -_func_enter_; +; #ifdef DBG_IOCTL DBG_871X("DBG_IOCTL %s:%d\n",__FUNCTION__, __LINE__); @@ -2133,7 +2133,7 @@ exit: DBG_871X("DBG_IOCTL %s:%d return %d\n",__FUNCTION__, __LINE__, ret); #endif -_func_exit_; +; return ret; } @@ -2159,7 +2159,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan\n")); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_, (" Start of Query SIOCGIWSCAN .\n")); - _func_enter_; + ; #ifdef DBG_IOCTL DBG_871X("DBG_IOCTL %s:%d\n",__FUNCTION__, __LINE__); @@ -2287,7 +2287,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, exit: - _func_exit_; + ; #ifdef DBG_IOCTL DBG_871X("DBG_IOCTL %s:%d return %d\n",__FUNCTION__, __LINE__, ret); @@ -2319,7 +2319,7 @@ static int rtw_wx_set_essid(struct net_device *dev, uint ret = 0, len; - _func_enter_; + ; #ifdef DBG_IOCTL DBG_871X("DBG_IOCTL %s:%d\n",__FUNCTION__, __LINE__); @@ -2472,7 +2472,7 @@ exit: DBG_871X("DBG_IOCTL %s:%d return %d\n",__FUNCTION__, __LINE__, ret); #endif - _func_exit_; + ; return ret; } @@ -2488,7 +2488,7 @@ static int rtw_wx_get_essid(struct net_device *dev, RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_essid\n")); - _func_enter_; + ; if ( (check_fwstate(pmlmepriv, _FW_LINKED) == true) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) @@ -2509,7 +2509,7 @@ static int rtw_wx_get_essid(struct net_device *dev, exit: - _func_exit_; + ; return ret; @@ -2527,7 +2527,7 @@ static int rtw_wx_set_rate(struct net_device *dev, u32 ratevalue = 0; u8 mpdatarate[NumRates]={11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0xff}; -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,(" rtw_wx_set_rate \n")); RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_,("target_rate = %d, fixed = %d\n",target_rate,fixed)); @@ -2602,7 +2602,7 @@ set_rate: ret = -1; } -_func_exit_; +; return ret; } @@ -2630,7 +2630,7 @@ static int rtw_wx_set_rts(struct net_device *dev, { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - _func_enter_; + ; if (wrqu->rts.disabled) padapter->registrypriv.rts_thresh = 2347; @@ -2644,7 +2644,7 @@ static int rtw_wx_set_rts(struct net_device *dev, DBG_871X("%s, rts_thresh=%d\n", __func__, padapter->registrypriv.rts_thresh); - _func_exit_; + ; return 0; @@ -2656,7 +2656,7 @@ static int rtw_wx_get_rts(struct net_device *dev, { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - _func_enter_; + ; DBG_871X("%s, rts_thresh=%d\n", __func__, padapter->registrypriv.rts_thresh); @@ -2664,7 +2664,7 @@ static int rtw_wx_get_rts(struct net_device *dev, wrqu->rts.fixed = 0; /* no auto select */ //wrqu->rts.disabled = (wrqu->rts.value == DEFAULT_RTS_THRESHOLD); - _func_exit_; + ; return 0; } @@ -2675,7 +2675,7 @@ static int rtw_wx_set_frag(struct net_device *dev, { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - _func_enter_; + ; if (wrqu->frag.disabled) padapter->xmitpriv.frag_len = MAX_FRAG_THRESHOLD; @@ -2689,7 +2689,7 @@ static int rtw_wx_set_frag(struct net_device *dev, DBG_871X("%s, frag_len=%d\n", __func__, padapter->xmitpriv.frag_len); - _func_exit_; + ; return 0; @@ -2701,7 +2701,7 @@ static int rtw_wx_get_frag(struct net_device *dev, { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); - _func_enter_; + ; DBG_871X("%s, frag_len=%d\n", __func__, padapter->xmitpriv.frag_len); @@ -2709,7 +2709,7 @@ static int rtw_wx_get_frag(struct net_device *dev, wrqu->frag.fixed = 0; /* no auto select */ //wrqu->frag.disabled = (wrqu->frag.value == DEFAULT_FRAG_THRESHOLD); - _func_exit_; + ; return 0; } @@ -2747,7 +2747,7 @@ static int rtw_wx_set_enc(struct net_device *dev, key = erq->flags & IW_ENCODE_INDEX; - _func_enter_; + ; if (erq->flags & IW_ENCODE_DISABLED) { @@ -2868,7 +2868,7 @@ static int rtw_wx_set_enc(struct net_device *dev, exit: - _func_exit_; + ; return ret; @@ -2883,7 +2883,7 @@ static int rtw_wx_get_enc(struct net_device *dev, struct iw_point *erq = &(wrqu->encoding); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - _func_enter_; + ; if(check_fwstate(pmlmepriv, _FW_LINKED) != true) { @@ -2967,7 +2967,7 @@ static int rtw_wx_get_enc(struct net_device *dev, } - _func_exit_; + ; return ret; diff --git a/os_dep/mlme_linux.c b/os_dep/mlme_linux.c index a393c7f..ec3ae80 100755 --- a/os_dep/mlme_linux.c +++ b/os_dep/mlme_linux.c @@ -32,7 +32,7 @@ void Linkup_workitem_callback(struct work_struct *work) struct mlme_priv *pmlmepriv = container_of(work, struct mlme_priv, Linkup_workitem); struct adapter *padapter = container_of(pmlmepriv, struct adapter, mlmepriv); -_func_enter_; +; RT_TRACE(_module_mlme_osdep_c_,_drv_info_,("+ Linkup_workitem_callback\n")); @@ -42,7 +42,7 @@ _func_enter_; kobject_hotplug(&padapter->pnetdev->class_dev.kobj, KOBJ_LINKUP); #endif -_func_exit_; +; } void Linkdown_workitem_callback(struct work_struct *work) @@ -50,7 +50,7 @@ void Linkdown_workitem_callback(struct work_struct *work) struct mlme_priv *pmlmepriv = container_of(work, struct mlme_priv, Linkdown_workitem); struct adapter *padapter = container_of(pmlmepriv, struct adapter, mlmepriv); -_func_enter_; +; RT_TRACE(_module_mlme_osdep_c_,_drv_info_,("+ Linkdown_workitem_callback\n")); @@ -60,7 +60,7 @@ _func_enter_; kobject_hotplug(&padapter->pnetdev->class_dev.kobj, KOBJ_LINKDOWN); #endif -_func_exit_; +; } #endif @@ -154,7 +154,7 @@ void rtw_init_mlme_timer(struct adapter *padapter) void rtw_os_indicate_connect(struct adapter *adapter) { struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); -_func_enter_; +; #ifdef CONFIG_IOCTL_CFG80211 if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true ) || @@ -176,7 +176,7 @@ _func_enter_; _set_workitem(&adapter->mlmepriv.Linkup_workitem); #endif -_func_exit_; +; } @@ -257,7 +257,7 @@ void rtw_os_indicate_disconnect( struct adapter *adapter ) { //RT_PMKID_LIST backupPMKIDList[ NUM_PMKID_CACHE ]; -_func_enter_; +; netif_carrier_off(adapter->pnetdev); // Do it first for tx broadcast pkt after disconnection issue! @@ -273,7 +273,7 @@ _func_enter_; //modify for CONFIG_IEEE80211W, none 11w also can use the same command rtw_reset_securitypriv_cmd(adapter); -_func_exit_; +; } @@ -283,7 +283,7 @@ void rtw_report_sec_ie(struct adapter *adapter,u8 authmode,u8 *sec_ie) u8 *buff,*p,i; union iwreq_data wrqu; -_func_enter_; +; RT_TRACE(_module_mlme_osdep_c_,_drv_info_,("+rtw_report_sec_ie, authmode=%d\n", authmode)); @@ -324,7 +324,7 @@ _func_enter_; } -_func_exit_; +; } diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index a2d89be..3f7ae71 100755 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -321,7 +321,7 @@ static uint loadparam( struct adapter *padapter, _nic_hdl pnetdev) uint status = _SUCCESS; struct registry_priv *registry_par = &padapter->registrypriv; -_func_enter_; +; GlobalDebugLevel = rtw_debug; registry_par->chip_version = (u8)rtw_chip_version; @@ -445,7 +445,7 @@ _func_enter_; registry_par->regulatory_tid = (u8)rtw_regulatory_id; -_func_exit_; +; return status; } @@ -928,7 +928,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter) u8 ret8=_SUCCESS; -_func_enter_; +; RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_init_drv_sw\n")); @@ -1051,7 +1051,7 @@ exit: RT_TRACE(_module_os_intfs_c_,_drv_info_,("-rtw_init_drv_sw\n")); - _func_exit_; + ; return ret8; @@ -2327,7 +2327,7 @@ int rtw_suspend_common(struct adapter *padapter) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int ret = 0; - _func_enter_; + ; LeaveAllPowerSaveMode(padapter); rtw_suspend_free_assoc_resource(padapter); @@ -2348,7 +2348,7 @@ int rtw_suspend_common(struct adapter *padapter) exit: - _func_exit_; + ; return ret; } @@ -2359,7 +2359,7 @@ int rtw_resume_common(struct adapter *padapter) struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct mlme_priv *mlmepriv = &padapter->mlmepriv; - _func_enter_; + ; #ifdef CONFIG_CONCURRENT_MODE rtw_reset_drv_sw(padapter->pbuddy_adapter); @@ -2426,6 +2426,6 @@ int rtw_resume_common(struct adapter *padapter) } #endif - _func_exit_; + ; return ret; } diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index cf7be67..63beee1 100755 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -254,7 +254,7 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame void *br_port = NULL; #endif -_func_enter_; +; precvpriv = &(padapter->recvpriv); pfree_recv_queue = &(precvpriv->free_recv_queue); @@ -445,7 +445,7 @@ _recv_indicatepkt_end: RT_TRACE(_module_recv_osdep_c_,_drv_info_,("\n rtw_recv_indicatepkt :after rtw_netif_rx!!!!\n")); -_func_exit_; +; return _SUCCESS; @@ -457,7 +457,7 @@ _recv_indicatepkt_drop: return _FAIL; -_func_exit_; +; } diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index 240260d..fda00cb 100755 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -278,7 +278,7 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf) struct usb_endpoint_descriptor *pendp_desc; struct usb_device *pusbd; -_func_enter_; +; if ((pdvobjpriv = (struct dvobj_priv*)rtw_zmalloc(sizeof(*pdvobjpriv))) == NULL) { goto exit; @@ -377,7 +377,7 @@ free_dvobj: pdvobjpriv = NULL; } exit: -_func_exit_; +; return pdvobjpriv; } @@ -385,7 +385,7 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf) { struct dvobj_priv *dvobj = usb_get_intfdata(usb_intf); -_func_enter_; +; usb_set_intfdata(usb_intf, NULL); if (dvobj) { @@ -410,7 +410,7 @@ _func_enter_; //DBG_871X("%s %d\n", __func__, ATOMIC_READ(&usb_intf->dev.kobj.kref.refcount)); usb_put_dev(interface_to_usbdev(usb_intf)); -_func_exit_; +; } static void decide_chip_type_by_usb_device_id(struct adapter *padapter, const struct usb_device_id *pdid) @@ -557,7 +557,7 @@ int rtw_hw_suspend(struct adapter *padapter ) struct usb_interface *pusb_intf = adapter_to_dvobj(padapter)->pusbintf; struct net_device *pnetdev = padapter->pnetdev; - _func_enter_; + ; if((!padapter->bup) || (padapter->bDriverStopped)||(padapter->bSurpriseRemoved)) { @@ -620,7 +620,7 @@ int rtw_hw_suspend(struct adapter *padapter ) else goto error_exit; - _func_exit_; + ; return 0; error_exit: @@ -635,7 +635,7 @@ int rtw_hw_resume(struct adapter *padapter) struct usb_interface *pusb_intf = adapter_to_dvobj(padapter)->pusbintf; struct net_device *pnetdev = padapter->pnetdev; - _func_enter_; + ; if(padapter)//system resume { @@ -671,7 +671,7 @@ int rtw_hw_resume(struct adapter *padapter) goto error_exit; } - _func_exit_; + ; return 0; error_exit: @@ -767,7 +767,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) int ret = 0; u32 start_time = rtw_get_current_time(); - _func_enter_; + ; DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid); @@ -823,7 +823,7 @@ exit: DBG_871X("<=== %s return %d.............. in %dms\n", __FUNCTION__ , ret, rtw_get_passing_time_ms(start_time)); - _func_exit_; + ; return ret; } #else @@ -842,7 +842,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) int ret = 0; u32 start_time = rtw_get_current_time(); - _func_enter_; + ; DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid); @@ -943,7 +943,7 @@ exit: DBG_871X("<=== %s return %d.............. in %dms\n", __FUNCTION__ , ret, rtw_get_passing_time_ms(start_time)); - _func_exit_; + ; return ret; } @@ -988,7 +988,7 @@ int rtw_resume_process(struct adapter *padapter) #ifdef CONFIG_BT_COEXIST u8 pm_cnt; #endif //#ifdef CONFIG_BT_COEXIST - _func_enter_; + ; DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid); @@ -1072,7 +1072,7 @@ exit: DBG_871X("<=== %s return %d.............. in %dms\n", __FUNCTION__ , ret, rtw_get_passing_time_ms(start_time)); - _func_exit_; + ; return ret; } @@ -1673,7 +1673,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf) struct net_device *pnetdev = padapter->pnetdev; struct mlme_priv *pmlmepriv= &padapter->mlmepriv; -_func_enter_; +; DBG_871X("+rtw_dev_remove\n"); RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+dev_remove()\n")); @@ -1719,7 +1719,7 @@ _func_enter_; rtw_sw_export=NULL; #endif -_func_exit_; +; return; diff --git a/os_dep/usb_ops_linux.c b/os_dep/usb_ops_linux.c index bd59672..533c42a 100755 --- a/os_dep/usb_ops_linux.c +++ b/os_dep/usb_ops_linux.c @@ -119,10 +119,10 @@ int usb_async_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) struct dvobj_priv *pdvobjpriv = (struct dvobj_priv *)pintfhdl->pintf_dev; struct usb_device *udev=pdvobjpriv->pusbdev; - _func_enter_; + ; data = val; ret = usb_write_async(udev, addr, &data, 1); - _func_exit_; + ; return ret; } @@ -134,10 +134,10 @@ int usb_async_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) struct dvobj_priv *pdvobjpriv = (struct dvobj_priv *)pintfhdl->pintf_dev; struct usb_device *udev=pdvobjpriv->pusbdev; - _func_enter_; + ; data = val; ret = usb_write_async(udev, addr, &data, 2); - _func_exit_; + ; return ret; } @@ -149,10 +149,10 @@ int usb_async_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) struct dvobj_priv *pdvobjpriv = (struct dvobj_priv *)pintfhdl->pintf_dev; struct usb_device *udev=pdvobjpriv->pusbdev; - _func_enter_; + ; data = val; ret = usb_write_async(udev, addr, &data, 4); - _func_exit_; + ; return ret; } @@ -314,7 +314,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; //struct pkt_attrib *pattrib = &pxmitframe->attrib; -_func_enter_; +; switch(pxmitbuf->flags) { @@ -452,7 +452,7 @@ check_completion: tasklet_hi_schedule(&pxmitpriv->xmit_tasklet); } -_func_exit_; +; } @@ -471,7 +471,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem) struct usb_device *pusbd = pdvobj->pusbdev; struct pkt_attrib *pattrib = &pxmitframe->attrib; -_func_enter_; +; RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("+usb_write_port\n")); @@ -624,7 +624,7 @@ _func_enter_; exit: if (ret != _SUCCESS) rtw_free_xmitbuf(pxmitpriv, pxmitbuf); -_func_exit_; +; return ret; } diff --git a/os_dep/xmit_linux.c b/os_dep/xmit_linux.c index 7ae7753..a418002 100755 --- a/os_dep/xmit_linux.c +++ b/os_dep/xmit_linux.c @@ -39,7 +39,7 @@ uint rtw_remainder_len(struct pkt_file *pfile) void _rtw_open_pktfile (_pkt *pktptr, struct pkt_file *pfile) { -_func_enter_; +; pfile->pkt = pktptr; pfile->cur_addr = pfile->buf_start = pktptr->data; @@ -47,14 +47,14 @@ _func_enter_; pfile->cur_buffer = pfile->buf_start ; -_func_exit_; +; } uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen) { uint len = 0; -_func_enter_; +; len = rtw_remainder_len(pfile); len = (rlen > len)? len: rlen; @@ -65,21 +65,21 @@ _func_enter_; pfile->cur_addr += len; pfile->pkt_len -= len; -_func_exit_; +; return len; } sint rtw_endofpktfile(struct pkt_file *pfile) { -_func_enter_; +; if (pfile->pkt_len == 0) { -_func_exit_; +; return true; } -_func_exit_; +; return false; } @@ -354,7 +354,7 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) u16 queue; #endif -_func_enter_; +; RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+xmit_enry\n")); @@ -407,7 +407,7 @@ drop_packet: exit: -_func_exit_; +; return 0; }