mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2026-02-12 16:04:39 +00:00
Remove wrappers
Port of 788253860c21f4e40add556d7ed715fefb2bafb3 Port of ace050139cee44d06b06b4c78074b4eb80fb7c0a
This commit is contained in:
@@ -467,7 +467,7 @@ static void rtw_mesh_acnode_set_notify_etime(_adapter *adapter, u8 *rframe_whdr)
|
||||
|
||||
if (rtw_mesh_scanned_is_acnode_confirmed(adapter, scanned)) {
|
||||
scanned->acnode_notify_etime = jiffies
|
||||
+ rtw_ms_to_systime(adapter->mesh_cfg.peer_sel_policy.acnode_notify_timeout_ms);
|
||||
+ msecs_to_jiffies(adapter->mesh_cfg.peer_sel_policy.acnode_notify_timeout_ms);
|
||||
if (scanned->acnode_notify_etime == 0)
|
||||
scanned->acnode_notify_etime++;
|
||||
}
|
||||
@@ -2344,7 +2344,7 @@ void dump_mesh_plink_ctl(void *sel, _adapter *adapter)
|
||||
#if CONFIG_RTW_MESH_PEER_BLACKLIST
|
||||
if (!IS_PEER_CONF_DISABLED(ent)) {
|
||||
if (!IS_PEER_CONF_TIMEOUT(ent))
|
||||
RTW_PRINT_SEL(sel, "peer_conf:%d\n", rtw_systime_to_ms(ent->peer_conf_end_time - jiffies));
|
||||
RTW_PRINT_SEL(sel, "peer_conf:%d\n", jiffies_to_msecs(ent->peer_conf_end_time - jiffies));
|
||||
else
|
||||
RTW_PRINT_SEL(sel, "peer_conf:TIMEOUT\n");
|
||||
}
|
||||
@@ -2353,7 +2353,7 @@ void dump_mesh_plink_ctl(void *sel, _adapter *adapter)
|
||||
#if CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST
|
||||
if (!IS_CTO_MGATE_CONF_DISABLED(ent)) {
|
||||
if (!IS_CTO_MGATE_CONF_TIMEOUT(ent))
|
||||
RTW_PRINT_SEL(sel, "cto_mgate_conf:%d\n", rtw_systime_to_ms(ent->cto_mgate_conf_end_time - jiffies));
|
||||
RTW_PRINT_SEL(sel, "cto_mgate_conf:%d\n", jiffies_to_msecs(ent->cto_mgate_conf_end_time - jiffies));
|
||||
else
|
||||
RTW_PRINT_SEL(sel, "cto_mgate_conf:TIMEOUT\n");
|
||||
}
|
||||
@@ -2941,7 +2941,7 @@ static int rtw_mrc_check(_adapter *adapter, const u8 *msa, u32 seq)
|
||||
return 0;
|
||||
|
||||
p->seqnum = seq;
|
||||
p->exp_time = jiffies + rtw_ms_to_systime(RTW_MRC_TIMEOUT_MS);
|
||||
p->exp_time = jiffies + msecs_to_jiffies(RTW_MRC_TIMEOUT_MS);
|
||||
memcpy(p->msa, msa, ETH_ALEN);
|
||||
rtw_hlist_add_head(&p->list, &mrc->bucket[idx]);
|
||||
return 0;
|
||||
@@ -3215,7 +3215,7 @@ int rtw_mesh_nexthop_lookup(_adapter *adapter,
|
||||
|
||||
if (rtw_time_after(jiffies,
|
||||
mpath->exp_time -
|
||||
rtw_ms_to_systime(adapter->mesh_cfg.path_refresh_time)) &&
|
||||
msecs_to_jiffies(adapter->mesh_cfg.path_refresh_time)) &&
|
||||
_rtw_memcmp(adapter_mac_addr(adapter), msa, ETH_ALEN) == _TRUE &&
|
||||
!(mpath->flags & RTW_MESH_PATH_RESOLVING) &&
|
||||
!(mpath->flags & RTW_MESH_PATH_FIXED)) {
|
||||
|
||||
@@ -159,7 +159,7 @@ enum rtw_mesh_deferred_task_flags {
|
||||
#define SET_PEER_CONF_DISABLED(plink) (plink)->peer_conf_end_time = RTW_MESH_PEER_CONF_DISABLED
|
||||
#define SET_PEER_CONF_END_TIME(plink, timeout_ms) \
|
||||
do { \
|
||||
(plink)->peer_conf_end_time = jiffies + rtw_ms_to_systime(timeout_ms); \
|
||||
(plink)->peer_conf_end_time = jiffies + msecs_to_jiffies(timeout_ms); \
|
||||
if ((plink)->peer_conf_end_time == RTW_MESH_PEER_CONF_DISABLED) \
|
||||
(plink)->peer_conf_end_time++; \
|
||||
} while (0)
|
||||
@@ -177,7 +177,7 @@ enum rtw_mesh_deferred_task_flags {
|
||||
#define SET_CTO_MGATE_CONF_DISABLED(plink) (plink)->cto_mgate_conf_end_time = RTW_MESH_CTO_MGATE_CONF_DISABLED
|
||||
#define SET_CTO_MGATE_CONF_END_TIME(plink, timeout_ms) \
|
||||
do { \
|
||||
(plink)->cto_mgate_conf_end_time = jiffies + rtw_ms_to_systime(timeout_ms); \
|
||||
(plink)->cto_mgate_conf_end_time = jiffies + msecs_to_jiffies(timeout_ms); \
|
||||
if ((plink)->cto_mgate_conf_end_time == RTW_MESH_CTO_MGATE_CONF_DISABLED) \
|
||||
(plink)->cto_mgate_conf_end_time++; \
|
||||
} while (0)
|
||||
|
||||
@@ -145,7 +145,7 @@ static inline u16 rtw_u16_field_get(const u8 *preq_elem, int shift, BOOLEAN ae)
|
||||
#define RTW_PERR_IE_TARGET_SN(x) rtw_u32_field_get(x, 9, 0)
|
||||
#define RTW_PERR_IE_TARGET_RCODE(x) rtw_u16_field_get(x, 13, 0)
|
||||
|
||||
#define RTW_TU_TO_SYSTIME(x) (rtw_us_to_systime((x) * 1024))
|
||||
#define RTW_TU_TO_SYSTIME(x) (usecs_to_jiffies((x) * 1024))
|
||||
#define RTW_TU_TO_EXP_TIME(x) (jiffies + RTW_TU_TO_SYSTIME(x))
|
||||
#define RTW_MSEC_TO_TU(x) (x*1000/1024)
|
||||
#define RTW_SN_GT(x, y) ((s32)(y - x) < 0)
|
||||
@@ -158,16 +158,16 @@ static inline u32 RTW_SN_DELTA(u32 x, u32 y)
|
||||
}
|
||||
|
||||
#define rtw_net_traversal_jiffies(adapter) \
|
||||
rtw_ms_to_systime(adapter->mesh_cfg.dot11MeshHWMPnetDiameterTraversalTime)
|
||||
msecs_to_jiffies(adapter->mesh_cfg.dot11MeshHWMPnetDiameterTraversalTime)
|
||||
#define rtw_default_lifetime(adapter) \
|
||||
RTW_MSEC_TO_TU(adapter->mesh_cfg.dot11MeshHWMPactivePathTimeout)
|
||||
#define rtw_min_preq_int_jiff(adapter) \
|
||||
(rtw_ms_to_systime(adapter->mesh_cfg.dot11MeshHWMPpreqMinInterval))
|
||||
(msecs_to_jiffies(adapter->mesh_cfg.dot11MeshHWMPpreqMinInterval))
|
||||
#define rtw_max_preq_retries(adapter) (adapter->mesh_cfg.dot11MeshHWMPmaxPREQretries)
|
||||
#define rtw_disc_timeout_jiff(adapter) \
|
||||
rtw_ms_to_systime(adapter->mesh_cfg.min_discovery_timeout)
|
||||
msecs_to_jiffies(adapter->mesh_cfg.min_discovery_timeout)
|
||||
#define rtw_root_path_confirmation_jiffies(adapter) \
|
||||
rtw_ms_to_systime(adapter->mesh_cfg.dot11MeshHWMPconfirmationInterval)
|
||||
msecs_to_jiffies(adapter->mesh_cfg.dot11MeshHWMPconfirmationInterval)
|
||||
|
||||
static inline BOOLEAN rtw_ether_addr_equal(const u8 *addr1, const u8 *addr2)
|
||||
{
|
||||
|
||||
@@ -360,7 +360,7 @@ int rtw_mesh_path_add_gate(struct rtw_mesh_path *mpath)
|
||||
enter_critical_bh(&mpath->state_lock);
|
||||
mcfg = &mpath->adapter->mesh_cfg;
|
||||
mpath->gate_timeout = jiffies +
|
||||
rtw_ms_to_systime(mcfg->path_gate_timeout_factor *
|
||||
msecs_to_jiffies(mcfg->path_gate_timeout_factor *
|
||||
mpath->gate_ann_int);
|
||||
if (mpath->is_gate) {
|
||||
err = -EEXIST;
|
||||
@@ -1148,7 +1148,7 @@ void rtw_mesh_path_tbl_expire(_adapter *adapter,
|
||||
exit_critical_bh(&mpath->state_lock);
|
||||
} else {
|
||||
mpath->gate_asked = true;
|
||||
mpath->gate_timeout = jiffies + rtw_ms_to_systime(mpath->gate_ann_int);
|
||||
mpath->gate_timeout = jiffies + msecs_to_jiffies(mpath->gate_ann_int);
|
||||
exit_critical_bh(&mpath->state_lock);
|
||||
rtw_mesh_queue_preq(mpath, RTW_PREQ_Q_F_START | RTW_PREQ_Q_F_REFRESH);
|
||||
RTW_MPATH_DBG(FUNC_ADPT_FMT"mpath [%pM] ask mesh gate existence (is_root=%d)\n",
|
||||
|
||||
Reference in New Issue
Block a user