Commit ed737494 authored by Rémy Oudompheng's avatar Rémy Oudompheng Committed by Greg Kroah-Hartman

staging: rtl8188eu: jiffies are unsigned long

Remove rtw_get_passing_time_ms function and adjust type
of relevant variables.
Signed-off-by: default avatarRémy Oudompheng <remyoudompheng@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7ec22b5
...@@ -224,7 +224,7 @@ static void efuse_read_phymap_from_txpktbuf( ...@@ -224,7 +224,7 @@ static void efuse_read_phymap_from_txpktbuf(
) )
{ {
u16 dbg_addr = 0; u16 dbg_addr = 0;
u32 start = 0, passing_time = 0; unsigned long start = 0;
u8 reg_0x143 = 0; u8 reg_0x143 = 0;
u32 lo32 = 0, hi32 = 0; u32 lo32 = 0, hi32 = 0;
u16 len = 0, count = 0; u16 len = 0, count = 0;
...@@ -248,7 +248,7 @@ static void efuse_read_phymap_from_txpktbuf( ...@@ -248,7 +248,7 @@ static void efuse_read_phymap_from_txpktbuf(
usb_write8(adapter, REG_TXPKTBUF_DBG, 0); usb_write8(adapter, REG_TXPKTBUF_DBG, 0);
start = jiffies; start = jiffies;
while (!(reg_0x143 = usb_read8(adapter, REG_TXPKTBUF_DBG)) && while (!(reg_0x143 = usb_read8(adapter, REG_TXPKTBUF_DBG)) &&
(passing_time = rtw_get_passing_time_ms(start)) < 1000) { jiffies_to_msecs(jiffies - start) < 1000) {
DBG_88E("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __func__, reg_0x143, usb_read8(adapter, 0x106)); DBG_88E("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __func__, reg_0x143, usb_read8(adapter, 0x106));
usleep_range(1000, 2000); usleep_range(1000, 2000);
} }
......
...@@ -163,7 +163,8 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f ...@@ -163,7 +163,8 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
static void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 isfreeall) static void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 isfreeall)
{ {
u32 curr_time, delta_time; unsigned long curr_time;
u32 delta_time;
u32 lifetime = SCANQUEUE_LIFETIME; u32 lifetime = SCANQUEUE_LIFETIME;
struct __queue *free_queue = &(pmlmepriv->free_bss_pool); struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
...@@ -272,7 +273,7 @@ int rtw_if_up(struct adapter *padapter) ...@@ -272,7 +273,7 @@ int rtw_if_up(struct adapter *padapter)
void rtw_generate_random_ibss(u8 *pibss) void rtw_generate_random_ibss(u8 *pibss)
{ {
u32 curtime = jiffies; unsigned long curtime = jiffies;
pibss[0] = 0x02; /* in ad-hoc mode bit1 must set to 1 */ pibss[0] = 0x02; /* in ad-hoc mode bit1 must set to 1 */
pibss[1] = 0x11; pibss[1] = 0x11;
...@@ -878,14 +879,14 @@ inline void rtw_indicate_scan_done(struct adapter *padapter, bool aborted) ...@@ -878,14 +879,14 @@ inline void rtw_indicate_scan_done(struct adapter *padapter, bool aborted)
void rtw_scan_abort(struct adapter *adapter) void rtw_scan_abort(struct adapter *adapter)
{ {
u32 start; unsigned long start;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
start = jiffies; start = jiffies;
pmlmeext->scan_abort = true; pmlmeext->scan_abort = true;
while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) && while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) &&
rtw_get_passing_time_ms(start) <= 200) { jiffies_to_msecs(jiffies - start) <= 200) {
if (adapter->bDriverStopped || adapter->bSurpriseRemoved) if (adapter->bDriverStopped || adapter->bSurpriseRemoved)
break; break;
DBG_88E(FUNC_NDEV_FMT"fw_state=_FW_UNDER_SURVEY!\n", FUNC_NDEV_ARG(adapter->pnetdev)); DBG_88E(FUNC_NDEV_FMT"fw_state=_FW_UNDER_SURVEY!\n", FUNC_NDEV_ARG(adapter->pnetdev));
...@@ -1474,6 +1475,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv ...@@ -1474,6 +1475,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
, struct wlan_network **candidate, struct wlan_network *competitor) , struct wlan_network **candidate, struct wlan_network *competitor)
{ {
int updated = false; int updated = false;
unsigned long since_scan;
struct adapter *adapter = container_of(pmlmepriv, struct adapter, mlmepriv); struct adapter *adapter = container_of(pmlmepriv, struct adapter, mlmepriv);
...@@ -1494,7 +1496,8 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv ...@@ -1494,7 +1496,8 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
goto exit; goto exit;
if (pmlmepriv->to_roaming) { if (pmlmepriv->to_roaming) {
if (rtw_get_passing_time_ms((u32)competitor->last_scanned) >= RTW_SCAN_RESULT_EXPIRE || since_scan = jiffies - competitor->last_scanned;
if (jiffies_to_msecs(since_scan) >= RTW_SCAN_RESULT_EXPIRE ||
is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == false) is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == false)
goto exit; goto exit;
} }
......
...@@ -708,7 +708,7 @@ static int issue_probereq_ex(struct adapter *padapter, ...@@ -708,7 +708,7 @@ static int issue_probereq_ex(struct adapter *padapter,
{ {
int ret; int ret;
int i = 0; int i = 0;
u32 start = jiffies; unsigned long start = jiffies;
do { do {
ret = issue_probereq(padapter, pssid, da, wait_ms > 0 ? true : false); ret = issue_probereq(padapter, pssid, da, wait_ms > 0 ? true : false);
...@@ -732,11 +732,13 @@ static int issue_probereq_ex(struct adapter *padapter, ...@@ -732,11 +732,13 @@ static int issue_probereq_ex(struct adapter *padapter,
if (da) if (da)
DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n", DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n",
FUNC_ADPT_ARG(padapter), da, rtw_get_oper_ch(padapter), FUNC_ADPT_ARG(padapter), da, rtw_get_oper_ch(padapter),
ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start)); ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start));
else else
DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n", DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
FUNC_ADPT_ARG(padapter), rtw_get_oper_ch(padapter), FUNC_ADPT_ARG(padapter), rtw_get_oper_ch(padapter),
ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start)); ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start));
} }
exit: exit:
return ret; return ret;
...@@ -1293,7 +1295,7 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow ...@@ -1293,7 +1295,7 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
{ {
int ret; int ret;
int i = 0; int i = 0;
u32 start = jiffies; unsigned long start = jiffies;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network); struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network);
...@@ -1323,11 +1325,13 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow ...@@ -1323,11 +1325,13 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
if (da) if (da)
DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n", DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n",
FUNC_ADPT_ARG(padapter), da, rtw_get_oper_ch(padapter), FUNC_ADPT_ARG(padapter), da, rtw_get_oper_ch(padapter),
ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start)); ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start));
else else
DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n", DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
FUNC_ADPT_ARG(padapter), rtw_get_oper_ch(padapter), FUNC_ADPT_ARG(padapter), rtw_get_oper_ch(padapter),
ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start)); ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start));
} }
exit: exit:
return ret; return ret;
...@@ -1418,7 +1422,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int ...@@ -1418,7 +1422,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
{ {
int ret; int ret;
int i = 0; int i = 0;
u32 start = jiffies; unsigned long start = jiffies;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network); struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network);
...@@ -1448,11 +1452,13 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int ...@@ -1448,11 +1452,13 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
if (da) if (da)
DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n", DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n",
FUNC_ADPT_ARG(padapter), da, rtw_get_oper_ch(padapter), FUNC_ADPT_ARG(padapter), da, rtw_get_oper_ch(padapter),
ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start)); ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start));
else else
DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n", DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
FUNC_ADPT_ARG(padapter), rtw_get_oper_ch(padapter), FUNC_ADPT_ARG(padapter), rtw_get_oper_ch(padapter),
ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start)); ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start));
} }
exit: exit:
return ret; return ret;
...@@ -1530,7 +1536,7 @@ static int issue_deauth_ex(struct adapter *padapter, u8 *da, ...@@ -1530,7 +1536,7 @@ static int issue_deauth_ex(struct adapter *padapter, u8 *da,
{ {
int ret; int ret;
int i = 0; int i = 0;
u32 start = jiffies; unsigned long start = jiffies;
do { do {
ret = _issue_deauth(padapter, da, reason, wait_ms > 0 ? true : false); ret = _issue_deauth(padapter, da, reason, wait_ms > 0 ? true : false);
...@@ -1553,11 +1559,13 @@ static int issue_deauth_ex(struct adapter *padapter, u8 *da, ...@@ -1553,11 +1559,13 @@ static int issue_deauth_ex(struct adapter *padapter, u8 *da,
if (da) if (da)
DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n", DBG_88E(FUNC_ADPT_FMT" to %pM, ch:%u%s, %d/%d in %u ms\n",
FUNC_ADPT_ARG(padapter), da, rtw_get_oper_ch(padapter), FUNC_ADPT_ARG(padapter), da, rtw_get_oper_ch(padapter),
ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start)); ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start));
else else
DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n", DBG_88E(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
FUNC_ADPT_ARG(padapter), rtw_get_oper_ch(padapter), FUNC_ADPT_ARG(padapter), rtw_get_oper_ch(padapter),
ret == _SUCCESS ? ", acked" : "", i, try_cnt, rtw_get_passing_time_ms(start)); ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start));
} }
exit: exit:
return ret; return ret;
...@@ -1959,7 +1967,7 @@ unsigned int send_beacon(struct adapter *padapter) ...@@ -1959,7 +1967,7 @@ unsigned int send_beacon(struct adapter *padapter)
int issue = 0; int issue = 0;
int poll = 0; int poll = 0;
u32 start = jiffies; unsigned long start = jiffies;
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL); rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL);
do { do {
...@@ -1975,13 +1983,16 @@ unsigned int send_beacon(struct adapter *padapter) ...@@ -1975,13 +1983,16 @@ unsigned int send_beacon(struct adapter *padapter)
if (padapter->bSurpriseRemoved || padapter->bDriverStopped) if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
return _FAIL; return _FAIL;
if (!bxmitok) { if (!bxmitok) {
DBG_88E("%s fail! %u ms\n", __func__, rtw_get_passing_time_ms(start)); DBG_88E("%s fail! %u ms\n", __func__,
jiffies_to_msecs(jiffies - start));
return _FAIL; return _FAIL;
} else { } else {
u32 passing_time = rtw_get_passing_time_ms(start); u32 passing_time = jiffies_to_msecs(jiffies - start);
if (passing_time > 100 || issue > 3) if (passing_time > 100 || issue > 3)
DBG_88E("%s success, issue:%d, poll:%d, %u ms\n", __func__, issue, poll, rtw_get_passing_time_ms(start)); DBG_88E("%s success, issue:%d, poll:%d, %u ms\n",
__func__, issue, poll,
jiffies_to_msecs(jiffies - start));
return _SUCCESS; return _SUCCESS;
} }
} }
......
...@@ -348,7 +348,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) ...@@ -348,7 +348,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
static u8 PS_RDY_CHECK(struct adapter *padapter) static u8 PS_RDY_CHECK(struct adapter *padapter)
{ {
u32 curr_time, delta_time; unsigned long curr_time, delta_time;
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
...@@ -418,7 +418,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a ...@@ -418,7 +418,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
*/ */
s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms) s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
{ {
u32 start_time; unsigned long start_time;
u8 bAwake = false; u8 bAwake = false;
s32 err = 0; s32 err = 0;
...@@ -435,7 +435,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms) ...@@ -435,7 +435,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
break; break;
} }
if (rtw_get_passing_time_ms(start_time) > delay_ms) { if (jiffies_to_msecs(jiffies - start_time) > delay_ms) {
err = -1; err = -1;
DBG_88E("%s: Wait for FW LPS leave more than %u ms!!!\n", __func__, delay_ms); DBG_88E("%s: Wait for FW LPS leave more than %u ms!!!\n", __func__, delay_ms);
break; break;
...@@ -561,24 +561,24 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal ...@@ -561,24 +561,24 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
unsigned long expires; unsigned long expires;
unsigned long start;
int ret = _SUCCESS; int ret = _SUCCESS;
expires = jiffies + msecs_to_jiffies(ips_deffer_ms); expires = jiffies + msecs_to_jiffies(ips_deffer_ms);
if (time_before(pwrpriv->ips_deny_time, expires)) if (time_before(pwrpriv->ips_deny_time, expires))
pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms); pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
{ start = jiffies;
u32 start = jiffies;
if (pwrpriv->ps_processing) { if (pwrpriv->ps_processing) {
DBG_88E("%s wait ps_processing...\n", __func__); DBG_88E("%s wait ps_processing...\n", __func__);
while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000) while (pwrpriv->ps_processing &&
jiffies_to_msecs(jiffies - start) <= 3000)
usleep_range(1000, 3000); usleep_range(1000, 3000);
if (pwrpriv->ps_processing) if (pwrpriv->ps_processing)
DBG_88E("%s wait ps_processing timeout\n", __func__); DBG_88E("%s wait ps_processing timeout\n", __func__);
else else
DBG_88E("%s wait ps_processing done\n", __func__); DBG_88E("%s wait ps_processing done\n", __func__);
} }
}
/* System suspend is not allowed to wakeup */ /* System suspend is not allowed to wakeup */
if ((!pwrpriv->bInternalAutoSuspend) && (pwrpriv->bInSuspend)) { if ((!pwrpriv->bInternalAutoSuspend) && (pwrpriv->bInSuspend)) {
......
...@@ -53,7 +53,7 @@ s32 iol_execute(struct adapter *padapter, u8 control) ...@@ -53,7 +53,7 @@ s32 iol_execute(struct adapter *padapter, u8 control)
{ {
s32 status = _FAIL; s32 status = _FAIL;
u8 reg_0x88 = 0; u8 reg_0x88 = 0;
u32 start = 0, passing_time = 0; unsigned long start = 0;
control = control&0x0f; control = control&0x0f;
reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0); reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0);
...@@ -61,7 +61,7 @@ s32 iol_execute(struct adapter *padapter, u8 control) ...@@ -61,7 +61,7 @@ s32 iol_execute(struct adapter *padapter, u8 control)
start = jiffies; start = jiffies;
while ((reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0)) & control && while ((reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0)) & control &&
(passing_time = rtw_get_passing_time_ms(start)) < 1000) { jiffies_to_msecs(jiffies - start) < 1000) {
; ;
} }
......
...@@ -684,7 +684,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) ...@@ -684,7 +684,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter); struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter);
struct pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv; struct pwrctrl_priv *pwrctrlpriv = &Adapter->pwrctrlpriv;
struct registry_priv *pregistrypriv = &Adapter->registrypriv; struct registry_priv *pregistrypriv = &Adapter->registrypriv;
u32 init_start_time = jiffies; unsigned long init_start_time = jiffies;
#define HAL_INIT_PROFILE_TAG(stage) do {} while (0) #define HAL_INIT_PROFILE_TAG(stage) do {} while (0)
...@@ -903,7 +903,8 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_LCK); ...@@ -903,7 +903,8 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_LCK);
exit: exit:
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_END); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_END);
DBG_88E("%s in %dms\n", __func__, rtw_get_passing_time_ms(init_start_time)); DBG_88E("%s in %dms\n", __func__,
jiffies_to_msecs(jiffies - init_start_time));
return status; return status;
...@@ -1149,14 +1150,15 @@ static void _ReadRFType(struct adapter *Adapter) ...@@ -1149,14 +1150,15 @@ static void _ReadRFType(struct adapter *Adapter)
static void _ReadAdapterInfo8188EU(struct adapter *Adapter) static void _ReadAdapterInfo8188EU(struct adapter *Adapter)
{ {
u32 start = jiffies; unsigned long start = jiffies;
MSG_88E("====> %s\n", __func__); MSG_88E("====> %s\n", __func__);
_ReadRFType(Adapter);/* rf_chip -> _InitRFType() */ _ReadRFType(Adapter);/* rf_chip -> _InitRFType() */
_ReadPROMContent(Adapter); _ReadPROMContent(Adapter);
MSG_88E("<==== %s in %d ms\n", __func__, rtw_get_passing_time_ms(start)); MSG_88E("<==== %s in %d ms\n", __func__,
jiffies_to_msecs(jiffies - start));
} }
#define GPIO_DEBUG_PORT_NUM 0 #define GPIO_DEBUG_PORT_NUM 0
......
...@@ -87,8 +87,6 @@ u32 _rtw_down_sema(struct semaphore *sema); ...@@ -87,8 +87,6 @@ u32 _rtw_down_sema(struct semaphore *sema);
void _rtw_init_queue(struct __queue *pqueue); void _rtw_init_queue(struct __queue *pqueue);
s32 rtw_get_passing_time_ms(u32 start);
struct rtw_netdev_priv_indicator { struct rtw_netdev_priv_indicator {
void *priv; void *priv;
u32 sizeof_priv; u32 sizeof_priv;
......
...@@ -1100,7 +1100,7 @@ static int ips_netdrv_open(struct adapter *padapter) ...@@ -1100,7 +1100,7 @@ static int ips_netdrv_open(struct adapter *padapter)
int rtw_ips_pwr_up(struct adapter *padapter) int rtw_ips_pwr_up(struct adapter *padapter)
{ {
int result; int result;
u32 start_time = jiffies; unsigned long start_time = jiffies;
DBG_88E("===> rtw_ips_pwr_up..............\n"); DBG_88E("===> rtw_ips_pwr_up..............\n");
rtw_reset_drv_sw(padapter); rtw_reset_drv_sw(padapter);
...@@ -1109,13 +1109,14 @@ int rtw_ips_pwr_up(struct adapter *padapter) ...@@ -1109,13 +1109,14 @@ int rtw_ips_pwr_up(struct adapter *padapter)
rtw_led_control(padapter, LED_CTL_NO_LINK); rtw_led_control(padapter, LED_CTL_NO_LINK);
DBG_88E("<=== rtw_ips_pwr_up.............. in %dms\n", rtw_get_passing_time_ms(start_time)); DBG_88E("<=== rtw_ips_pwr_up.............. in %dms\n",
jiffies_to_msecs(jiffies - start_time));
return result; return result;
} }
void rtw_ips_pwr_down(struct adapter *padapter) void rtw_ips_pwr_down(struct adapter *padapter)
{ {
u32 start_time = jiffies; unsigned long start_time = jiffies;
DBG_88E("===> rtw_ips_pwr_down...................\n"); DBG_88E("===> rtw_ips_pwr_down...................\n");
...@@ -1124,7 +1125,8 @@ void rtw_ips_pwr_down(struct adapter *padapter) ...@@ -1124,7 +1125,8 @@ void rtw_ips_pwr_down(struct adapter *padapter)
rtw_led_control(padapter, LED_CTL_POWER_OFF); rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_ips_dev_unload(padapter); rtw_ips_dev_unload(padapter);
DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time)); DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n",
jiffies_to_msecs(jiffies - start_time));
} }
void rtw_ips_dev_unload(struct adapter *padapter) void rtw_ips_dev_unload(struct adapter *padapter)
......
...@@ -77,12 +77,6 @@ void _rtw_init_queue(struct __queue *pqueue) ...@@ -77,12 +77,6 @@ void _rtw_init_queue(struct __queue *pqueue)
spin_lock_init(&(pqueue->lock)); spin_lock_init(&(pqueue->lock));
} }
/* the input parameter start must be in jiffies */
inline s32 rtw_get_passing_time_ms(u32 start)
{
return jiffies_to_msecs(jiffies-start);
}
struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv,
void *old_priv) void *old_priv)
{ {
......
...@@ -227,7 +227,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) ...@@ -227,7 +227,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
struct net_device *pnetdev = padapter->pnetdev; struct net_device *pnetdev = padapter->pnetdev;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
u32 start_time = jiffies; unsigned long start_time = jiffies;
pr_debug("==> %s (%s:%d)\n", __func__, current->comm, current->pid); pr_debug("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
...@@ -282,7 +282,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) ...@@ -282,7 +282,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
exit: exit:
pr_debug("<=== %s .............. in %dms\n", __func__, pr_debug("<=== %s .............. in %dms\n", __func__,
rtw_get_passing_time_ms(start_time)); jiffies_to_msecs(jiffies - start_time));
return 0; return 0;
} }
...@@ -292,7 +292,7 @@ static int rtw_resume_process(struct adapter *padapter) ...@@ -292,7 +292,7 @@ static int rtw_resume_process(struct adapter *padapter)
struct net_device *pnetdev; struct net_device *pnetdev;
struct pwrctrl_priv *pwrpriv = NULL; struct pwrctrl_priv *pwrpriv = NULL;
int ret = -1; int ret = -1;
u32 start_time = jiffies; unsigned long start_time = jiffies;
pr_debug("==> %s (%s:%d)\n", __func__, current->comm, current->pid); pr_debug("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
...@@ -323,7 +323,7 @@ static int rtw_resume_process(struct adapter *padapter) ...@@ -323,7 +323,7 @@ static int rtw_resume_process(struct adapter *padapter)
if (pwrpriv) if (pwrpriv)
pwrpriv->bInSuspend = false; pwrpriv->bInSuspend = false;
pr_debug("<=== %s return %d.............. in %dms\n", __func__, pr_debug("<=== %s return %d.............. in %dms\n", __func__,
ret, rtw_get_passing_time_ms(start_time)); ret, jiffies_to_msecs(jiffies - start_time));
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment