mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-12-24 13:01:44 +00:00
Merge pull request #252 from CGarces/staging_cherrypick4
Adapted commits from staging area (4)
This commit is contained in:
commit
53bcca44ca
@ -1952,7 +1952,7 @@ ReadEFuseByte(
|
||||
u32 value32;
|
||||
u8 readbyte;
|
||||
u16 retry;
|
||||
/* systime start=rtw_get_current_time(); */
|
||||
/* systime start=jiffies; */
|
||||
|
||||
if (bPseudoTest) {
|
||||
Efuse_Read1ByteFromFakeContent(Adapter, _offset, pbuf);
|
||||
|
@ -269,7 +269,7 @@ void rtw_mesh_update_scanned_acnode_status(_adapter *adapter, struct wlan_networ
|
||||
acnode = !nop && accept;
|
||||
|
||||
if (acnode && scanned->acnode_stime == 0) {
|
||||
scanned->acnode_stime = rtw_get_current_time();
|
||||
scanned->acnode_stime = jiffies;
|
||||
if (scanned->acnode_stime == 0)
|
||||
scanned->acnode_stime++;
|
||||
} else if (!acnode) {
|
||||
@ -288,7 +288,7 @@ bool rtw_mesh_scanned_is_acnode_confirmed(_adapter *adapter, struct wlan_network
|
||||
static bool rtw_mesh_scanned_is_acnode_allow_notify(_adapter *adapter, struct wlan_network *scanned)
|
||||
{
|
||||
return scanned->acnode_notify_etime
|
||||
&& rtw_time_after(scanned->acnode_notify_etime, rtw_get_current_time());
|
||||
&& rtw_time_after(scanned->acnode_notify_etime, jiffies);
|
||||
}
|
||||
|
||||
bool rtw_mesh_acnode_prevent_allow_sacrifice(_adapter *adapter)
|
||||
@ -329,7 +329,7 @@ static bool rtw_mesh_acnode_candidate_exist(_adapter *adapter)
|
||||
|
||||
head = get_list_head(queue);
|
||||
list = get_next(head);
|
||||
while (!rtw_end_of_queue_search(head, list)) {
|
||||
while (head != list) {
|
||||
scanned = LIST_CONTAINOR(list, struct wlan_network, list);
|
||||
list = get_next(list);
|
||||
|
||||
@ -409,7 +409,7 @@ struct sta_info *_rtw_mesh_acnode_prevent_pick_sacrifice(_adapter *adapter)
|
||||
|
||||
head = &stapriv->asoc_list;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
sta = LIST_CONTAINOR(list, struct sta_info, asoc_list);
|
||||
list = get_next(list);
|
||||
|
||||
@ -466,8 +466,8 @@ static void rtw_mesh_acnode_set_notify_etime(_adapter *adapter, u8 *rframe_whdr)
|
||||
struct wlan_network *scanned = rtw_find_network(&adapter->mlmepriv.scanned_queue, get_addr2_ptr(rframe_whdr));
|
||||
|
||||
if (rtw_mesh_scanned_is_acnode_confirmed(adapter, scanned)) {
|
||||
scanned->acnode_notify_etime = rtw_get_current_time()
|
||||
+ rtw_ms_to_systime(adapter->mesh_cfg.peer_sel_policy.acnode_notify_timeout_ms);
|
||||
scanned->acnode_notify_etime = jiffies
|
||||
+ msecs_to_jiffies(adapter->mesh_cfg.peer_sel_policy.acnode_notify_timeout_ms);
|
||||
if (scanned->acnode_notify_etime == 0)
|
||||
scanned->acnode_notify_etime++;
|
||||
}
|
||||
@ -627,11 +627,11 @@ static void rtw_mesh_cto_mgate_blacklist_chk(_adapter *adapter)
|
||||
enter_critical_bh(&blist->lock);
|
||||
head = &blist->queue;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
|
||||
list = get_next(list);
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) {
|
||||
if (rtw_time_after(jiffies, ent->exp_time)) {
|
||||
rtw_list_delete(&ent->list);
|
||||
rtw_mfree(ent, sizeof(struct blacklist_ent));
|
||||
continue;
|
||||
@ -748,7 +748,7 @@ void rtw_mesh_peer_status_chk(_adapter *adapter)
|
||||
|
||||
head = &stapriv->asoc_list;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
sta = LIST_CONTAINOR(list, struct sta_info, asoc_list);
|
||||
list = get_next(list);
|
||||
|
||||
@ -893,7 +893,7 @@ static u8 rtw_mesh_offch_cto_mgate_required(_adapter *adapter)
|
||||
|
||||
head = get_list_head(queue);
|
||||
pos = get_next(head);
|
||||
while (!rtw_end_of_queue_search(head, pos)) {
|
||||
while (!head == pos) {
|
||||
scanned = LIST_CONTAINOR(pos, struct wlan_network, list);
|
||||
|
||||
if (rtw_get_passing_time_ms(scanned->last_scanned) < mcfg->peer_sel_policy.scanr_exp_ms
|
||||
@ -913,7 +913,7 @@ static u8 rtw_mesh_offch_cto_mgate_required(_adapter *adapter)
|
||||
pos = get_next(pos);
|
||||
}
|
||||
|
||||
if (rtw_end_of_queue_search(head, pos))
|
||||
if (head == pos)
|
||||
ret = 1;
|
||||
|
||||
exit_critical_bh(&(mlme->scanned_queue.lock));
|
||||
@ -979,7 +979,7 @@ u8 rtw_mesh_select_operating_ch(_adapter *adapter)
|
||||
|
||||
head = get_list_head(queue);
|
||||
pos = get_next(head);
|
||||
while (!rtw_end_of_queue_search(head, pos)) {
|
||||
while (!head == pos) {
|
||||
scanned = LIST_CONTAINOR(pos, struct wlan_network, list);
|
||||
pos = get_next(pos);
|
||||
|
||||
@ -1085,7 +1085,7 @@ void dump_mesh_networks(void *sel, _adapter *adapter)
|
||||
head = get_list_head(queue);
|
||||
list = get_next(head);
|
||||
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
network = LIST_CONTAINOR(list, struct wlan_network, list);
|
||||
list = get_next(list);
|
||||
|
||||
@ -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 - rtw_get_current_time()));
|
||||
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 - rtw_get_current_time()));
|
||||
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");
|
||||
}
|
||||
@ -2429,10 +2429,10 @@ int rtw_mesh_peer_establish(_adapter *adapter, struct mesh_plink_ent *plink, str
|
||||
|
||||
rtw_ap_parse_sta_capability(adapter, sta, plink->rx_conf_ies);
|
||||
|
||||
if (rtw_ap_parse_sta_supported_rates(adapter, sta, tlv_ies, tlv_ieslen) != _STATS_SUCCESSFUL_)
|
||||
if (rtw_ap_parse_sta_supported_rates(adapter, sta, tlv_ies, tlv_ieslen) != WLAN_STATUS_SUCCESS)
|
||||
goto exit;
|
||||
|
||||
if (rtw_ap_parse_sta_security_ie(adapter, sta, &elems) != _STATS_SUCCESSFUL_)
|
||||
if (rtw_ap_parse_sta_security_ie(adapter, sta, &elems) != WLAN_STATUS_SUCCESS)
|
||||
goto exit;
|
||||
|
||||
rtw_ap_parse_sta_wmm_ie(adapter, sta, tlv_ies, tlv_ieslen);
|
||||
@ -2528,7 +2528,7 @@ static u8 *rtw_mesh_construct_peer_mesh_close(_adapter *adapter, struct mesh_pli
|
||||
memcpy(whdr->addr2, plink->addr, ETH_ALEN);
|
||||
memcpy(whdr->addr3, adapter_mac_addr(adapter), ETH_ALEN);
|
||||
|
||||
set_frame_sub_type(frame, WIFI_ACTION);
|
||||
set_frame_sub_type(frame, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pos += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
*(pos++) = RTW_WLAN_CATEGORY_SELF_PROTECTED;
|
||||
@ -2643,7 +2643,7 @@ u8 rtw_mesh_ps_annc(_adapter *adapter, u8 ps)
|
||||
|
||||
head = &stapriv->asoc_list;
|
||||
list = get_next(head);
|
||||
while ((rtw_end_of_queue_search(head, list)) == _FALSE) {
|
||||
while (head != list) {
|
||||
int stainfo_offset;
|
||||
|
||||
sta = LIST_CONTAINOR(list, struct sta_info, asoc_list);
|
||||
@ -2695,7 +2695,7 @@ static void mpath_tx_tasklet_hdl(void *priv)
|
||||
|
||||
head = &tmp;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
||||
list = get_next(list);
|
||||
rtw_list_delete(&xframe->list);
|
||||
@ -2726,7 +2726,7 @@ static void rtw_mpath_tx_queue_flush(_adapter *adapter)
|
||||
|
||||
head = &tmp;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
||||
list = get_next(list);
|
||||
rtw_list_delete(&xframe->list);
|
||||
@ -2924,7 +2924,7 @@ static int rtw_mrc_check(_adapter *adapter, const u8 *msa, u32 seq)
|
||||
idx = seq & mrc->idx_mask;
|
||||
rtw_hlist_for_each_entry_safe(p, np, n, &mrc->bucket[idx], list) {
|
||||
++entries;
|
||||
timeout = rtw_time_after(rtw_get_current_time(), p->exp_time);
|
||||
timeout = rtw_time_after(jiffies, p->exp_time);
|
||||
if (timeout || entries == RTW_MRC_QUEUE_MAX_LEN) {
|
||||
if (!timeout)
|
||||
minfo->mshstats.mrc_del_qlen++;
|
||||
@ -2941,7 +2941,7 @@ static int rtw_mrc_check(_adapter *adapter, const u8 *msa, u32 seq)
|
||||
return 0;
|
||||
|
||||
p->seqnum = seq;
|
||||
p->exp_time = rtw_get_current_time() + 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;
|
||||
@ -3081,9 +3081,9 @@ void rtw_mesh_init_mesh_info(_adapter *adapter)
|
||||
|
||||
rtw_mesh_plink_ctl_init(adapter);
|
||||
|
||||
minfo->last_preq = rtw_get_current_time();
|
||||
/* minfo->last_sn_update = rtw_get_current_time(); */
|
||||
minfo->next_perr = rtw_get_current_time();
|
||||
minfo->last_preq = jiffies;
|
||||
/* minfo->last_sn_update = jiffies; */
|
||||
minfo->next_perr = jiffies;
|
||||
|
||||
atomic_set(&minfo->mpaths, 0);
|
||||
rtw_mesh_pathtbl_init(adapter);
|
||||
@ -3213,9 +3213,9 @@ int rtw_mesh_nexthop_lookup(_adapter *adapter,
|
||||
if (!mpath || !(mpath->flags & RTW_MESH_PATH_ACTIVE))
|
||||
goto endlookup;
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time(),
|
||||
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)) {
|
||||
@ -3253,7 +3253,7 @@ static bool rtw_mesh_data_bmc_to_uc(_adapter *adapter
|
||||
head = &stapriv->asoc_list;
|
||||
list = get_next(head);
|
||||
|
||||
while ((rtw_end_of_queue_search(head, list)) == _FALSE) {
|
||||
while (head != list) {
|
||||
int stainfo_offset;
|
||||
|
||||
sta = LIST_CONTAINOR(list, struct sta_info, asoc_list);
|
||||
@ -3366,7 +3366,7 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk
|
||||
if (mpp_lookup) {
|
||||
mppath = rtw_mpp_path_lookup(adapter, etherhdr.h_dest);
|
||||
if (mppath)
|
||||
mppath->exp_time = rtw_get_current_time();
|
||||
mppath->exp_time = jiffies;
|
||||
}
|
||||
|
||||
if (mppath && mpath)
|
||||
@ -3801,7 +3801,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
|
||||
enter_critical_bh(&mppath->state_lock);
|
||||
if (_rtw_memcmp(mppath->mpp, mpp_addr, ETH_ALEN) == _FALSE)
|
||||
memcpy(mppath->mpp, mpp_addr, ETH_ALEN);
|
||||
mppath->exp_time = rtw_get_current_time();
|
||||
mppath->exp_time = jiffies;
|
||||
exit_critical_bh(&mppath->state_lock);
|
||||
}
|
||||
rtw_rcu_read_unlock();
|
||||
|
@ -155,11 +155,11 @@ enum rtw_mesh_deferred_task_flags {
|
||||
#define RTW_MESH_PEER_CONF_DISABLED 0 /* special time value means no confirmation ongoing */
|
||||
#if CONFIG_RTW_MESH_PEER_BLACKLIST
|
||||
#define IS_PEER_CONF_DISABLED(plink) ((plink)->peer_conf_end_time == RTW_MESH_PEER_CONF_DISABLED)
|
||||
#define IS_PEER_CONF_TIMEOUT(plink)(!IS_PEER_CONF_DISABLED(plink) && rtw_time_after(rtw_get_current_time(), (plink)->peer_conf_end_time))
|
||||
#define IS_PEER_CONF_TIMEOUT(plink)(!IS_PEER_CONF_DISABLED(plink) && rtw_time_after(jiffies, (plink)->peer_conf_end_time))
|
||||
#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 = rtw_get_current_time() + 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)
|
||||
@ -173,11 +173,11 @@ enum rtw_mesh_deferred_task_flags {
|
||||
#define RTW_MESH_CTO_MGATE_CONF_DISABLED 0 /* special time value means no confirmation ongoing */
|
||||
#if CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST
|
||||
#define IS_CTO_MGATE_CONF_DISABLED(plink) ((plink)->cto_mgate_conf_end_time == RTW_MESH_CTO_MGATE_CONF_DISABLED)
|
||||
#define IS_CTO_MGATE_CONF_TIMEOUT(plink)(!IS_CTO_MGATE_CONF_DISABLED(plink) && rtw_time_after(rtw_get_current_time(), (plink)->cto_mgate_conf_end_time))
|
||||
#define IS_CTO_MGATE_CONF_TIMEOUT(plink)(!IS_CTO_MGATE_CONF_DISABLED(plink) && rtw_time_after(jiffies, (plink)->cto_mgate_conf_end_time))
|
||||
#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 = rtw_get_current_time() + 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,8 +145,8 @@ 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_EXP_TIME(x) (rtw_get_current_time() + RTW_TU_TO_SYSTIME(x))
|
||||
#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)
|
||||
#define RTW_SN_LT(x, y) ((s32)(x - y) < 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)
|
||||
{
|
||||
@ -245,7 +245,7 @@ static int rtw_mesh_path_sel_frame_tx(enum rtw_mpath_frame_type mpath_action, u8
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pos, WIFI_ACTION);
|
||||
set_frame_sub_type(pos, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pos += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -335,7 +335,7 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
|
||||
u8 *pos, ie_len;
|
||||
u16 *fctrl = NULL;
|
||||
|
||||
if (rtw_time_before(rtw_get_current_time(), minfo->next_perr))
|
||||
if (rtw_time_before(jiffies, minfo->next_perr))
|
||||
return -1;
|
||||
|
||||
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
|
||||
@ -358,7 +358,7 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pos, WIFI_ACTION);
|
||||
set_frame_sub_type(pos, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pos += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -669,11 +669,11 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter,
|
||||
reply = _TRUE;
|
||||
to_gate_ask = 1;
|
||||
target_metric = 0;
|
||||
if (rtw_time_after(rtw_get_current_time(), minfo->last_sn_update +
|
||||
if (rtw_time_after(jiffies, minfo->last_sn_update +
|
||||
rtw_net_traversal_jiffies(adapter)) ||
|
||||
rtw_time_before(rtw_get_current_time(), minfo->last_sn_update)) {
|
||||
rtw_time_before(jiffies, minfo->last_sn_update)) {
|
||||
++minfo->sn;
|
||||
minfo->last_sn_update = rtw_get_current_time();
|
||||
minfo->last_sn_update = jiffies;
|
||||
}
|
||||
target_sn = minfo->sn;
|
||||
} else if (is_broadcast_mac_addr(target_addr) &&
|
||||
@ -686,7 +686,7 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter,
|
||||
target_addr = adapter_mac_addr(adapter);
|
||||
target_sn = ++minfo->sn;
|
||||
target_metric = 0;
|
||||
minfo->last_sn_update = rtw_get_current_time();
|
||||
minfo->last_sn_update = jiffies;
|
||||
}
|
||||
|
||||
if (preq_is_gate) {
|
||||
@ -998,9 +998,9 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
|
||||
}
|
||||
|
||||
if ((!(path->flags & (RTW_MESH_PATH_ACTIVE | RTW_MESH_PATH_RESOLVING)) ||
|
||||
(rtw_time_after(rtw_get_current_time(), path->last_preq_to_root +
|
||||
(rtw_time_after(jiffies, path->last_preq_to_root +
|
||||
rtw_root_path_confirmation_jiffies(adapter)) ||
|
||||
rtw_time_before(rtw_get_current_time(), path->last_preq_to_root))) &&
|
||||
rtw_time_before(jiffies, path->last_preq_to_root))) &&
|
||||
!(path->flags & RTW_MESH_PATH_FIXED) && (ttl != 0)) {
|
||||
u8 preq_node_flag = RTW_PREQ_Q_F_START | RTW_PREQ_Q_F_REFRESH;
|
||||
|
||||
@ -1022,7 +1022,7 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
|
||||
}
|
||||
#endif
|
||||
rtw_mesh_queue_preq(path, preq_node_flag);
|
||||
path->last_preq_to_root = rtw_get_current_time();
|
||||
path->last_preq_to_root = jiffies;
|
||||
}
|
||||
|
||||
path->sn = originator_sn;
|
||||
@ -1325,12 +1325,12 @@ void rtw_mesh_queue_preq(struct rtw_mesh_path *path, u8 flags)
|
||||
++minfo->preq_queue_len;
|
||||
exit_critical_bh(&minfo->mesh_preq_queue_lock);
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time(), minfo->last_preq + rtw_min_preq_int_jiff(adapter)))
|
||||
if (rtw_time_after(jiffies, minfo->last_preq + rtw_min_preq_int_jiff(adapter)))
|
||||
rtw_mesh_work(&adapter->mesh_work);
|
||||
|
||||
else if (rtw_time_before(rtw_get_current_time(), minfo->last_preq)) {
|
||||
else if (rtw_time_before(jiffies, minfo->last_preq)) {
|
||||
/* systime wrapped around issue */
|
||||
minfo->last_preq = rtw_get_current_time() - rtw_min_preq_int_jiff(adapter) - 1;
|
||||
minfo->last_preq = jiffies - rtw_min_preq_int_jiff(adapter) - 1;
|
||||
rtw_mesh_work(&adapter->mesh_work);
|
||||
} else
|
||||
rtw_mod_timer(&adapter->mesh_path_timer, minfo->last_preq +
|
||||
@ -1372,7 +1372,7 @@ void rtw_mesh_path_start_discovery(_adapter *adapter)
|
||||
|
||||
enter_critical_bh(&minfo->mesh_preq_queue_lock);
|
||||
if (!minfo->preq_queue_len ||
|
||||
rtw_time_before(rtw_get_current_time(), minfo->last_preq +
|
||||
rtw_time_before(jiffies, minfo->last_preq +
|
||||
rtw_min_preq_int_jiff(adapter))) {
|
||||
exit_critical_bh(&minfo->mesh_preq_queue_lock);
|
||||
return;
|
||||
@ -1412,13 +1412,13 @@ void rtw_mesh_path_start_discovery(_adapter *adapter)
|
||||
goto enddiscovery;
|
||||
}
|
||||
|
||||
minfo->last_preq = rtw_get_current_time();
|
||||
minfo->last_preq = jiffies;
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time(), minfo->last_sn_update +
|
||||
if (rtw_time_after(jiffies, minfo->last_sn_update +
|
||||
rtw_net_traversal_jiffies(adapter)) ||
|
||||
rtw_time_before(rtw_get_current_time(), minfo->last_sn_update)) {
|
||||
rtw_time_before(jiffies, minfo->last_sn_update)) {
|
||||
++minfo->sn;
|
||||
minfo->last_sn_update = rtw_get_current_time();
|
||||
minfo->last_sn_update = jiffies;
|
||||
}
|
||||
lifetime = rtw_default_lifetime(adapter);
|
||||
ttl = mshcfg->element_ttl;
|
||||
@ -1448,7 +1448,7 @@ void rtw_mesh_path_start_discovery(_adapter *adapter)
|
||||
rtw_mesh_path_sel_frame_tx(RTW_MPATH_PREQ, flags, adapter_mac_addr(adapter), minfo->sn,
|
||||
target_flags, path->dst, path->sn, da, 0,
|
||||
ttl, lifetime, 0, minfo->preq_id++, adapter);
|
||||
rtw_mod_timer(&path->timer, rtw_get_current_time() + path->discovery_timeout);
|
||||
rtw_mod_timer(&path->timer, jiffies + path->discovery_timeout);
|
||||
|
||||
enddiscovery:
|
||||
rtw_rcu_read_unlock();
|
||||
@ -1496,7 +1496,7 @@ void rtw_mesh_path_timer(void *ctx)
|
||||
RTW_MESH_PATH_REQ_QUEUED |
|
||||
RTW_MESH_PATH_ROOT_ADD_CHK |
|
||||
RTW_MESH_PATH_PEER_AKA);
|
||||
path->exp_time = rtw_get_current_time();
|
||||
path->exp_time = jiffies;
|
||||
exit_critical_bh(&path->state_lock);
|
||||
if (!path->is_gate && rtw_mesh_gate_num(adapter) > 0) {
|
||||
ret = rtw_mesh_path_send_to_gates(path);
|
||||
@ -1602,7 +1602,7 @@ void rtw_mesh_work_hdl(_workitem *work)
|
||||
_adapter *adapter = container_of(work, _adapter, mesh_work);
|
||||
|
||||
while(adapter->mesh_info.preq_queue_len) {
|
||||
if (rtw_time_after(rtw_get_current_time(),
|
||||
if (rtw_time_after(jiffies,
|
||||
adapter->mesh_info.last_preq + rtw_min_preq_int_jiff(adapter)))
|
||||
/* It will consume preq_queue_len */
|
||||
rtw_mesh_path_start_discovery(adapter);
|
||||
|
@ -61,7 +61,7 @@ static const rtw_rhashtable_params rtw_mesh_rht_params = {
|
||||
static inline bool rtw_mpath_expired(struct rtw_mesh_path *mpath)
|
||||
{
|
||||
return (mpath->flags & RTW_MESH_PATH_ACTIVE) &&
|
||||
rtw_time_after(rtw_get_current_time(), mpath->exp_time) &&
|
||||
rtw_time_after(jiffies, mpath->exp_time) &&
|
||||
!(mpath->flags & RTW_MESH_PATH_FIXED);
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ void rtw_mesh_path_assign_nexthop(struct rtw_mesh_path *mpath, struct sta_info *
|
||||
enter_critical_bh(&mpath->frame_queue.lock);
|
||||
head = &mpath->frame_queue.queue;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
||||
list = get_next(list);
|
||||
memcpy(xframe->attrib.ra, sta->cmn.mac_addr, ETH_ALEN);
|
||||
@ -183,7 +183,7 @@ static void rtw_mesh_path_move_to_queue(struct rtw_mesh_path *gate_mpath,
|
||||
|
||||
head = &failq;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
if (gate_mpath->frame_queue_len >= RTW_MESH_FRAME_QUEUE_LEN) {
|
||||
RTW_MPATH_DBG(FUNC_ADPT_FMT" mpath queue for gate %pM is full!\n"
|
||||
, FUNC_ADPT_ARG(gate_mpath->adapter), gate_mpath->dst);
|
||||
@ -359,8 +359,8 @@ 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 = rtw_get_current_time() +
|
||||
rtw_ms_to_systime(mcfg->path_gate_timeout_factor *
|
||||
mpath->gate_timeout = jiffies +
|
||||
msecs_to_jiffies(mcfg->path_gate_timeout_factor *
|
||||
mpath->gate_ann_int);
|
||||
if (mpath->is_gate) {
|
||||
err = -EEXIST;
|
||||
@ -551,7 +551,7 @@ struct rtw_mesh_path *rtw_mesh_path_new(_adapter *adapter,
|
||||
new_mpath->gate_asked = false;
|
||||
_rtw_init_queue(&new_mpath->frame_queue);
|
||||
new_mpath->frame_queue_len = 0;
|
||||
new_mpath->exp_time = rtw_get_current_time();
|
||||
new_mpath->exp_time = jiffies;
|
||||
_rtw_spinlock_init(&new_mpath->state_lock);
|
||||
rtw_init_timer(&new_mpath->timer, adapter, rtw_mesh_path_timer, new_mpath);
|
||||
|
||||
@ -1047,7 +1047,7 @@ void rtw_mesh_path_flush_pending(struct rtw_mesh_path *mpath)
|
||||
|
||||
head = &tmp;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
||||
list = get_next(list);
|
||||
rtw_list_delete(&xframe->list);
|
||||
@ -1134,21 +1134,21 @@ void rtw_mesh_path_tbl_expire(_adapter *adapter,
|
||||
break;
|
||||
if ((!(mpath->flags & RTW_MESH_PATH_RESOLVING)) &&
|
||||
(!(mpath->flags & RTW_MESH_PATH_FIXED)) &&
|
||||
rtw_time_after(rtw_get_current_time(), mpath->exp_time + RTW_MESH_PATH_EXPIRE))
|
||||
rtw_time_after(jiffies, mpath->exp_time + RTW_MESH_PATH_EXPIRE))
|
||||
__rtw_mesh_path_del(tbl, mpath);
|
||||
|
||||
if (mpath->is_gate && /* need not to deal with non-gate case */
|
||||
rtw_time_after(rtw_get_current_time(), mpath->gate_timeout)) {
|
||||
rtw_time_after(jiffies, mpath->gate_timeout)) {
|
||||
RTW_MPATH_DBG(FUNC_ADPT_FMT"mpath [%pM] expired systime is %lu systime is %lu\n",
|
||||
FUNC_ADPT_ARG(adapter), mpath->dst,
|
||||
mpath->gate_timeout, rtw_get_current_time());
|
||||
mpath->gate_timeout, jiffies);
|
||||
enter_critical_bh(&mpath->state_lock);
|
||||
if (mpath->gate_asked) { /* asked gate before */
|
||||
rtw_mesh_gate_del(tbl, mpath);
|
||||
exit_critical_bh(&mpath->state_lock);
|
||||
} else {
|
||||
mpath->gate_asked = true;
|
||||
mpath->gate_timeout = rtw_get_current_time() + 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",
|
||||
|
179
core/rtw_ap.c
179
core/rtw_ap.c
File diff suppressed because it is too large
Load Diff
@ -205,7 +205,7 @@ static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, enum channel_width bw)
|
||||
/* update attribute */
|
||||
attrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(adapter, attrib);
|
||||
/*attrib->type = WIFI_MGT_TYPE;*/ /* set in update_mgntframe_attrib() */
|
||||
/*attrib->type = IEEE80211_FTYPE_MGMT;*/ /* set in update_mgntframe_attrib() */
|
||||
attrib->subtype = WIFI_ACTION_NOACK;
|
||||
attrib->bwmode = bw;
|
||||
/*attrib->qsel = QSLT_MGNT;*/ /* set in update_mgntframe_attrib() */
|
||||
@ -301,7 +301,7 @@ static u8 _send_vht_ndpa_packet(PADAPTER adapter, u8 *ra, u16 aid, enum channel_
|
||||
/* update attribute */
|
||||
attrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(adapter, attrib);
|
||||
/*pattrib->type = WIFI_MGT_TYPE;*/ /* set in update_mgntframe_attrib() */
|
||||
/*pattrib->type = IEEE80211_FTYPE_MGMT;*/ /* set in update_mgntframe_attrib() */
|
||||
attrib->subtype = WIFI_NDPA;
|
||||
attrib->bwmode = bw;
|
||||
/*attrib->qsel = QSLT_MGNT;*/ /* set in update_mgntframe_attrib() */
|
||||
@ -414,7 +414,7 @@ static u8 _send_vht_mu_ndpa_packet(PADAPTER adapter, enum channel_width bw)
|
||||
/* update attribute */
|
||||
attrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(adapter, attrib);
|
||||
/*attrib->type = WIFI_MGT_TYPE;*/ /* set in update_mgntframe_attrib() */
|
||||
/*attrib->type = IEEE80211_FTYPE_MGMT;*/ /* set in update_mgntframe_attrib() */
|
||||
attrib->subtype = WIFI_NDPA;
|
||||
attrib->bwmode = bw;
|
||||
/*attrib->qsel = QSLT_MGNT;*/ /* set in update_mgntframe_attrib() */
|
||||
@ -507,7 +507,7 @@ static u8 _send_bf_report_poll(PADAPTER adapter, u8 *ra, u8 bFinalPoll)
|
||||
/* update attribute */
|
||||
attrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(adapter, attrib);
|
||||
/*attrib->type = WIFI_MGT_TYPE;*/ /* set in update_mgntframe_attrib() */
|
||||
/*attrib->type = IEEE80211_FTYPE_MGMT;*/ /* set in update_mgntframe_attrib() */
|
||||
attrib->subtype = WIFI_BF_REPORT_POLL;
|
||||
attrib->bwmode = CHANNEL_WIDTH_20;
|
||||
/*attrib->qsel = QSLT_MGNT;*/ /* set in update_mgntframe_attrib() */
|
||||
@ -1709,7 +1709,7 @@ u8 rtw_bf_send_vht_gid_mgnt_packet(PADAPTER adapter, u8 *ra, u8 *gid, u8 *positi
|
||||
update_mgntframe_attrib(adapter, attrib);
|
||||
attrib->rate = MGN_6M;
|
||||
attrib->bwmode = CHANNEL_WIDTH_20;
|
||||
attrib->subtype = WIFI_ACTION;
|
||||
attrib->subtype = IEEE80211_STYPE_ACTION;
|
||||
|
||||
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
@ -1952,7 +1952,7 @@ void rtw_bf_update_traffic(PADAPTER adapter)
|
||||
|
||||
last_timestamp = bfee->tx_timestamp;
|
||||
last_bytes = bfee->tx_bytes;
|
||||
bfee->tx_timestamp = rtw_get_current_time();
|
||||
bfee->tx_timestamp = jiffies;
|
||||
bfee->tx_bytes = sta->sta_stats.tx_bytes;
|
||||
if (last_timestamp) {
|
||||
if (bfee->tx_bytes >= last_bytes)
|
||||
|
@ -569,7 +569,7 @@ u8 init_channel_set(_adapter *padapter, u8 ChannelPlan, RT_CHANNEL_INFO *channel
|
||||
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
for (i = 0; i < chanset_size; i++)
|
||||
channel_set[i].non_ocp_end_time = rtw_get_current_time();
|
||||
channel_set[i].non_ocp_end_time = jiffies;
|
||||
#endif
|
||||
#endif /* CONFIG_IEEE80211_BAND_5GHZ */
|
||||
|
||||
|
@ -187,8 +187,6 @@ static void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
|
||||
|
||||
|
||||
#ifdef CONFIG_EVENT_THREAD_MODE
|
||||
_rtw_free_sema(&(pevtpriv->evt_notify));
|
||||
|
||||
if (pevtpriv->evt_allocated_buf)
|
||||
rtw_mfree(pevtpriv->evt_allocated_buf, MAX_EVTSZ + 4);
|
||||
#endif
|
||||
@ -215,10 +213,6 @@ static void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
|
||||
{
|
||||
|
||||
if (pcmdpriv) {
|
||||
_rtw_free_sema(&(pcmdpriv->cmd_queue_sema));
|
||||
/* _rtw_free_sema(&(pcmdpriv->cmd_done_sema)); */
|
||||
_rtw_free_sema(&(pcmdpriv->start_cmdthread_sema));
|
||||
|
||||
if (pcmdpriv->cmd_allocated_buf)
|
||||
rtw_mfree(pcmdpriv->cmd_allocated_buf, MAX_CMDSZ + CMDBUFF_ALIGN_SZ);
|
||||
|
||||
@ -579,7 +573,7 @@ _next:
|
||||
continue;
|
||||
}
|
||||
|
||||
cmd_start_time = rtw_get_current_time();
|
||||
cmd_start_time = jiffies;
|
||||
pcmdpriv->cmd_issued_cnt++;
|
||||
|
||||
if (pcmd->cmdsz > MAX_CMDSZ) {
|
||||
@ -895,7 +889,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, struct sitesurvey_parm *pparm)
|
||||
if (res == _SUCCESS) {
|
||||
u32 scan_timeout_ms;
|
||||
|
||||
pmlmepriv->scan_start_time = rtw_get_current_time();
|
||||
pmlmepriv->scan_start_time = jiffies;
|
||||
scan_timeout_ms = rtw_scan_timeout_decision(padapter);
|
||||
mlme_set_scan_to_timer(pmlmepriv,scan_timeout_ms);
|
||||
|
||||
@ -1476,7 +1470,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
|
||||
#ifdef CONFIG_80211N_HT
|
||||
phtpriv->ht_option = _FALSE;
|
||||
if (pregistrypriv->ht_enable && is_supported_ht(pregistrypriv->wireless_mode)) {
|
||||
ptmp = rtw_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_, &tmp_len, pnetwork->network.IELength - 12);
|
||||
ptmp = rtw_get_ie(&pnetwork->network.IEs[12], WLAN_EID_HT_CAPABILITY, &tmp_len, pnetwork->network.IELength - 12);
|
||||
if (ptmp && tmp_len > 0) {
|
||||
/* Added by Albert 2010/06/23 */
|
||||
/* For the WEP mode, we will use the bg mode to do the connection to avoid some IOT issue. */
|
||||
@ -3237,8 +3231,8 @@ static void dynamic_update_bcn_check(_adapter *padapter)
|
||||
&& _FALSE == atomic_read(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_HT_CAPABILITY, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_HT_OPERATION, NULL, _TRUE);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
@ -3251,8 +3245,8 @@ static void dynamic_update_bcn_check(_adapter *padapter)
|
||||
&& _FALSE != atomic_read(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_HT_CAPABILITY, NULL, _FALSE);
|
||||
update_beacon(padapter, WLAN_EID_HT_OPERATION, NULL, _TRUE);
|
||||
|
||||
}
|
||||
atomic_set(&pmlmepriv->olbc, _FALSE);
|
||||
@ -4128,7 +4122,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
||||
{
|
||||
struct sta_info *psta_bmc;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
u8 empty = _FALSE;
|
||||
|
||||
psta_bmc = rtw_get_bcmc_stainfo(padapter);
|
||||
@ -4153,7 +4147,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
|
||||
rtw_tim_map_clear(padapter, pstapriv->sta_dz_bitmap, 0);
|
||||
|
||||
if (update_tim == _TRUE)
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "bmc sleepq and HIQ empty");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "bmc sleepq and HIQ empty");
|
||||
} else /* re check again */
|
||||
rtw_chk_hi_queue_cmd(padapter);
|
||||
|
||||
@ -5233,7 +5227,7 @@ void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
|
||||
phead = &st_ctl->tracker_q.queue;
|
||||
plist = get_next(phead);
|
||||
pnext = get_next(plist);
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = pnext;
|
||||
pnext = get_next(pnext);
|
||||
@ -5269,7 +5263,7 @@ void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
|
||||
_exit_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
|
||||
plist = get_next(&dlist);
|
||||
while (rtw_end_of_queue_search(&dlist, plist) == _FALSE) {
|
||||
while (&dlist != plist) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = get_next(plist);
|
||||
rtw_mfree((u8 *)st, sizeof(struct session_tracker));
|
||||
@ -5300,7 +5294,7 @@ void session_tracker_chk_for_adapter(_adapter *adapter)
|
||||
phead = &(stapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
|
||||
@ -5358,7 +5352,7 @@ void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
|
||||
|
||||
phead = &st_ctl->tracker_q.queue;
|
||||
plist = get_next(phead);
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
|
||||
if (st->local_naddr == local_naddr
|
||||
@ -5370,7 +5364,7 @@ void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
|
||||
plist = get_next(plist);
|
||||
}
|
||||
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
st = NULL;
|
||||
|
||||
switch (cmd) {
|
||||
@ -5402,7 +5396,7 @@ unlock:
|
||||
st->local_port = local_port;
|
||||
st->remote_naddr = remote_naddr;
|
||||
st->remote_port = remote_port;
|
||||
st->set_time = rtw_get_current_time();
|
||||
st->set_time = jiffies;
|
||||
st->status = ST_STATUS_CHECK;
|
||||
|
||||
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
@ -5751,7 +5745,7 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status)
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
goto createbss_cmd_fail;
|
||||
}
|
||||
pwlan->last_scanned = rtw_get_current_time();
|
||||
pwlan->last_scanned = jiffies;
|
||||
} else
|
||||
rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
|
||||
|
||||
|
@ -842,7 +842,7 @@ int proc_get_rx_stat(struct seq_file *m, void *v)
|
||||
for (i = 0; i < NUM_STA; i++) {
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
pstats = &psta->sta_stats;
|
||||
@ -894,7 +894,7 @@ int proc_get_tx_stat(struct seq_file *m, void *v)
|
||||
for (i = 0; i < NUM_STA; i++) {
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE)
|
||||
@ -1422,7 +1422,7 @@ int proc_get_survey_info(struct seq_file *m, void *v)
|
||||
|
||||
RTW_PRINT_SEL(m, "%5s %-17s %3s %-3s %-4s %-4s %5s %32s %32s\n", "index", "bssid", "ch", "RSSI", "SdBm", "Noise", "age", "flag", ssid_title_str);
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -1817,7 +1817,7 @@ ssize_t proc_set_rate_ctl(struct file *file, const char __user *buffer, size_t c
|
||||
for (i = 0; i < NUM_STA; i++) {
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE)
|
||||
@ -2132,7 +2132,7 @@ static u8 sta_linking_test_force_fail = 0;
|
||||
|
||||
void rtw_sta_linking_test_set_start(void)
|
||||
{
|
||||
sta_linking_test_start_time = rtw_get_current_time();
|
||||
sta_linking_test_start_time = jiffies;
|
||||
}
|
||||
|
||||
bool rtw_sta_linking_test_wait_done(void)
|
||||
@ -3662,7 +3662,7 @@ int proc_get_all_sta_info(struct seq_file *m, void *v)
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -5283,7 +5283,7 @@ static int proc_tdls_display_tdls_sta_info(struct seq_file *m)
|
||||
for (i = 0; i < NUM_STA; i++) {
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
if (psta->tdls_sta_state != TDLS_STATE_NONE) {
|
||||
@ -5722,7 +5722,7 @@ ssize_t proc_set_tx_sa_query(struct file *file, const char __user *buffer, size_
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);
|
||||
@ -5811,7 +5811,7 @@ ssize_t proc_set_tx_deauth(struct file *file, const char __user *buffer, size_t
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);
|
||||
|
@ -530,7 +530,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
||||
ie += 2;
|
||||
|
||||
/* SSID */
|
||||
ie = rtw_set_ie(ie, _SSID_IE_, pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_SSID, pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);
|
||||
|
||||
/* supported rates */
|
||||
if (pregistrypriv->wireless_mode == WIRELESS_11ABGN) {
|
||||
@ -551,21 +551,21 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
||||
rateLen = rtw_get_rateset_len(pdev_network->SupportedRates);
|
||||
|
||||
if (rateLen > 8) {
|
||||
ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, 8, pdev_network->SupportedRates, &sz);
|
||||
/* ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz); */
|
||||
ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, 8, pdev_network->SupportedRates, &sz);
|
||||
/* ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz); */
|
||||
} else
|
||||
ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, rateLen, pdev_network->SupportedRates, &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_SUPP_RATES, rateLen, pdev_network->SupportedRates, &sz);
|
||||
|
||||
/* DS parameter set */
|
||||
ie = rtw_set_ie(ie, _DSSET_IE_, 1, (u8 *)&(pdev_network->Configuration.DSConfig), &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_DS_PARAMS, 1, (u8 *)&(pdev_network->Configuration.DSConfig), &sz);
|
||||
|
||||
|
||||
/* IBSS Parameter Set */
|
||||
|
||||
ie = rtw_set_ie(ie, _IBSS_PARA_IE_, 2, (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_IBSS_PARAMS, 2, (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
|
||||
|
||||
if (rateLen > 8)
|
||||
ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz);
|
||||
ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz);
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
/* HT Cap. */
|
||||
@ -588,7 +588,6 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
||||
{
|
||||
int len;
|
||||
u16 val16;
|
||||
unsigned char wpa_oui_type[] = {0x00, 0x50, 0xf2, 0x01};
|
||||
u8 *pbuf = pie;
|
||||
int limit_new = limit;
|
||||
|
||||
@ -598,7 +597,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
||||
if (pbuf) {
|
||||
|
||||
/* check if oui matches... */
|
||||
if (_rtw_memcmp((pbuf + 2), wpa_oui_type, sizeof(wpa_oui_type)) == _FALSE)
|
||||
if (_rtw_memcmp((pbuf + 2), RTW_WPA_OUI_TYPE, sizeof(RTW_WPA_OUI_TYPE)) == _FALSE)
|
||||
|
||||
goto check_next_ie;
|
||||
|
||||
@ -943,8 +942,8 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len)
|
||||
while (cnt < in_len) {
|
||||
authmode = in_ie[cnt];
|
||||
|
||||
/* if(authmode==_WAPI_IE_) */
|
||||
if (authmode == _WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE ||
|
||||
/* if(authmode==WLAN_EID_BSS_AC_ACCESS_DELAY) */
|
||||
if (authmode == WLAN_EID_BSS_AC_ACCESS_DELAY && (_rtw_memcmp(&in_ie[cnt + 6], wapi_oui1, 4) == _TRUE ||
|
||||
_rtw_memcmp(&in_ie[cnt + 6], wapi_oui2, 4) == _TRUE)) {
|
||||
if (wapi_ie)
|
||||
memcpy(wapi_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||
@ -1125,7 +1124,7 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at
|
||||
if (len_attr)
|
||||
*len_attr = 0;
|
||||
|
||||
if ((wps_ie[0] != _VENDOR_SPECIFIC_IE_) ||
|
||||
if ((wps_ie[0] != WLAN_EID_VENDOR_SPECIFIC) ||
|
||||
(_rtw_memcmp(wps_ie + 2, wps_oui , 4) != _TRUE))
|
||||
return attr_ptr;
|
||||
|
||||
@ -1211,7 +1210,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
||||
|
||||
oui = RTW_GET_BE24(pos);
|
||||
switch (oui) {
|
||||
case OUI_MICROSOFT:
|
||||
case WLAN_OUI_MICROSOFT:
|
||||
/* Microsoft/Wi-Fi information elements are further typed and
|
||||
* subtyped */
|
||||
switch (pos[3]) {
|
||||
@ -1414,7 +1413,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
||||
elems->vht_op_mode_notify = pos;
|
||||
elems->vht_op_mode_notify_len = elen;
|
||||
break;
|
||||
case _EID_RRM_EN_CAP_IE_:
|
||||
case WLAN_EID_RRM_ENABLED_CAPABILITIES :
|
||||
elems->rm_en_cap = pos;
|
||||
elems->rm_en_cap_len = elen;
|
||||
break;
|
||||
@ -1768,7 +1767,7 @@ void rtw_ies_get_chbw(u8 *ies, int ies_len, u8 *ch, u8 *bw, u8 *offset, u8 ht, u
|
||||
*bw = CHANNEL_WIDTH_20;
|
||||
*offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
|
||||
p = rtw_get_ie(ies, _DSSET_IE_, &ie_len, ies_len);
|
||||
p = rtw_get_ie(ies, WLAN_EID_DS_PARAMS, &ie_len, ies_len);
|
||||
if (p && ie_len > 0)
|
||||
*ch = *(p + 2);
|
||||
|
||||
@ -1945,7 +1944,7 @@ u32 rtw_get_p2p_merged_ies_len(u8 *in_ie, u32 in_len)
|
||||
while (i < in_len) {
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(in_ie + i);
|
||||
|
||||
if (pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||
if (pIE->ElementID == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||
len += pIE->Length - 4; /* 4 is P2P OUI length, don't count it in this loop */
|
||||
}
|
||||
|
||||
@ -1979,7 +1978,7 @@ int rtw_p2p_merge_ies(u8 *in_ie, u32 in_len, u8 *merge_ie)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(in_ie + i);
|
||||
|
||||
/* Take out the rest of P2P OUIs */
|
||||
if (pIE->ElementID == _VENDOR_SPECIFIC_IE_ && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||
if (pIE->ElementID == WLAN_EID_VENDOR_SPECIFIC && _rtw_memcmp(pIE->data, OUI, 4)) {
|
||||
memcpy(merge_ie, pIE->data + 4, pIE->Length - 4);
|
||||
len += pIE->Length - 4;
|
||||
merge_ie += pIE->Length - 4;
|
||||
|
@ -733,7 +733,7 @@ u16 rtw_get_cur_max_rate(_adapter *adapter)
|
||||
max_rate = rtw_mcs_rate(rf_type
|
||||
, (psta->cmn.bw_mode == CHANNEL_WIDTH_40) ? 1 : 0
|
||||
, short_GI
|
||||
, psta->htpriv.ht_cap.supp_mcs_set
|
||||
, psta->htpriv.ht_cap.mcs.rx_mask
|
||||
);
|
||||
}
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
|
@ -46,7 +46,7 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(ADAPTER *adapter)
|
||||
pattrib = &xmit_frame->attrib;
|
||||
update_mgntframe_attrib(adapter, pattrib);
|
||||
pattrib->qsel = QSLT_BEACON;/* Beacon */
|
||||
pattrib->subtype = WIFI_BEACON;
|
||||
pattrib->subtype = IEEE80211_STYPE_BEACON;
|
||||
pattrib->pktlen = pattrib->last_txcmdsz = 0;
|
||||
|
||||
#else
|
||||
|
@ -1451,7 +1451,7 @@ void rtw_mi_buddy_clone_bcmc_packet(_adapter *padapter, union recv_frame *precvf
|
||||
continue;
|
||||
if (rtw_is_adapter_up(iface) == _FALSE || iface->registered == 0)
|
||||
continue;
|
||||
if (type == WIFI_DATA_TYPE && !adapter_allow_bmc_data_rx(iface))
|
||||
if (type == IEEE80211_FTYPE_DATA && !adapter_allow_bmc_data_rx(iface))
|
||||
continue;
|
||||
|
||||
pcloneframe = rtw_alloc_recvframe(pfree_recv_queue);
|
||||
|
@ -129,7 +129,7 @@ sint _rtw_init_mlme_priv(_adapter *padapter)
|
||||
pmlmepriv->roam_scan_int = RTW_ROAM_SCAN_INTERVAL;
|
||||
pmlmepriv->roam_rssi_threshold = RTW_ROAM_RSSI_THRESHOLD;
|
||||
pmlmepriv->need_to_roam = _FALSE;
|
||||
pmlmepriv->last_roaming = rtw_get_current_time();
|
||||
pmlmepriv->last_roaming = jiffies;
|
||||
#endif /* CONFIG_LAYER2_ROAMING */
|
||||
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
@ -380,7 +380,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv) /* (_queue
|
||||
|
||||
pnetwork->network_type = 0;
|
||||
pnetwork->fixed = _FALSE;
|
||||
pnetwork->last_scanned = rtw_get_current_time();
|
||||
pnetwork->last_scanned = jiffies;
|
||||
#if defined(CONFIG_RTW_MESH) && CONFIG_RTW_MESH_ACNODE_PREVENT
|
||||
pnetwork->acnode_stime = 0;
|
||||
pnetwork->acnode_notify_etime = 0;
|
||||
@ -480,7 +480,7 @@ void _rtw_free_network_queue(_adapter *padapter, u8 isfreeall)
|
||||
phead = get_list_head(scanned_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
|
||||
@ -777,7 +777,7 @@ struct wlan_network *rtw_get_oldest_wlan_network(_queue *scanned_queue)
|
||||
|
||||
while (1) {
|
||||
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pwlan = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -962,7 +962,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
|
||||
#endif
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -1033,10 +1033,10 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
|
||||
rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL);
|
||||
#endif
|
||||
memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
|
||||
/* pnetwork->last_scanned = rtw_get_current_time(); */
|
||||
/* pnetwork->last_scanned = jiffies; */
|
||||
/* variable initialize */
|
||||
pnetwork->fixed = _FALSE;
|
||||
pnetwork->last_scanned = rtw_get_current_time();
|
||||
pnetwork->last_scanned = jiffies;
|
||||
#if defined(CONFIG_RTW_MESH) && CONFIG_RTW_MESH_ACNODE_PREVENT
|
||||
pnetwork->acnode_stime = 0;
|
||||
pnetwork->acnode_notify_etime = 0;
|
||||
@ -1063,7 +1063,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
|
||||
#endif
|
||||
memcpy(&(pnetwork->network), target, bssid_ex_sz);
|
||||
|
||||
pnetwork->last_scanned = rtw_get_current_time();
|
||||
pnetwork->last_scanned = jiffies;
|
||||
|
||||
/* bss info not receving from the right channel */
|
||||
if (pnetwork->network.PhyInfo.SignalQuality == 101)
|
||||
@ -1081,7 +1081,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
|
||||
systime last_scanned = pnetwork->last_scanned;
|
||||
#endif
|
||||
|
||||
pnetwork->last_scanned = rtw_get_current_time();
|
||||
pnetwork->last_scanned = jiffies;
|
||||
|
||||
/* target.Reserved[0]==BSS_TYPE_BCN, means that scanned network is a bcn frame. */
|
||||
if ((pnetwork->network.IELength > target->IELength) && (target->Reserved[0] == BSS_TYPE_BCN))
|
||||
@ -1190,7 +1190,7 @@ int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork)
|
||||
bselected = _FALSE;
|
||||
|
||||
if (psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPA2PSK) {
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, WLAN_EID_RSN, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
|
||||
if (p && ie_len > 0)
|
||||
bselected = _TRUE;
|
||||
else
|
||||
@ -1877,7 +1877,7 @@ static u32 _rtw_wait_scan_done(_adapter *adapter, u8 abort, u32 timeout_ms)
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
||||
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
|
||||
pmlmeext->scan_abort = abort;
|
||||
|
||||
@ -1945,7 +1945,7 @@ static u32 _rtw_wait_join_done(_adapter *adapter, u8 abort, u32 timeout_ms)
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
||||
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
|
||||
pmlmeext->join_abort = abort;
|
||||
if (abort)
|
||||
@ -3661,7 +3661,7 @@ int rtw_select_roaming_candidate(struct mlme_priv *mlme)
|
||||
|
||||
mlme->pscanned = get_next(phead);
|
||||
|
||||
while (!rtw_end_of_queue_search(phead, mlme->pscanned)) {
|
||||
while (phead != mlme->pscanned) {
|
||||
|
||||
pnetwork = LIST_CONTAINOR(mlme->pscanned, struct wlan_network, list);
|
||||
if (pnetwork == NULL) {
|
||||
@ -3855,7 +3855,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
|
||||
phead = get_list_head(queue);
|
||||
pmlmepriv->pscanned = get_next(phead);
|
||||
|
||||
while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) {
|
||||
while (phead != pmlmepriv->pscanned) {
|
||||
|
||||
pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list);
|
||||
if (pnetwork == NULL) {
|
||||
@ -4606,7 +4606,7 @@ void rtw_build_wmm_ie_ht(_adapter *padapter, u8 *out_ie, uint *pout_len)
|
||||
|
||||
if (padapter->mlmepriv.qospriv.qos_option == 0) {
|
||||
out_len = *pout_len;
|
||||
pframe = rtw_set_ie(out_ie + out_len, _VENDOR_SPECIFIC_IE_,
|
||||
pframe = rtw_set_ie(out_ie + out_len, WLAN_EID_VENDOR_SPECIFIC,
|
||||
_WMM_IE_Length_, WMM_IE, pout_len);
|
||||
|
||||
padapter->mlmepriv.qospriv.qos_option = 1;
|
||||
@ -4618,10 +4618,10 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||
{
|
||||
u32 ielen, out_len;
|
||||
u32 rx_packet_offset, max_recvbuf_sz;
|
||||
HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor;
|
||||
HT_CAP_AMPDU_DENSITY best_ampdu_density;
|
||||
enum ieee80211_max_ampdu_length_exp max_rx_ampdu_factor;
|
||||
enum ieee80211_min_mpdu_spacing best_ampdu_density;
|
||||
unsigned char *p, *pframe;
|
||||
struct rtw_ieee80211_ht_cap ht_capie;
|
||||
struct ieee80211_ht_cap ht_capie;
|
||||
u8 cbw40_enable = 0, rf_type = 0, rf_num = 0, rx_stbc_nss = 0, rx_nss = 0;
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
@ -4637,7 +4637,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||
|
||||
out_len = *pout_len;
|
||||
|
||||
memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
||||
memset(&ht_capie, 0, sizeof(struct ieee80211_ht_cap));
|
||||
|
||||
ht_capie.cap_info = IEEE80211_HT_CAP_DSSSCCK40;
|
||||
|
||||
@ -4741,7 +4741,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||
}
|
||||
|
||||
/* fill default supported_mcs_set */
|
||||
memcpy(ht_capie.supp_mcs_set, pmlmeext->default_supported_mcs_set, 16);
|
||||
memcpy(ht_capie.mcs.rx_mask, pmlmeext->default_supported_mcs_set, 16);
|
||||
|
||||
/* update default supported_mcs_set */
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||
@ -4749,21 +4749,21 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||
|
||||
switch (rx_nss) {
|
||||
case 1:
|
||||
set_mcs_rate_by_mask(ht_capie.supp_mcs_set, MCS_RATE_1R);
|
||||
set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, MCS_RATE_1R);
|
||||
break;
|
||||
case 2:
|
||||
#ifdef CONFIG_DISABLE_MCS13TO15
|
||||
if (cbw40_enable && pregistrypriv->wifi_spec != 1)
|
||||
set_mcs_rate_by_mask(ht_capie.supp_mcs_set, MCS_RATE_2R_13TO15_OFF);
|
||||
set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, MCS_RATE_2R_13TO15_OFF);
|
||||
else
|
||||
#endif
|
||||
set_mcs_rate_by_mask(ht_capie.supp_mcs_set, MCS_RATE_2R);
|
||||
set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, MCS_RATE_2R);
|
||||
break;
|
||||
case 3:
|
||||
set_mcs_rate_by_mask(ht_capie.supp_mcs_set, MCS_RATE_3R);
|
||||
set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, MCS_RATE_3R);
|
||||
break;
|
||||
case 4:
|
||||
set_mcs_rate_by_mask(ht_capie.supp_mcs_set, MCS_RATE_4R);
|
||||
set_mcs_rate_by_mask(ht_capie.mcs.rx_mask, MCS_RATE_4R);
|
||||
break;
|
||||
default:
|
||||
RTW_WARN("rf_type:%d or rx_nss:%u is not expected\n", rf_type, hal_spec->rx_nss_num);
|
||||
@ -4791,7 +4791,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||
*/
|
||||
|
||||
if (padapter->driver_rx_ampdu_factor != 0xFF)
|
||||
max_rx_ampdu_factor = (HT_CAP_AMPDU_FACTOR)padapter->driver_rx_ampdu_factor;
|
||||
max_rx_ampdu_factor = (enum ieee80211_max_ampdu_length_exp)padapter->driver_rx_ampdu_factor;
|
||||
else
|
||||
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
|
||||
|
||||
@ -4846,16 +4846,16 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||
}
|
||||
#endif/*CONFIG_BEAMFORMING*/
|
||||
|
||||
pframe = rtw_set_ie(out_ie + out_len, _HT_CAPABILITY_IE_,
|
||||
sizeof(struct rtw_ieee80211_ht_cap), (unsigned char *)&ht_capie, pout_len);
|
||||
pframe = rtw_set_ie(out_ie + out_len, WLAN_EID_HT_CAPABILITY,
|
||||
sizeof(struct ieee80211_ht_cap), (unsigned char *)&ht_capie, pout_len);
|
||||
|
||||
phtpriv->ht_option = _TRUE;
|
||||
|
||||
if (in_ie != NULL) {
|
||||
p = rtw_get_ie(in_ie, _HT_ADD_INFO_IE_, &ielen, in_len);
|
||||
p = rtw_get_ie(in_ie, WLAN_EID_HT_OPERATION, &ielen, in_len);
|
||||
if (p && (ielen == sizeof(struct ieee80211_ht_addt_info))) {
|
||||
out_len = *pout_len;
|
||||
pframe = rtw_set_ie(out_ie + out_len, _HT_ADD_INFO_IE_, ielen, p + 2 , pout_len);
|
||||
pframe = rtw_set_ie(out_ie + out_len, WLAN_EID_HT_OPERATION, ielen, p + 2 , pout_len);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4869,7 +4869,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel)
|
||||
u8 *p, max_ampdu_sz;
|
||||
int len;
|
||||
/* struct sta_info *bmc_sta, *psta; */
|
||||
struct rtw_ieee80211_ht_cap *pht_capie;
|
||||
struct ieee80211_ht_cap *pht_capie;
|
||||
struct ieee80211_ht_addt_info *pht_addtinfo;
|
||||
/* struct recv_reorder_ctrl *preorder_ctrl; */
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
@ -4903,9 +4903,9 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel)
|
||||
|
||||
/* check Max Rx A-MPDU Size */
|
||||
len = 0;
|
||||
p = rtw_get_ie(pie + sizeof(NDIS_802_11_FIXED_IEs), _HT_CAPABILITY_IE_, &len, ie_len - sizeof(NDIS_802_11_FIXED_IEs));
|
||||
p = rtw_get_ie(pie + sizeof(NDIS_802_11_FIXED_IEs), WLAN_EID_HT_CAPABILITY, &len, ie_len - sizeof(NDIS_802_11_FIXED_IEs));
|
||||
if (p && len > 0) {
|
||||
pht_capie = (struct rtw_ieee80211_ht_cap *)(p + 2);
|
||||
pht_capie = (struct ieee80211_ht_cap *)(p + 2);
|
||||
max_ampdu_sz = (pht_capie->ampdu_params_info & IEEE80211_HT_AMPDU_PARM_FACTOR);
|
||||
max_ampdu_sz = 1 << (max_ampdu_sz + 3); /* max_ampdu_sz (kbytes); */
|
||||
|
||||
@ -4916,7 +4916,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len, u8 channel)
|
||||
|
||||
|
||||
len = 0;
|
||||
p = rtw_get_ie(pie + sizeof(NDIS_802_11_FIXED_IEs), _HT_ADD_INFO_IE_, &len, ie_len - sizeof(NDIS_802_11_FIXED_IEs));
|
||||
p = rtw_get_ie(pie + sizeof(NDIS_802_11_FIXED_IEs), WLAN_EID_HT_OPERATION, &len, ie_len - sizeof(NDIS_802_11_FIXED_IEs));
|
||||
if (p && len > 0) {
|
||||
pht_addtinfo = (struct ieee80211_ht_addt_info *)(p + 2);
|
||||
/* todo: */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -189,7 +189,7 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter)
|
||||
pattrib->ack_policy = 0;
|
||||
/* pattrib->pkt_hdrlen = ETH_HLEN; */
|
||||
pattrib->hdrlen = WLAN_HDR_A3_LEN;
|
||||
pattrib->subtype = WIFI_DATA;
|
||||
pattrib->subtype = (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA);
|
||||
pattrib->priority = 0;
|
||||
pattrib->qsel = pattrib->priority;
|
||||
/* do_queue_select(padapter, pattrib); */
|
||||
@ -634,7 +634,6 @@ MPT_DeInitAdapter(
|
||||
|
||||
pMptCtx->bMptDrvUnload = _TRUE;
|
||||
#if defined(CONFIG_RTL8723B)
|
||||
_rtw_free_sema(&(pMptCtx->MPh2c_Sema));
|
||||
_cancel_timer_ex(&pMptCtx->MPh2c_timeout_timer);
|
||||
#endif
|
||||
#if defined(CONFIG_RTL8723B)
|
||||
|
@ -2299,7 +2299,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
||||
|
||||
fctrl = &(pwlanhdr->frame_ctl);
|
||||
*(fctrl) = 0;
|
||||
set_frame_sub_type(pframe, WIFI_DATA);
|
||||
set_frame_sub_type(pframe, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA));
|
||||
|
||||
memcpy(pwlanhdr->addr1, pethhdr->h_dest, ETH_ALEN);
|
||||
memcpy(pwlanhdr->addr2, pethhdr->h_source, ETH_ALEN);
|
||||
|
@ -64,7 +64,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
plist = get_next(phead);
|
||||
|
||||
/* look up sta asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -177,7 +177,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -237,7 +237,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -261,7 +261,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
||||
/* P2P_ATTR_STATUS */
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_STATUS, 1, &status);
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, p2pie, &pattrib->pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, p2pie, &pattrib->pktlen);
|
||||
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
|
||||
@ -314,7 +314,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -361,7 +361,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
|
||||
RTW_PUT_BE16(wpsie + wpsielen, config_method);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_provdisc_resp_wfd_ie(pwdinfo, pframe);
|
||||
@ -418,7 +418,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -451,7 +451,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
||||
|
||||
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, p2pie, &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, p2pie, &(pattrib->pktlen));
|
||||
|
||||
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
@ -510,7 +510,7 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
/* go_add_noa_attr(pwdinfo); */
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
|
||||
return len;
|
||||
@ -626,7 +626,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -738,7 +738,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -929,7 +929,7 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
||||
#endif /* CONFIG_TDLS*/
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1035,7 +1035,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1134,7 +1134,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1233,7 +1233,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1333,7 +1333,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1433,7 +1433,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1546,7 +1546,7 @@ u32 build_invitation_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
||||
}
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1659,7 +1659,7 @@ u32 build_invitation_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
|
||||
}
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1759,7 +1759,7 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -1858,7 +1858,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
wfdie[wfdielen++] = 0;
|
||||
wfdie[wfdielen++] = 0;
|
||||
|
||||
rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
exit:
|
||||
return len;
|
||||
@ -2071,7 +2071,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||
p2pielen += go_add_group_info_attr(pwdinfo, p2pie + p2pielen);
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
|
||||
return len;
|
||||
@ -2200,7 +2200,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
|
||||
|
||||
}
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
|
||||
return len;
|
||||
@ -2235,7 +2235,7 @@ u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status
|
||||
/* Value: */
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
pbuf = rtw_set_ie(pbuf, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
return len;
|
||||
|
||||
@ -2256,7 +2256,7 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
u32 p2pielen = 0;
|
||||
int ssid_len = 0, rate_cnt = 0;
|
||||
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, _SUPPORTEDRATES_IE_, (int *)&rate_cnt,
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, WLAN_EID_SUPP_RATES, (int *)&rate_cnt,
|
||||
len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
|
||||
|
||||
if (rate_cnt <= 4) {
|
||||
@ -2289,7 +2289,7 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
/* 5. Requested Device Type in WSC IE. (Todo) */
|
||||
/* 6. Device ID attribute in P2P IE. (Todo) */
|
||||
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, _SSID_IE_, (int *)&ssid_len,
|
||||
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, WLAN_EID_SSID, (int *)&ssid_len,
|
||||
len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_);
|
||||
|
||||
ssid_len &= 0xff; /* Just last 1 byte is valid for ssid len of the probe request */
|
||||
@ -2331,9 +2331,9 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
||||
return P2P_STATUS_FAIL_REQUEST_UNABLE;
|
||||
|
||||
frame_type = get_frame_sub_type(pframe);
|
||||
if (frame_type == WIFI_ASSOCREQ)
|
||||
if (frame_type == IEEE80211_STYPE_ASSOC_REQ)
|
||||
ie_offset = _ASOCREQ_IE_OFFSET_;
|
||||
else /* WIFI_REASSOCREQ */
|
||||
else /* IEEE80211_STYPE_REASSOC_REQ */
|
||||
ie_offset = _REASOCREQ_IE_OFFSET_;
|
||||
|
||||
ies = pframe + WLAN_HDR_A3_LEN + ie_offset;
|
||||
@ -2459,7 +2459,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
||||
plist = get_next(phead);
|
||||
|
||||
/* look up sta asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -5123,7 +5123,7 @@ void init_wifidirect_info(_adapter *padapter, enum P2P_ROLE role)
|
||||
|
||||
rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
|
||||
|
||||
pwdinfo->listen_dwell = (u8)((rtw_get_current_time() % 3) + 1);
|
||||
pwdinfo->listen_dwell = (u8)((jiffies % 3) + 1);
|
||||
/* RTW_INFO( "[%s] listen_dwell time is %d00ms\n", __FUNCTION__, pwdinfo->listen_dwell ); */
|
||||
|
||||
memset(&pwdinfo->tx_prov_disc_info, 0x00, sizeof(struct tx_provdisc_req_info));
|
||||
|
@ -95,7 +95,7 @@ void _ips_enter(_adapter *padapter)
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
|
||||
#ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS
|
||||
pwrpriv->pwr_saving_start_time = rtw_get_current_time();
|
||||
pwrpriv->pwr_saving_start_time = jiffies;
|
||||
#endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */
|
||||
|
||||
rtw_ips_pwr_down(padapter);
|
||||
@ -212,7 +212,7 @@ bool rtw_pwr_unassociated_idle(_adapter *adapter)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (rtw_time_after(adapter_to_pwrctl(adapter)->ips_deny_time, rtw_get_current_time())) {
|
||||
if (rtw_time_after(adapter_to_pwrctl(adapter)->ips_deny_time, jiffies)) {
|
||||
/* RTW_INFO("%s ips_deny_time\n", __func__); */
|
||||
goto exit;
|
||||
}
|
||||
@ -480,7 +480,7 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
|
||||
xmit_cnt += tx_packets;
|
||||
|
||||
if (start_time == 0)
|
||||
start_time = rtw_get_current_time();
|
||||
start_time = jiffies;
|
||||
|
||||
if (rtw_get_passing_time_ms(start_time) > 2000) { /* 2 sec == watch dog timer */
|
||||
if (xmit_cnt > 8) {
|
||||
@ -495,7 +495,7 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
|
||||
}
|
||||
}
|
||||
|
||||
start_time = rtw_get_current_time();
|
||||
start_time = jiffies;
|
||||
xmit_cnt = 0;
|
||||
}
|
||||
|
||||
@ -538,7 +538,7 @@ u8 rtw_cpwm_polling(_adapter *adapter, u8 rpwm, u8 cpwm_orig)
|
||||
pwrpriv->rpwm_retry = 0;
|
||||
|
||||
do {
|
||||
start_time = rtw_get_current_time();
|
||||
start_time = jiffies;
|
||||
do {
|
||||
msleep(1);
|
||||
rtw_hal_get_hwreg(adapter, HW_VAR_CPWM, &cpwm_now);
|
||||
@ -706,7 +706,7 @@ u8 PS_RDY_CHECK(_adapter *padapter)
|
||||
return _FALSE;
|
||||
#endif
|
||||
|
||||
if (rtw_time_after(pwrpriv->lps_deny_time, rtw_get_current_time()))
|
||||
if (rtw_time_after(pwrpriv->lps_deny_time, jiffies))
|
||||
return _FALSE;
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_SITE_MONITOR)
|
||||
@ -829,7 +829,7 @@ void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable)
|
||||
adapter_to_pwrctl(padapter)->tog = (val8 + 0x80) & 0x80;
|
||||
|
||||
/* do polling cpwm */
|
||||
start_time = rtw_get_current_time();
|
||||
start_time = jiffies;
|
||||
do {
|
||||
|
||||
mdelay(1);
|
||||
@ -951,7 +951,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)
|
||||
@ -972,7 +972,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
||||
u32 delay_ms;
|
||||
u8 val8;
|
||||
delay_ms = 20;
|
||||
start_time = rtw_get_current_time();
|
||||
start_time = jiffies;
|
||||
do {
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_SYS_CLKR, &val8);
|
||||
if (!(val8 & BIT(4))) { /* 0x08 bit4 =1 --> in 32k, bit4 = 0 --> leave 32k */
|
||||
@ -1049,7 +1049,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)
|
||||
@ -1197,7 +1197,7 @@ void LPS_Enter(PADAPTER padapter, const char *msg)
|
||||
pwrpriv->bpower_saving = _TRUE;
|
||||
|
||||
#ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS
|
||||
pwrpriv->pwr_saving_start_time = rtw_get_current_time();
|
||||
pwrpriv->pwr_saving_start_time = jiffies;
|
||||
#endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */
|
||||
|
||||
rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, padapter->registrypriv.smart_ps, 0, buf);
|
||||
@ -1433,7 +1433,7 @@ void LPS_Leave_check(
|
||||
pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
bReady = _FALSE;
|
||||
start_time = rtw_get_current_time();
|
||||
start_time = jiffies;
|
||||
|
||||
yield();
|
||||
|
||||
@ -2128,7 +2128,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
||||
|
||||
pwrctrlpriv->ips_mode = padapter->registrypriv.ips_mode;
|
||||
pwrctrlpriv->ips_mode_req = padapter->registrypriv.ips_mode;
|
||||
pwrctrlpriv->ips_deny_time = rtw_get_current_time();
|
||||
pwrctrlpriv->ips_deny_time = jiffies;
|
||||
pwrctrlpriv->lps_level = padapter->registrypriv.lps_level;
|
||||
|
||||
pwrctrlpriv->pwr_state_check_interval = RTW_PWR_STATE_CHK_INTERVAL;
|
||||
@ -2159,7 +2159,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? _TRUE : _FALSE;
|
||||
|
||||
pwrctrlpriv->bFwCurrentInPSMode = _FALSE;
|
||||
pwrctrlpriv->lps_deny_time = rtw_get_current_time();
|
||||
pwrctrlpriv->lps_deny_time = jiffies;
|
||||
|
||||
pwrctrlpriv->rpwm = 0;
|
||||
pwrctrlpriv->cpwm = PS_STATE_S4;
|
||||
@ -2475,7 +2475,7 @@ u8 rtw_interface_ps_func(_adapter *padapter, HAL_INTF_PS_FUNC efunc_id, u8 *val)
|
||||
inline void rtw_set_ips_deny(_adapter *padapter, u32 ms)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ms);
|
||||
pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ms);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2491,7 +2491,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
||||
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
|
||||
struct mlme_priv *pmlmepriv;
|
||||
int ret = _SUCCESS;
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
|
||||
/*RTW_INFO(FUNC_ADPT_FMT "===>\n", FUNC_ADPT_ARG(padapter));*/
|
||||
/* for LPS */
|
||||
@ -2501,8 +2501,8 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
||||
padapter = GET_PRIMARY_ADAPTER(padapter);
|
||||
pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms), pwrpriv->ips_deny_time))
|
||||
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms);
|
||||
if (rtw_time_after(jiffies + msecs_to_jiffies(ips_deffer_ms), pwrpriv->ips_deny_time))
|
||||
pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
|
||||
|
||||
|
||||
if (pwrpriv->ps_processing) {
|
||||
@ -2627,8 +2627,8 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
||||
}
|
||||
|
||||
exit:
|
||||
if (rtw_time_after(rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms), pwrpriv->ips_deny_time))
|
||||
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms);
|
||||
if (rtw_time_after(jiffies + msecs_to_jiffies(ips_deffer_ms), pwrpriv->ips_deny_time))
|
||||
pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
|
||||
/*RTW_INFO(FUNC_ADPT_FMT "<===\n", FUNC_ADPT_ARG(padapter));*/
|
||||
return ret;
|
||||
|
||||
@ -2675,7 +2675,7 @@ int rtw_pm_set_lps_level(_adapter *padapter, u8 level)
|
||||
inline void rtw_set_lps_deny(_adapter *adapter, u32 ms)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
|
||||
pwrpriv->lps_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ms);
|
||||
pwrpriv->lps_deny_time = jiffies + msecs_to_jiffies(ms);
|
||||
}
|
||||
|
||||
int rtw_pm_set_ips(_adapter *padapter, u8 mode)
|
||||
|
106
core/rtw_recv.c
106
core/rtw_recv.c
@ -158,14 +158,6 @@ exit:
|
||||
|
||||
}
|
||||
|
||||
void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv);
|
||||
void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv)
|
||||
{
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
_rtw_free_sema(&precvpriv->recv_sema);
|
||||
#endif
|
||||
}
|
||||
|
||||
void _rtw_free_recv_priv(struct recv_priv *precvpriv)
|
||||
{
|
||||
_adapter *padapter = precvpriv->adapter;
|
||||
@ -353,7 +345,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue)
|
||||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -592,7 +584,7 @@ union recv_frame *decryptor(_adapter *padapter, union recv_frame *precv_frame)
|
||||
}
|
||||
|
||||
if (prxattrib->encrypt && !prxattrib->bdecrypted) {
|
||||
if (GetFrameType(get_recvframe_data(precv_frame)) == WIFI_DATA
|
||||
if (GetFrameType(get_recvframe_data(precv_frame)) == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA)
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
&& !is_multicast_ether_addr(prxattrib->ra) /* bc/mc packets may use sw decryption for concurrent mode */
|
||||
#endif
|
||||
@ -1018,14 +1010,14 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ptdls_sta = rtw_get_stainfo(pstapriv, get_sa(ptr));
|
||||
ptdls_sta = rtw_get_stainfo(pstapriv, ieee80211_get_SA((struct ieee80211_hdr *)ptr));
|
||||
if (ptdls_sta == NULL) {
|
||||
switch (*paction) {
|
||||
case TDLS_SETUP_REQUEST:
|
||||
case TDLS_DISCOVERY_REQUEST:
|
||||
break;
|
||||
default:
|
||||
RTW_INFO("[TDLS] %s - Direct Link Peer = "MAC_FMT" not found for action = %d\n", __func__, MAC_ARG(get_sa(ptr)), *paction);
|
||||
RTW_INFO("[TDLS] %s - Direct Link Peer = "MAC_FMT" not found for action = %d\n", __func__, MAC_ARG(ieee80211_get_SA((struct ieee80211_hdr *)ptr)), *paction);
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
@ -1119,7 +1111,7 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in
|
||||
|
||||
pstats = &psta->sta_stats;
|
||||
|
||||
pstats->last_rx_time = rtw_get_current_time();
|
||||
pstats->last_rx_time = jiffies;
|
||||
pstats->rx_data_pkts++;
|
||||
pstats->rx_bytes += sz;
|
||||
if (is_broadcast_mac_addr(pattrib->ra)) {
|
||||
@ -1248,7 +1240,7 @@ sint sta2sta_data_frame(
|
||||
process_pwrbit_data(adapter, precv_frame, ptdls_sta);
|
||||
|
||||
/* if NULL-frame, check pwrbit */
|
||||
if ((get_frame_sub_type(ptr) & WIFI_DATA_NULL) == WIFI_DATA_NULL) {
|
||||
if ((get_frame_sub_type(ptr) & IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC) == IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC) {
|
||||
/* NULL-frame with pwrbit=1, buffer_STA should buffer frames for sleep_STA */
|
||||
if (GetPwrMgt(ptr)) {
|
||||
/* it would be triggered when we are off channel and receiving NULL DATA */
|
||||
@ -1270,7 +1262,7 @@ sint sta2sta_data_frame(
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if ((get_frame_sub_type(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
|
||||
if ((get_frame_sub_type(ptr) & (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA))
|
||||
process_wmmps_data(adapter, precv_frame, ptdls_sta);
|
||||
|
||||
ptdls_sta->tdls_sta_state &= ~(TDLS_WAIT_PTR_STATE);
|
||||
@ -1404,7 +1396,7 @@ sint ap2sta_data_frame(
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/*if ((get_frame_sub_type(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE) {
|
||||
/*if ((get_frame_sub_type(ptr) & (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) {
|
||||
}
|
||||
*/
|
||||
|
||||
@ -1450,7 +1442,7 @@ sint ap2sta_data_frame(
|
||||
/* RTW_INFO("After send deauth , %u ms has elapsed.\n", rtw_get_passing_time_ms(send_issue_deauth_time)); */
|
||||
|
||||
if (rtw_get_passing_time_ms(send_issue_deauth_time) > 10000 || send_issue_deauth_time == 0) {
|
||||
send_issue_deauth_time = rtw_get_current_time();
|
||||
send_issue_deauth_time = jiffies;
|
||||
|
||||
RTW_INFO("issue_deauth to the ap=" MAC_FMT " for the reason(7)\n", MAC_ARG(pattrib->bssid));
|
||||
|
||||
@ -1508,7 +1500,7 @@ sint sta2ap_data_frame(
|
||||
|
||||
process_pwrbit_data(adapter, precv_frame, *psta);
|
||||
|
||||
if ((get_frame_sub_type(ptr) & WIFI_QOS_DATA_TYPE) == WIFI_QOS_DATA_TYPE)
|
||||
if ((get_frame_sub_type(ptr) & (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA))
|
||||
process_wmmps_data(adapter, precv_frame, *psta);
|
||||
|
||||
if (get_frame_sub_type(ptr) & BIT(6)) {
|
||||
@ -1569,7 +1561,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
|
||||
/* RTW_INFO("+validate_recv_ctrl_frame\n"); */
|
||||
|
||||
if (GetFrameType(pframe) != WIFI_CTRL_TYPE)
|
||||
if (GetFrameType(pframe) != IEEE80211_FTYPE_CTL)
|
||||
return _FAIL;
|
||||
|
||||
/* receive the frames that ra(a1) is my address */
|
||||
@ -1581,11 +1573,11 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
return _FAIL;
|
||||
|
||||
/* for rx pkt statistics */
|
||||
psta->sta_stats.last_rx_time = rtw_get_current_time();
|
||||
psta->sta_stats.last_rx_time = jiffies;
|
||||
psta->sta_stats.rx_ctrl_pkts++;
|
||||
|
||||
/* only handle ps-poll */
|
||||
if (get_frame_sub_type(pframe) == WIFI_PSPOLL) {
|
||||
if (get_frame_sub_type(pframe) == (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL)) {
|
||||
#ifdef CONFIG_AP_MODE
|
||||
u16 aid;
|
||||
u8 wmmps_ac = 0;
|
||||
@ -1635,7 +1627,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
if (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
@ -1670,7 +1662,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE);
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&psta->sleep_q.lock, &irqL); */
|
||||
@ -1696,7 +1688,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1705,7 +1697,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
#ifdef CONFIG_BEAMFORMING
|
||||
rtw_beamforming_get_ndpa_frame(padapter, precv_frame);
|
||||
#endif/*CONFIG_BEAMFORMING*/
|
||||
} else if (get_frame_sub_type(pframe) == WIFI_BAR) {
|
||||
} else if (get_frame_sub_type(pframe) == IEEE80211_STYPE_BACK_REQ) {
|
||||
rtw_process_bar_frame(padapter, precv_frame);
|
||||
}
|
||||
|
||||
@ -1754,15 +1746,15 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra
|
||||
is_bmc = is_multicast_ether_addr(GetAddr1Ptr(ptr));
|
||||
|
||||
#if DBG_VALIDATE_MGMT_PROTECT
|
||||
if (subtype == WIFI_DEAUTH) {
|
||||
if (subtype == IEEE80211_STYPE_DEAUTH) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" bmc:%u, deauth, privacy:%u, encrypt:%u, bdecrypted:%u\n"
|
||||
, FUNC_ADPT_ARG(adapter)
|
||||
, is_bmc, pattrib->privacy, pattrib->encrypt, pattrib->bdecrypted);
|
||||
} else if (subtype == WIFI_DISASSOC) {
|
||||
} else if (subtype == IEEE80211_STYPE_DISASSOC) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" bmc:%u, disassoc, privacy:%u, encrypt:%u, bdecrypted:%u\n"
|
||||
, FUNC_ADPT_ARG(adapter)
|
||||
, is_bmc, pattrib->privacy, pattrib->encrypt, pattrib->bdecrypted);
|
||||
} if (subtype == WIFI_ACTION) {
|
||||
} if (subtype == IEEE80211_STYPE_ACTION) {
|
||||
if (pattrib->privacy) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" bmc:%u, action(?), privacy:%u, encrypt:%u, bdecrypted:%u\n"
|
||||
, FUNC_ADPT_ARG(adapter)
|
||||
@ -1782,12 +1774,12 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (subtype == WIFI_ACTION)
|
||||
if (subtype == IEEE80211_STYPE_ACTION)
|
||||
category = *(ptr + sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
|
||||
if (is_bmc) {
|
||||
/* broadcast cases */
|
||||
if (subtype == WIFI_ACTION) {
|
||||
if (subtype == IEEE80211_STYPE_ACTION) {
|
||||
if (CATEGORY_IS_GROUP_PRIVACY(category)) {
|
||||
/* drop broadcast group privacy action frame without encryption */
|
||||
#if DBG_VALIDATE_MGMT_PROTECT
|
||||
@ -1801,7 +1793,7 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra
|
||||
goto bip_verify;
|
||||
}
|
||||
}
|
||||
if (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC) {
|
||||
if (subtype == IEEE80211_STYPE_DEAUTH || subtype == IEEE80211_STYPE_DISASSOC) {
|
||||
/* broadcast deauth or disassoc frame need BIP check */
|
||||
goto bip_verify;
|
||||
}
|
||||
@ -1810,13 +1802,13 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra
|
||||
} else {
|
||||
/* unicast cases */
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
if (subtype == WIFI_DEAUTH || subtype == WIFI_DISASSOC) {
|
||||
if (subtype == IEEE80211_STYPE_DEAUTH || subtype == IEEE80211_STYPE_DISASSOC) {
|
||||
if (!MLME_IS_MESH(adapter)) {
|
||||
unsigned short reason = le16_to_cpu(*(unsigned short *)(ptr + WLAN_HDR_A3_LEN));
|
||||
|
||||
#if DBG_VALIDATE_MGMT_PROTECT
|
||||
RTW_INFO(FUNC_ADPT_FMT" unicast %s, reason=%d w/o encrypt\n"
|
||||
, FUNC_ADPT_ARG(adapter), subtype == WIFI_DEAUTH ? "deauth" : "disassoc", reason);
|
||||
, FUNC_ADPT_ARG(adapter), subtype == IEEE80211_STYPE_DEAUTH ? "deauth" : "disassoc", reason);
|
||||
#endif
|
||||
if (reason == 6 || reason == 7) {
|
||||
/* issue sa query request */
|
||||
@ -1827,7 +1819,7 @@ static sint validate_mgmt_protect(_adapter *adapter, union recv_frame *precv_fra
|
||||
}
|
||||
#endif
|
||||
|
||||
if (subtype == WIFI_ACTION && CATEGORY_IS_ROBUST(category)) {
|
||||
if (subtype == IEEE80211_STYPE_ACTION && CATEGORY_IS_ROBUST(category)) {
|
||||
if (psta->bpairwise_key_installed == _TRUE) {
|
||||
#if DBG_VALIDATE_MGMT_PROTECT
|
||||
RTW_INFO(FUNC_ADPT_FMT" unicast robust action(%d) w/o encrypt\n"
|
||||
@ -1965,13 +1957,13 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
||||
|
||||
/* for rx pkt statistics */
|
||||
if (psta) {
|
||||
psta->sta_stats.last_rx_time = rtw_get_current_time();
|
||||
psta->sta_stats.last_rx_time = jiffies;
|
||||
psta->sta_stats.rx_mgnt_pkts++;
|
||||
if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_BEACON)
|
||||
if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == IEEE80211_STYPE_BEACON)
|
||||
psta->sta_stats.rx_beacon_pkts++;
|
||||
else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_PROBEREQ)
|
||||
else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == IEEE80211_STYPE_PROBE_REQ)
|
||||
psta->sta_stats.rx_probereq_pkts++;
|
||||
else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_PROBERSP) {
|
||||
else if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == IEEE80211_STYPE_PROBE_RESP) {
|
||||
if (_rtw_memcmp(adapter_mac_addr(padapter), GetAddr1Ptr(precv_frame->u.hdr.rx_data), ETH_ALEN) == _TRUE)
|
||||
psta->sta_stats.rx_probersp_pkts++;
|
||||
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data))
|
||||
@ -1988,8 +1980,8 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
||||
struct recv_stat *prxstat = (struct recv_stat *) precv_frame->u.hdr.rx_head ;
|
||||
u8 *pda, *psa, *pbssid, *ptr;
|
||||
ptr = precv_frame->u.hdr.rx_data;
|
||||
pda = get_da(ptr);
|
||||
psa = get_sa(ptr);
|
||||
pda = ieee80211_get_DA((struct ieee80211_hdr *)ptr);
|
||||
psa = ieee80211_get_SA((struct ieee80211_hdr *)ptr);
|
||||
pbssid = get_hdr_bssid(ptr);
|
||||
|
||||
|
||||
@ -2298,14 +2290,14 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
|
||||
rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
|
||||
if (bDumpRxPkt == 1) /* dump all rx packets */
|
||||
dump_rx_packet(ptr);
|
||||
else if ((bDumpRxPkt == 2) && (type == WIFI_MGT_TYPE))
|
||||
else if ((bDumpRxPkt == 2) && (type == IEEE80211_FTYPE_MGMT))
|
||||
dump_rx_packet(ptr);
|
||||
else if ((bDumpRxPkt == 3) && (type == WIFI_DATA_TYPE))
|
||||
else if ((bDumpRxPkt == 3) && (type == IEEE80211_FTYPE_DATA))
|
||||
dump_rx_packet(ptr);
|
||||
}
|
||||
#endif
|
||||
switch (type) {
|
||||
case WIFI_MGT_TYPE: /* mgnt */
|
||||
case IEEE80211_FTYPE_MGMT: /* mgnt */
|
||||
DBG_COUNTER(adapter->rx_logs.core_rx_pre_mgmt);
|
||||
retval = validate_recv_mgnt_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL) {
|
||||
@ -2313,7 +2305,7 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
|
||||
}
|
||||
retval = _FAIL; /* only data frame return _SUCCESS */
|
||||
break;
|
||||
case WIFI_CTRL_TYPE: /* ctrl */
|
||||
case IEEE80211_FTYPE_CTL: /* ctrl */
|
||||
DBG_COUNTER(adapter->rx_logs.core_rx_pre_ctrl);
|
||||
retval = validate_recv_ctrl_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL) {
|
||||
@ -2321,7 +2313,7 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
|
||||
}
|
||||
retval = _FAIL; /* only data frame return _SUCCESS */
|
||||
break;
|
||||
case WIFI_DATA_TYPE: /* data */
|
||||
case IEEE80211_FTYPE_DATA: /* data */
|
||||
DBG_COUNTER(adapter->rx_logs.core_rx_pre_data);
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
if (pattrib->qos)
|
||||
@ -2700,7 +2692,7 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
|
||||
|
||||
data = get_recvframe_data(prframe);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
|
||||
pnfhdr = &pnextrframe->u.hdr;
|
||||
|
||||
@ -2773,7 +2765,7 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec
|
||||
psta = rtw_get_stainfo(pstapriv, psta_addr);
|
||||
if (psta == NULL) {
|
||||
u8 type = GetFrameType(pfhdr->rx_data);
|
||||
if (type != WIFI_DATA_TYPE) {
|
||||
if (type != IEEE80211_FTYPE_DATA) {
|
||||
psta = rtw_get_bcmc_stainfo(padapter);
|
||||
if (psta)
|
||||
pdefrag_q = &psta->sta_recvpriv.defrag_q;
|
||||
@ -2948,7 +2940,7 @@ static void recv_free_fwd_resource(_adapter *adapter, struct xmit_frame *fwd_fra
|
||||
_list *list;
|
||||
|
||||
list = get_next(b2u_list);
|
||||
while (rtw_end_of_queue_search(b2u_list, list) == _FALSE) {
|
||||
while (b2u_list != list) {
|
||||
b2uframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
||||
list = get_next(list);
|
||||
rtw_list_delete(&b2uframe->list);
|
||||
@ -2982,7 +2974,7 @@ static void recv_fwd_pkt_hdl(_adapter *adapter, _pkt *pkt
|
||||
_list *list = get_next(b2u_list);
|
||||
struct xmit_frame *b2uframe;
|
||||
|
||||
while (rtw_end_of_queue_search(b2u_list, list) == _FALSE) {
|
||||
while (b2u_list != list) {
|
||||
b2uframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
||||
list = get_next(list);
|
||||
rtw_list_delete(&b2uframe->list);
|
||||
@ -3322,7 +3314,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pnextattrib = &pnextrframe->u.hdr.attrib;
|
||||
|
||||
@ -3828,9 +3820,9 @@ int mp_recv_frame(_adapter *padapter, union recv_frame *rframe)
|
||||
pattrib->privacy = GetPrivacy(ptr);
|
||||
pattrib->order = GetOrder(ptr);
|
||||
|
||||
if (type == WIFI_DATA_TYPE) {
|
||||
pda = get_da(ptr);
|
||||
psa = get_sa(ptr);
|
||||
if (type == IEEE80211_FTYPE_DATA) {
|
||||
pda = ieee80211_get_DA((struct ieee80211_hdr *)ptr);
|
||||
psa = ieee80211_get_SA((struct ieee80211_hdr *)ptr);
|
||||
pbssid = get_hdr_bssid(ptr);
|
||||
|
||||
memcpy(pattrib->dst, pda, ETH_ALEN);
|
||||
@ -4439,7 +4431,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
|
||||
{}
|
||||
#ifdef CONFIG_CUSTOMER_ALIBABA_GENERAL
|
||||
type = GetFrameType(ptr);
|
||||
if ((type == WIFI_DATA_TYPE)&& check_fwstate(mlmepriv, WIFI_STATION_STATE)) {
|
||||
if ((type == IEEE80211_FTYPE_DATA)&& check_fwstate(mlmepriv, WIFI_STATION_STATE)) {
|
||||
struct wlan_network *cur_network = &(mlmepriv->cur_network);
|
||||
if ( _rtw_memcmp(get_addr2_ptr(ptr), cur_network->network.MacAddress, ETH_ALEN)==0) {
|
||||
recv_frame_monitor(padapter, rframe);
|
||||
@ -4803,7 +4795,7 @@ void rx_query_phy_status(
|
||||
|
||||
if ((start_time == 0) || (rtw_get_passing_time_ms(start_time) > 5000)) {
|
||||
RTW_PRINT("Warning!!! %s: Confilc mac addr!!\n", __func__);
|
||||
start_time = rtw_get_current_time();
|
||||
start_time = jiffies;
|
||||
}
|
||||
precvpriv->dbg_rx_conflic_mac_addr_cnt++;
|
||||
} else {
|
||||
@ -4825,7 +4817,7 @@ void rx_query_phy_status(
|
||||
&& _rtw_memcmp(ra, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
|
||||
pkt_info.is_packet_beacon = pkt_info.is_packet_match_bssid
|
||||
&& (get_frame_sub_type(wlanhdr) == WIFI_BEACON);
|
||||
&& (get_frame_sub_type(wlanhdr) == IEEE80211_STYPE_BEACON);
|
||||
|
||||
if (psta && IsFrameTypeData(wlanhdr)) {
|
||||
if (is_ra_bmc)
|
||||
@ -4947,7 +4939,7 @@ bypass_concurrent_hdl:
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
if (primary_padapter->registrypriv.mp_mode != 1) {
|
||||
/* skip unnecessary bmc data frame for primary adapter */
|
||||
if (ra_is_bmc == _TRUE && GetFrameType(pbuf) == WIFI_DATA_TYPE
|
||||
if (ra_is_bmc == _TRUE && GetFrameType(pbuf) == IEEE80211_FTYPE_DATA
|
||||
&& !adapter_allow_bmc_data_rx(precvframe->u.hdr.adapter)
|
||||
) {
|
||||
rtw_free_recvframe(precvframe, &precvframe->u.hdr.adapter->recvpriv.free_recv_queue);
|
||||
|
@ -593,7 +593,7 @@ void _dump_regd_exc_list(void *sel, struct rf_ctl_t *rfctl)
|
||||
head = &rfctl->reg_exc_list;
|
||||
cur = get_next(head);
|
||||
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
u8 has_country;
|
||||
|
||||
ent = LIST_CONTAINOR(cur, struct regd_exc_ent, list);
|
||||
@ -666,7 +666,7 @@ struct regd_exc_ent *_rtw_regd_exc_search(struct rf_ctl_t *rfctl, const char *co
|
||||
head = &rfctl->reg_exc_list;
|
||||
cur = get_next(head);
|
||||
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
u8 has_country;
|
||||
|
||||
ent = LIST_CONTAINOR(cur, struct regd_exc_ent, list);
|
||||
@ -723,7 +723,7 @@ void rtw_regd_exc_list_free(struct rf_ctl_t *rfctl)
|
||||
head = &rfctl->reg_exc_list;
|
||||
cur = get_next(head);
|
||||
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct regd_exc_ent, list);
|
||||
cur = get_next(cur);
|
||||
rtw_list_delete(&ent->list);
|
||||
@ -869,7 +869,7 @@ void dump_txpwr_lmt(void *sel, _adapter *adapter)
|
||||
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
|
||||
@ -892,7 +892,7 @@ void dump_txpwr_lmt(void *sel, _adapter *adapter)
|
||||
_RTW_PRINT_SEL(sel, "|");
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
_RTW_PRINT_SEL(sel, "%3c "
|
||||
@ -922,7 +922,7 @@ void dump_txpwr_lmt(void *sel, _adapter *adapter)
|
||||
RTW_PRINT_SEL(sel, "%3u ", ch);
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
lmt = phy_get_txpwr_lmt_abs(adapter, ent->regd_name, band, bw, tlrs, ntx_idx, ch, 0);
|
||||
@ -974,7 +974,7 @@ void dump_txpwr_lmt(void *sel, _adapter *adapter)
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
i = 0;
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
lmt_offset = phy_get_txpwr_lmt(adapter, ent->regd_name, band, bw, path, rs, ntx_idx, ch, 0);
|
||||
@ -1046,7 +1046,7 @@ void rtw_txpwr_lmt_add_with_nlen(struct rf_ctl_t *rfctl, const char *regd_name,
|
||||
/* search for existed entry */
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
|
||||
@ -1134,7 +1134,7 @@ struct txpwr_lmt_ent *_rtw_txpwr_lmt_get_by_name(struct rf_ctl_t *rfctl, const c
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
|
||||
@ -1172,7 +1172,7 @@ void rtw_txpwr_lmt_list_free(struct rf_ctl_t *rfctl)
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
if (ent->regd_name == rfctl->regd_name)
|
||||
|
@ -347,7 +347,7 @@ static u8 *build_wlan_hdr(_adapter *padapter, struct xmit_frame *pmgntframe,
|
||||
pmlmeext->mgnt_seq++;
|
||||
SetFragNum(pframe, 0);
|
||||
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattr->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -410,7 +410,7 @@ int issue_null_reply(struct rm_obj *prm)
|
||||
return _FALSE;
|
||||
}
|
||||
pattr = &pmgntframe->attrib;
|
||||
pframe = build_wlan_hdr(padapter, pmgntframe, prm->psta, WIFI_ACTION);
|
||||
pframe = build_wlan_hdr(padapter, pmgntframe, prm->psta, IEEE80211_STYPE_ACTION);
|
||||
pframe = rtw_set_fixed_ie(pframe, 3, &prm->p.category, &pattr->pktlen);
|
||||
|
||||
my_len = 0;
|
||||
@ -1082,7 +1082,7 @@ static u8 *rm_gen_bcn_detail_elem(_adapter *padapter, u8 *pframe,
|
||||
#if (RM_MORE_DBG_MSG)
|
||||
RTW_INFO("RM: bcn_req_ssid\n");
|
||||
#endif
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_,
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID,
|
||||
pbss->Ssid.SsidLength,
|
||||
pbss->Ssid.Ssid, &my_len);
|
||||
break;
|
||||
@ -1423,7 +1423,7 @@ static int retrieve_scan_result(struct rm_obj *prm)
|
||||
/* search scan queue to find requested SSID */
|
||||
while (1) {
|
||||
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -1556,7 +1556,7 @@ int issue_beacon_rep(struct rm_obj *prm)
|
||||
}
|
||||
pattr = &pmgntframe->attrib;
|
||||
pframe = build_wlan_hdr(padapter,
|
||||
pmgntframe, prm->psta, WIFI_ACTION);
|
||||
pmgntframe, prm->psta, IEEE80211_STYPE_ACTION);
|
||||
pframe = rtw_set_fixed_ie(pframe,
|
||||
3, &prm->p.category, &pattr->pktlen);
|
||||
|
||||
@ -1600,7 +1600,7 @@ int issue_nb_req(struct rm_obj *prm)
|
||||
return _FALSE;
|
||||
}
|
||||
pattr = &pmgntframe->attrib;
|
||||
pframe = build_wlan_hdr(padapter, pmgntframe, psta, WIFI_ACTION);
|
||||
pframe = build_wlan_hdr(padapter, pmgntframe, psta, IEEE80211_STYPE_ACTION);
|
||||
pframe = rtw_set_fixed_ie(pframe,
|
||||
3, &prm->q.category, &pattr->pktlen);
|
||||
|
||||
@ -1743,7 +1743,7 @@ int issue_radio_meas_req(struct rm_obj *prm)
|
||||
return _FALSE;
|
||||
}
|
||||
pattr = &pmgntframe->attrib;
|
||||
pframe = build_wlan_hdr(padapter, pmgntframe, prm->psta, WIFI_ACTION);
|
||||
pframe = build_wlan_hdr(padapter, pmgntframe, prm->psta, IEEE80211_STYPE_ACTION);
|
||||
pframe = rtw_set_fixed_ie(pframe, 3, &prm->q.category, &pattr->pktlen);
|
||||
|
||||
/* repeat */
|
||||
@ -1917,7 +1917,7 @@ int issue_radio_meas_rep(struct rm_obj *prm)
|
||||
return _FALSE;
|
||||
}
|
||||
pattr = &pmgntframe->attrib;
|
||||
pframe = build_wlan_hdr(padapter, pmgntframe, psta, WIFI_ACTION);
|
||||
pframe = build_wlan_hdr(padapter, pmgntframe, psta, IEEE80211_STYPE_ACTION);
|
||||
pframe = rtw_set_fixed_ie(pframe, 3,
|
||||
&prm->p.category, &pattr->pktlen);
|
||||
|
||||
@ -2050,7 +2050,7 @@ void rm_dbg_list_sta(_adapter *padapter, char *s)
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist,
|
||||
struct sta_info, hash_list);
|
||||
|
||||
@ -2106,7 +2106,7 @@ struct sta_info *rm_get_sta(_adapter *padapter, u16 aid, u8* pbssid)
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist,
|
||||
struct sta_info, hash_list);
|
||||
|
||||
@ -2395,7 +2395,7 @@ static void rm_dbg_list_meas(_adapter *padapter, char *s)
|
||||
plist = get_next(phead);
|
||||
meas_amount = 0;
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
prm = LIST_CONTAINOR(plist, struct rm_obj, list);
|
||||
meas_amount++;
|
||||
plist = get_next(plist);
|
||||
|
@ -329,7 +329,7 @@ static struct rm_obj *_rm_get_rmobj(_queue *queue, u32 rmid)
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
|
||||
prm = LIST_CONTAINOR(plist, struct rm_obj, list);
|
||||
if (rmid == (prm->rmid)) {
|
||||
@ -435,7 +435,7 @@ static void rm_bcast_aid_handler(_adapter *padapter, struct rm_event *pev)
|
||||
_enter_critical(&queue->lock, &irqL);
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
|
||||
prm = LIST_CONTAINOR(plist, struct rm_obj, list);
|
||||
plist = get_next(plist);
|
||||
|
@ -218,7 +218,7 @@ int rtw_get_rson_struct(WLAN_BSSID_EX *bssid, struct rtw_rson_struct *rson_data
|
||||
limit = bssid->IELength - _BEACON_IE_OFFSET_;
|
||||
|
||||
for (p = bssid->IEs + _BEACON_IE_OFFSET_; ; p += (len + 2)) {
|
||||
p = rtw_get_ie(p, _VENDOR_SPECIFIC_IE_, &len, limit);
|
||||
p = rtw_get_ie(p, WLAN_EID_VENDOR_SPECIFIC, &len, limit);
|
||||
limit -= len;
|
||||
if ((p == NULL) || (len == 0))
|
||||
break;
|
||||
@ -252,7 +252,7 @@ u32 rtw_rson_append_ie(_adapter *padapter, unsigned char *pframe, u32 *len)
|
||||
if ((!pdvobj) || (!pframe))
|
||||
return 0;
|
||||
ptr = ori = pframe;
|
||||
*ptr++ = _VENDOR_SPECIFIC_IE_;
|
||||
*ptr++ = WLAN_EID_VENDOR_SPECIFIC;
|
||||
*ptr++ = ie_len = sizeof(RTW_RSON_OUI)+sizeof(pdvobj->rson_data);
|
||||
memcpy(ptr, RTW_RSON_OUI, sizeof(RTW_RSON_OUI));
|
||||
ptr = ptr + sizeof(RTW_RSON_OUI);
|
||||
@ -389,7 +389,7 @@ void rtw_rson_show_survey_info(struct seq_file *m, _list *plist, _list *phead)
|
||||
|
||||
RTW_PRINT_SEL(m, "%5s %-17s %3s %5s %14s %10s %-3s %5s %32s\n", "index", "bssid", "ch", "id", "hop_cnt", "loading", "RSSI", "score", "ssid");
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -434,7 +434,7 @@ u8 rtw_rson_ap_check_sta(_adapter *padapter, u8 *pframe, uint pkt_len, unsigned
|
||||
#ifndef CONFIG_RTW_REPEATER_SON_ROOT
|
||||
memset(&rson_target, 0, sizeof(rson_target));
|
||||
for (p = pframe + WLAN_HDR_A3_LEN + ie_offset; ; p += (len + 2)) {
|
||||
p = rtw_get_ie(p, _VENDOR_SPECIFIC_IE_, &len, pkt_len - WLAN_HDR_A3_LEN - ie_offset);
|
||||
p = rtw_get_ie(p, WLAN_EID_VENDOR_SPECIFIC, &len, pkt_len - WLAN_HDR_A3_LEN - ie_offset);
|
||||
|
||||
if ((p == NULL) || (len == 0))
|
||||
break;
|
||||
|
@ -829,7 +829,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
|
||||
res = _FAIL;
|
||||
|
||||
if (start == 0)
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
|
||||
if (is_broadcast_mac_addr(prxattrib->ra))
|
||||
no_gkey_bc_cnt++;
|
||||
@ -841,7 +841,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
|
||||
RTW_PRINT(FUNC_ADPT_FMT" no_gkey_bc_cnt:%u, no_gkey_mc_cnt:%u\n",
|
||||
FUNC_ADPT_ARG(padapter), no_gkey_bc_cnt, no_gkey_mc_cnt);
|
||||
}
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
no_gkey_bc_cnt = 0;
|
||||
no_gkey_mc_cnt = 0;
|
||||
}
|
||||
@ -1180,7 +1180,7 @@ static void construct_mic_iv(
|
||||
mic_iv[1] = 0x00;
|
||||
#if defined(CONFIG_IEEE80211W) || defined(CONFIG_RTW_MESH)
|
||||
/* 802.11w management frame should set management bit(4) */
|
||||
if (frtype == WIFI_MGT_TYPE)
|
||||
if (frtype == IEEE80211_FTYPE_MGMT)
|
||||
mic_iv[1] |= BIT(4);
|
||||
#endif
|
||||
for (i = 2; i < 8; i++)
|
||||
@ -1214,7 +1214,7 @@ static void construct_mic_header1(
|
||||
mic_header1[1] = (u8)((header_length - 2) % 256);
|
||||
#if defined(CONFIG_IEEE80211W) || defined(CONFIG_RTW_MESH)
|
||||
/* 802.11w management frame don't AND subtype bits 4,5,6 of frame control field */
|
||||
if (frtype == WIFI_MGT_TYPE)
|
||||
if (frtype == IEEE80211_FTYPE_MGMT)
|
||||
mic_header1[2] = mpdu[0];
|
||||
else
|
||||
#endif
|
||||
@ -1315,7 +1315,7 @@ static void construct_ctr_preload(
|
||||
ctr_preload[1] = mpdu[24] & 0x0f;
|
||||
#if defined(CONFIG_IEEE80211W) || defined(CONFIG_RTW_MESH)
|
||||
/* 802.11w management frame should set management bit(4) */
|
||||
if (frtype == WIFI_MGT_TYPE)
|
||||
if (frtype == IEEE80211_FTYPE_MGMT)
|
||||
ctr_preload[1] |= BIT(4);
|
||||
#endif
|
||||
for (i = 2; i < 8; i++)
|
||||
@ -1383,15 +1383,15 @@ static sint aes_cipher(u8 *key, uint hdrlen,
|
||||
a4_exists = 1;
|
||||
|
||||
if (
|
||||
((frtype | frsubtype) == WIFI_DATA_CFACK) ||
|
||||
((frtype | frsubtype) == WIFI_DATA_CFPOLL) ||
|
||||
((frtype | frsubtype) == WIFI_DATA_CFACKPOLL)) {
|
||||
((frtype | frsubtype) == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA_CFACK)) ||
|
||||
((frtype | frsubtype) == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA_CFPOLL)) ||
|
||||
((frtype | frsubtype) == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA_CFACKPOLL))) {
|
||||
qc_exists = 1;
|
||||
if (hdrlen != WLAN_HDR_A3_QOS_LEN && hdrlen != WLAN_HDR_A4_QOS_LEN)
|
||||
hdrlen += 2;
|
||||
}
|
||||
/* add for CONFIG_IEEE80211W, none 11w also can use */
|
||||
else if ((frtype == WIFI_DATA) &&
|
||||
else if ((frtype == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA)) &&
|
||||
((frsubtype == 0x08) ||
|
||||
(frsubtype == 0x09) ||
|
||||
(frsubtype == 0x0a) ||
|
||||
@ -1702,14 +1702,14 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
||||
a4_exists = 1;
|
||||
|
||||
if (
|
||||
((frtype | frsubtype) == WIFI_DATA_CFACK) ||
|
||||
((frtype | frsubtype) == WIFI_DATA_CFPOLL) ||
|
||||
((frtype | frsubtype) == WIFI_DATA_CFACKPOLL)) {
|
||||
((frtype | frsubtype) == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA_CFACK)) ||
|
||||
((frtype | frsubtype) == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA_CFPOLL)) ||
|
||||
((frtype | frsubtype) == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA_CFACKPOLL))) {
|
||||
qc_exists = 1;
|
||||
if (hdrlen != WLAN_HDR_A3_QOS_LEN && hdrlen != WLAN_HDR_A4_QOS_LEN)
|
||||
hdrlen += 2;
|
||||
} /* only for data packet . add for CONFIG_IEEE80211W, none 11w also can use */
|
||||
else if ((frtype == WIFI_DATA) &&
|
||||
else if ((frtype == (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA)) &&
|
||||
((frsubtype == 0x08) ||
|
||||
(frsubtype == 0x09) ||
|
||||
(frsubtype == 0x0a) ||
|
||||
@ -1950,7 +1950,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe)
|
||||
res = _FAIL;
|
||||
|
||||
if (start == 0)
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
|
||||
if (is_broadcast_mac_addr(prxattrib->ra))
|
||||
no_gkey_bc_cnt++;
|
||||
@ -1962,7 +1962,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe)
|
||||
RTW_PRINT(FUNC_ADPT_FMT" no_gkey_bc_cnt:%u, no_gkey_mc_cnt:%u\n",
|
||||
FUNC_ADPT_ARG(padapter), no_gkey_bc_cnt, no_gkey_mc_cnt);
|
||||
}
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
no_gkey_bc_cnt = 0;
|
||||
no_gkey_mc_cnt = 0;
|
||||
}
|
||||
@ -2045,7 +2045,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *whdr_pos, sint flen
|
||||
u8 mic[16];
|
||||
|
||||
mme = whdr_pos + flen - 18;
|
||||
if (*mme != _MME_IE_)
|
||||
if (*mme != WLAN_EID_MMIE )
|
||||
return RTW_RX_HANDLED;
|
||||
|
||||
/* copy key index */
|
||||
|
@ -273,7 +273,7 @@ void sreset_reset(_adapter *padapter)
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
_irqL irqL;
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
struct dvobj_priv *psdpriv = padapter->dvobj;
|
||||
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
|
||||
|
||||
|
@ -43,7 +43,7 @@ inline void rtw_st_ctl_clear_tracker_q(struct st_ctl_t *st_ctl)
|
||||
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
phead = &st_ctl->tracker_q.queue;
|
||||
plist = get_next(phead);
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = get_next(plist);
|
||||
rtw_list_delete(&st->list);
|
||||
@ -180,7 +180,7 @@ void dump_st_ctl(void *sel, struct st_ctl_t *st_ctl)
|
||||
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
|
||||
phead = &st_ctl->tracker_q.queue;
|
||||
plist = get_next(phead);
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
st = LIST_CONTAINOR(plist, struct session_tracker, list);
|
||||
plist = get_next(plist);
|
||||
|
||||
@ -358,7 +358,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
|
||||
phead = get_list_head(&pstapriv->free_sta_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , list);
|
||||
plist = get_next(plist);
|
||||
}
|
||||
@ -391,7 +391,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
int i;
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
|
||||
plist = get_next(plist);
|
||||
@ -803,7 +803,7 @@ void rtw_free_all_stainfo(_adapter *padapter)
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -865,7 +865,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
|
||||
plist = get_next(phead);
|
||||
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
@ -1026,7 +1026,7 @@ u8 _rtw_access_ctrl(_adapter *adapter, u8 period, const u8 *mac_addr)
|
||||
_enter_critical_bh(&(acl_node_q->lock), &irqL);
|
||||
head = get_list_head(acl_node_q);
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list);
|
||||
list = get_next(list);
|
||||
|
||||
|
110
core/rtw_tdls.c
110
core/rtw_tdls.c
@ -111,7 +111,7 @@ void rtw_free_all_tdls_sta(_adapter *padapter, u8 enqueue_cmd)
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -231,7 +231,7 @@ u8 rtw_is_tdls_sta_existed(_adapter *padapter)
|
||||
for (i = 0; i < NUM_STA; i++) {
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
if (psta->tdls_sta_state != TDLS_STATE_NONE) {
|
||||
@ -327,7 +327,7 @@ int _issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsi
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pframe, WIFI_QOS_DATA_NULL);
|
||||
set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr_qos);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
|
||||
@ -355,7 +355,7 @@ int issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsig
|
||||
{
|
||||
int ret;
|
||||
int i = 0;
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
@ -425,12 +425,12 @@ void rtw_tdls_process_ht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8
|
||||
u8 cur_ldpc_cap = 0, cur_stbc_cap = 0, cur_beamform_cap = 0;
|
||||
|
||||
/* Save HT capabilities in the sta object */
|
||||
memset(&ptdls_sta->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
||||
if (data && Length >= sizeof(struct rtw_ieee80211_ht_cap)) {
|
||||
memset(&ptdls_sta->htpriv.ht_cap, 0, sizeof(struct ieee80211_ht_cap));
|
||||
if (data && Length >= sizeof(struct ieee80211_ht_cap)) {
|
||||
ptdls_sta->flags |= WLAN_STA_HT;
|
||||
ptdls_sta->flags |= WLAN_STA_WME;
|
||||
|
||||
memcpy(&ptdls_sta->htpriv.ht_cap, data, sizeof(struct rtw_ieee80211_ht_cap));
|
||||
memcpy(&ptdls_sta->htpriv.ht_cap, data, sizeof(struct ieee80211_ht_cap));
|
||||
} else {
|
||||
ptdls_sta->flags &= ~WLAN_STA_HT;
|
||||
return;
|
||||
@ -727,24 +727,24 @@ u8 *rtw_tdls_set_rsnie(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struct pkt_attri
|
||||
int len = 0;
|
||||
|
||||
if (ptxmgmt->len > 0)
|
||||
p = rtw_get_ie(ptxmgmt->buf, _RSN_IE_2_, &len, ptxmgmt->len);
|
||||
p = rtw_get_ie(ptxmgmt->buf, WLAN_EID_RSN, &len, ptxmgmt->len);
|
||||
|
||||
if (p != NULL)
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, len, p + 2, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_RSN, len, p + 2, &(pattrib->pktlen));
|
||||
else if (init == _TRUE)
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(TDLS_RSNIE), TDLS_RSNIE, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_RSN, sizeof(TDLS_RSNIE), TDLS_RSNIE, &(pattrib->pktlen));
|
||||
else
|
||||
return rtw_set_ie(pframe, _RSN_IE_2_, sizeof(ptdls_sta->TDLS_RSNIE), ptdls_sta->TDLS_RSNIE, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_RSN, sizeof(ptdls_sta->TDLS_RSNIE), ptdls_sta->TDLS_RSNIE, &(pattrib->pktlen));
|
||||
}
|
||||
|
||||
u8 *rtw_tdls_set_ext_cap(u8 *pframe, struct pkt_attrib *pattrib)
|
||||
{
|
||||
return rtw_set_ie(pframe, _EXT_CAP_IE_ , sizeof(TDLS_EXT_CAPIE), TDLS_EXT_CAPIE, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_EXT_CAPABILITY , sizeof(TDLS_EXT_CAPIE), TDLS_EXT_CAPIE, &(pattrib->pktlen));
|
||||
}
|
||||
|
||||
u8 *rtw_tdls_set_qos_cap(u8 *pframe, struct pkt_attrib *pattrib)
|
||||
{
|
||||
return rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, sizeof(TDLS_WMMIE), TDLS_WMMIE, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, sizeof(TDLS_WMMIE), TDLS_WMMIE, &(pattrib->pktlen));
|
||||
}
|
||||
|
||||
u8 *rtw_tdls_set_ftie(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struct pkt_attrib *pattrib, u8 *ANonce, u8 *SNonce)
|
||||
@ -777,10 +777,10 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc
|
||||
int len = 0;
|
||||
|
||||
if (ptxmgmt->len > 0)
|
||||
p = rtw_get_ie(ptxmgmt->buf, _TIMEOUT_ITVL_IE_, &len, ptxmgmt->len);
|
||||
p = rtw_get_ie(ptxmgmt->buf, WLAN_EID_TIMEOUT_INTERVAL, &len, ptxmgmt->len);
|
||||
|
||||
if (p != NULL)
|
||||
return rtw_set_ie(pframe, _TIMEOUT_ITVL_IE_, len, p + 2, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_TIMEOUT_INTERVAL, len, p + 2, &(pattrib->pktlen));
|
||||
else {
|
||||
/* Timeout interval */
|
||||
timeout_itvl[0] = 0x02;
|
||||
@ -789,7 +789,7 @@ u8 *rtw_tdls_set_timeout_interval(struct tdls_txmgmt *ptxmgmt, u8 *pframe, struc
|
||||
else
|
||||
memcpy(timeout_itvl + 1, (u8 *)(&ptdls_sta->TDLS_PeerKey_Lifetime), 4);
|
||||
|
||||
return rtw_set_ie(pframe, _TIMEOUT_ITVL_IE_, 5, timeout_itvl, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_TIMEOUT_INTERVAL, 5, timeout_itvl, &(pattrib->pktlen));
|
||||
}
|
||||
}
|
||||
|
||||
@ -867,14 +867,14 @@ u8 *rtw_tdls_set_supported_rate(_adapter *padapter, u8 *pframe, struct pkt_attri
|
||||
bssrate_len = rtw_get_rateset_len(bssrate);
|
||||
|
||||
if (bssrate_len > 8) {
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES , 8, bssrate, &(pattrib->pktlen));
|
||||
more_supportedrates = 1;
|
||||
} else
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES , bssrate_len , bssrate, &(pattrib->pktlen));
|
||||
|
||||
/* extended supported rates */
|
||||
if (more_supportedrates == 1)
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen));
|
||||
|
||||
return pframe;
|
||||
}
|
||||
@ -991,7 +991,7 @@ s32 rtw_tdls_do_ch_sw(_adapter *padapter, struct sta_info *ptdls_sta, u8 chnl_ty
|
||||
u8 take_care_iqk;
|
||||
s32 ret = _FAIL;
|
||||
|
||||
ch_sw_time_start = rtw_systime_to_ms(rtw_get_current_time());
|
||||
ch_sw_time_start = jiffies_to_msecs(jiffies);
|
||||
|
||||
/* set mac_id sleep before channel switch */
|
||||
rtw_hal_macid_sleep(padapter, ptdls_sta->cmn.mac_id);
|
||||
@ -1043,7 +1043,7 @@ s32 rtw_tdls_do_ch_sw(_adapter *padapter, struct sta_info *ptdls_sta, u8 chnl_ty
|
||||
#endif
|
||||
|
||||
if (ret == _SUCCESS) {
|
||||
ch_sw_time_spent = rtw_systime_to_ms(rtw_get_current_time()) - ch_sw_time_start;
|
||||
ch_sw_time_spent = jiffies_to_msecs(jiffies) - ch_sw_time_start;
|
||||
if (chnl_type == TDLS_CH_SW_OFF_CHNL) {
|
||||
if ((u32)ch_switch_time / 1000 > ch_sw_time_spent)
|
||||
wait_time = (u32)ch_switch_time / 1000 - ch_sw_time_spent;
|
||||
@ -1075,7 +1075,7 @@ u8 *rtw_tdls_set_wmm_params(_adapter *padapter, u8 *pframe, struct pkt_attrib *p
|
||||
memcpy(wmm_param_ele + 6, (u8 *)&TDLS_WMM_PARAM_IE, sizeof(TDLS_WMM_PARAM_IE));
|
||||
else
|
||||
memcpy(wmm_param_ele + 6, (u8 *)&pmlmeinfo->WMM_param, sizeof(pmlmeinfo->WMM_param));
|
||||
return rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 24, wmm_param_ele, &(pattrib->pktlen));
|
||||
return rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, 24, wmm_param_ele, &(pattrib->pktlen));
|
||||
} else
|
||||
return pframe;
|
||||
}
|
||||
@ -1538,7 +1538,7 @@ int issue_tdls_dis_rsp(_adapter *padapter, struct tdls_txmgmt *ptxmgmt, u8 priva
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -1771,7 +1771,7 @@ int On_TDLS_Dis_Rsp(_adapter *padapter, union recv_frame *precv_frame)
|
||||
/* WFDTDLS: for sigma test, not to setup direct link automatically */
|
||||
ptdlsinfo->dev_discovered = _TRUE;
|
||||
|
||||
psa = get_sa(ptr);
|
||||
psa = ieee80211_get_SA((struct ieee80211_hdr *)ptr);
|
||||
ptdls_sta = rtw_get_stainfo(&(padapter->stapriv), psa);
|
||||
if (ptdls_sta != NULL)
|
||||
ptdls_sta->sta_stats.rx_tdls_disc_rsp_pkts++;
|
||||
@ -1848,7 +1848,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
goto exit;
|
||||
|
||||
memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt));
|
||||
psa = get_sa(ptr);
|
||||
psa = ieee80211_get_SA((struct ieee80211_hdr *)ptr);
|
||||
|
||||
if (ptdlsinfo->sta_maximum == _TRUE) {
|
||||
if (ptdls_sta == NULL)
|
||||
@ -1902,7 +1902,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
|
||||
if (ptdls_sta) {
|
||||
txmgmt.dialog_token = *(ptr + 2); /* Copy dialog token */
|
||||
txmgmt.status_code = _STATS_SUCCESSFUL_;
|
||||
txmgmt.status_code = WLAN_STATUS_SUCCESS;
|
||||
|
||||
/* Parsing information element */
|
||||
for (j = FIXED_IE; j < parsing_length;) {
|
||||
@ -1910,13 +1910,13 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr + j);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_SUPP_RATES:
|
||||
memcpy(supportRate, pIE->data, pIE->Length);
|
||||
supportRateNum = pIE->Length;
|
||||
break;
|
||||
case _COUNTRY_IE_:
|
||||
break;
|
||||
case _EXT_SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_EXT_SUPP_RATES:
|
||||
if (supportRateNum < sizeof(supportRate)) {
|
||||
memcpy(supportRate + supportRateNum, pIE->data, pIE->Length);
|
||||
supportRateNum += pIE->Length;
|
||||
@ -1924,7 +1924,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
break;
|
||||
case _SUPPORTED_CH_IE_:
|
||||
break;
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
rsnie_included = 1;
|
||||
if (prx_pkt_attrib->encrypt) {
|
||||
prsnie = (u8 *)pIE;
|
||||
@ -1941,22 +1941,22 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
txmgmt.status_code = _STATS_INVALID_RSNIE_;
|
||||
}
|
||||
break;
|
||||
case _EXT_CAP_IE_:
|
||||
case WLAN_EID_EXT_CAPABILITY :
|
||||
break;
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
break;
|
||||
case _FTIE_:
|
||||
if (prx_pkt_attrib->encrypt)
|
||||
memcpy(SNonce, (ptr + j + 52), 32);
|
||||
break;
|
||||
case _TIMEOUT_ITVL_IE_:
|
||||
case WLAN_EID_TIMEOUT_INTERVAL:
|
||||
if (prx_pkt_attrib->encrypt)
|
||||
timeout_interval = cpu_to_le32(*(u32 *)(ptr + j + 3));
|
||||
break;
|
||||
case _RIC_Descriptor_IE_:
|
||||
break;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
case _HT_CAPABILITY_IE_:
|
||||
case WLAN_EID_HT_CAPABILITY:
|
||||
rtw_tdls_process_ht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
|
||||
break;
|
||||
#endif
|
||||
@ -1983,7 +1983,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
|
||||
/* Check status code */
|
||||
/* If responder STA has/hasn't security on AP, but request hasn't/has RSNIE, it should reject */
|
||||
if (txmgmt.status_code == _STATS_SUCCESSFUL_) {
|
||||
if (txmgmt.status_code == WLAN_STATUS_SUCCESS) {
|
||||
if (rsnie_included && prx_pkt_attrib->encrypt == 0)
|
||||
txmgmt.status_code = _STATS_SEC_DISABLED_;
|
||||
else if (rsnie_included == 0 && prx_pkt_attrib->encrypt)
|
||||
@ -2027,7 +2027,7 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
if (rtw_tdls_is_driver_setup(padapter)) {
|
||||
issue_tdls_setup_rsp(padapter, &txmgmt);
|
||||
|
||||
if (txmgmt.status_code == _STATS_SUCCESSFUL_)
|
||||
if (txmgmt.status_code == WLAN_STATUS_SUCCESS)
|
||||
_set_timer(&ptdls_sta->handshake_timer, TDLS_HANDSHAKE_TIME);
|
||||
else {
|
||||
rtw_tdls_teardown_pre_hdl(padapter, ptdls_sta);
|
||||
@ -2064,7 +2064,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
u32 timeout_interval = TDLS_TPK_RESEND_COUNT;
|
||||
|
||||
memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt));
|
||||
psa = get_sa(ptr);
|
||||
psa = ieee80211_get_SA((struct ieee80211_hdr *)ptr);
|
||||
|
||||
ptr += prx_pkt_attrib->hdrlen + prx_pkt_attrib->iv_len + LLC_HEADER_SIZE + ETH_TYPE_LEN + PAYLOAD_TYPE_LEN;
|
||||
parsing_length = ((union recv_frame *)precv_frame)->u.hdr.len
|
||||
@ -2092,13 +2092,13 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr + j);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_SUPP_RATES:
|
||||
memcpy(supportRate, pIE->data, pIE->Length);
|
||||
supportRateNum = pIE->Length;
|
||||
break;
|
||||
case _COUNTRY_IE_:
|
||||
break;
|
||||
case _EXT_SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_EXT_SUPP_RATES:
|
||||
if (supportRateNum < sizeof(supportRate)) {
|
||||
memcpy(supportRate + supportRateNum, pIE->data, pIE->Length);
|
||||
supportRateNum += pIE->Length;
|
||||
@ -2106,7 +2106,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
break;
|
||||
case _SUPPORTED_CH_IE_:
|
||||
break;
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
prsnie = (u8 *)pIE;
|
||||
/* Check CCMP pairwise_cipher presence. */
|
||||
ppairwise_cipher = prsnie + 10;
|
||||
@ -2115,9 +2115,9 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
if (_rtw_memcmp(ppairwise_cipher + 4 * k, RSN_CIPHER_SUITE_CCMP, 4) == _TRUE)
|
||||
verify_ccmp = 1;
|
||||
}
|
||||
case _EXT_CAP_IE_:
|
||||
case WLAN_EID_EXT_CAPABILITY :
|
||||
break;
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (_rtw_memcmp((u8 *)pIE + 2, WMM_INFO_OUI, 6) == _TRUE) {
|
||||
/* WMM Info ID and OUI */
|
||||
if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE))
|
||||
@ -2128,14 +2128,14 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
pftie = (u8 *)pIE;
|
||||
memcpy(ANonce, (ptr + j + 20), 32);
|
||||
break;
|
||||
case _TIMEOUT_ITVL_IE_:
|
||||
case WLAN_EID_TIMEOUT_INTERVAL:
|
||||
ptimeout_ie = (u8 *)pIE;
|
||||
timeout_interval = cpu_to_le32(*(u32 *)(ptimeout_ie + 3));
|
||||
break;
|
||||
case _RIC_Descriptor_IE_:
|
||||
break;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
case _HT_CAPABILITY_IE_:
|
||||
case WLAN_EID_HT_CAPABILITY:
|
||||
rtw_tdls_process_ht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
|
||||
break;
|
||||
#endif
|
||||
@ -2173,7 +2173,7 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
|
||||
if (prx_pkt_attrib->encrypt) {
|
||||
if (verify_ccmp == 1) {
|
||||
txmgmt.status_code = _STATS_SUCCESSFUL_;
|
||||
txmgmt.status_code = WLAN_STATUS_SUCCESS;
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) {
|
||||
wpa_tdls_generate_tpk(padapter, ptdls_sta);
|
||||
if (tdls_verify_mic(ptdls_sta->tpk.kck, 2, plinkid_ie, prsnie, ptimeout_ie, pftie) == _FAIL) {
|
||||
@ -2188,13 +2188,13 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
} else
|
||||
txmgmt.status_code = _STATS_INVALID_RSNIE_;
|
||||
} else
|
||||
txmgmt.status_code = _STATS_SUCCESSFUL_;
|
||||
txmgmt.status_code = WLAN_STATUS_SUCCESS;
|
||||
|
||||
if (rtw_tdls_is_driver_setup(padapter) == _TRUE) {
|
||||
memcpy(txmgmt.peer, prx_pkt_attrib->src, ETH_ALEN);
|
||||
issue_tdls_setup_cfm(padapter, &txmgmt);
|
||||
|
||||
if (txmgmt.status_code == _STATS_SUCCESSFUL_) {
|
||||
if (txmgmt.status_code == WLAN_STATUS_SUCCESS) {
|
||||
rtw_tdls_set_link_established(padapter, _TRUE);
|
||||
|
||||
if (ptdls_sta->tdls_sta_state & TDLS_RESPONDER_STATE) {
|
||||
@ -2235,7 +2235,7 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
u16 j, pairwise_count;
|
||||
int ret = _SUCCESS;
|
||||
|
||||
psa = get_sa(ptr);
|
||||
psa = ieee80211_get_SA((struct ieee80211_hdr *)ptr);
|
||||
|
||||
ptr += prx_pkt_attrib->hdrlen + prx_pkt_attrib->iv_len + LLC_HEADER_SIZE + ETH_TYPE_LEN + PAYLOAD_TYPE_LEN;
|
||||
parsing_length = ((union recv_frame *)precv_frame)->u.hdr.len
|
||||
@ -2262,10 +2262,10 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr + j);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
prsnie = (u8 *)pIE;
|
||||
break;
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (_rtw_memcmp((u8 *)pIE + 2, WMM_PARA_OUI, 6) == _TRUE) {
|
||||
/* WMM Parameter ID and OUI */
|
||||
ptdls_sta->qos_option = _TRUE;
|
||||
@ -2274,11 +2274,11 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame, struct
|
||||
case _FTIE_:
|
||||
pftie = (u8 *)pIE;
|
||||
break;
|
||||
case _TIMEOUT_ITVL_IE_:
|
||||
case WLAN_EID_TIMEOUT_INTERVAL:
|
||||
ptimeout_ie = (u8 *)pIE;
|
||||
break;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
case _HT_EXTRA_INFO_IE_:
|
||||
case WLAN_EID_HT_OPERATION:
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
@ -2478,7 +2478,7 @@ int On_TDLS_Peer_Traffic_Rsp(_adapter *padapter, union recv_frame *precv_frame,
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
/* transmit buffered frames */
|
||||
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == _FALSE) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
@ -2789,7 +2789,7 @@ void wfd_ie_tdls(_adapter *padapter, u8 *pframe, u32 *pktlen)
|
||||
memcpy(wfdie + wfdielen, pwfd_info->ip_address, 4);
|
||||
wfdielen += 4;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wfdielen, (unsigned char *) wfdie, pktlen);
|
||||
|
||||
}
|
||||
#endif /* CONFIG_WFD */
|
||||
@ -2807,7 +2807,7 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
||||
/* SNonce */
|
||||
if (pattrib->encrypt) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
time = rtw_get_current_time();
|
||||
time = jiffies;
|
||||
memcpy(&ptdls_sta->SNonce[4 * i], (u8 *)&time, 4);
|
||||
}
|
||||
}
|
||||
@ -2883,7 +2883,7 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr
|
||||
|
||||
if (pattrib->encrypt) {
|
||||
for (k = 0; k < 8; k++) {
|
||||
time = rtw_get_current_time();
|
||||
time = jiffies;
|
||||
memcpy(&ptdls_sta->ANonce[4 * k], (u8 *)&time, 4);
|
||||
}
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ u8 rtw_wapi_is_wai_packet(_adapter *padapter, u8 *pkt_data)
|
||||
|
||||
WAPI_TRACE(WAPI_TX | WAPI_RX, "%s: bFind=%d pTaddr="MAC_FMT"\n", __FUNCTION__, bFind, MAC_ARG(pTaddr));
|
||||
|
||||
if (pkt_data[0] == WIFI_QOS_DATA_TYPE)
|
||||
if (pkt_data[0] == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA))
|
||||
Offset_TypeWAI += 2;
|
||||
|
||||
/* 88b4? */
|
||||
@ -569,7 +569,7 @@ void rtw_build_probe_resp_wapi_ie(_adapter *padapter, unsigned char *pframe, str
|
||||
|
||||
WapiSetIE(padapter);
|
||||
WapiIELength = pWapiInfo->wapiIELength;
|
||||
pframe[0] = _WAPI_IE_;
|
||||
pframe[0] = WLAN_EID_BSS_AC_ACCESS_DELAY;
|
||||
pframe[1] = WapiIELength;
|
||||
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||
pframe += WapiIELength + 2;
|
||||
@ -591,7 +591,7 @@ void rtw_build_beacon_wapi_ie(_adapter *padapter, unsigned char *pframe, struct
|
||||
|
||||
WapiSetIE(padapter);
|
||||
WapiIELength = pWapiInfo->wapiIELength;
|
||||
pframe[0] = _WAPI_IE_;
|
||||
pframe[0] = WLAN_EID_BSS_AC_ACCESS_DELAY;
|
||||
pframe[1] = WapiIELength;
|
||||
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||
pframe += WapiIELength + 2;
|
||||
@ -627,7 +627,7 @@ void rtw_build_assoc_req_wapi_ie(_adapter *padapter, unsigned char *pframe, stru
|
||||
memcpy(pWapiInfo->wapiIE + WapiIELength, &bkidNum, 2);
|
||||
WapiIELength += 2;
|
||||
|
||||
pframe[0] = _WAPI_IE_;
|
||||
pframe[0] = WLAN_EID_BSS_AC_ACCESS_DELAY;
|
||||
pframe[1] = WapiIELength;
|
||||
memcpy(pframe + 2, pWapiInfo->wapiIE, WapiIELength);
|
||||
pframe += WapiIELength + 2;
|
||||
|
@ -482,7 +482,7 @@ u8 WapiCheckPnInSwDecrypt(
|
||||
|
||||
if ((_rtw_memcmp(pRaddr, padapter->pnetdev->dev_addr, ETH_ALEN) == 0)
|
||||
&& !(pDaddr)
|
||||
&& (GetFrameType(&fc) == WIFI_QOS_DATA_TYPE))
|
||||
&& (GetFrameType(&fc) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)))
|
||||
/* && ieee->pHTInfo->bCurrentHTSupport && */
|
||||
/* ieee->pHTInfo->bCurRxReorderEnable) */
|
||||
ret = false;
|
||||
@ -509,7 +509,7 @@ int SecSMS4HeaderFillIV(_adapter *padapter, u8 *pxmitframe)
|
||||
return ret;
|
||||
#if 0
|
||||
hdr_len = sMacHdrLng;
|
||||
if (GetFrameType(pskb->data) == WIFI_QOS_DATA_TYPE)
|
||||
if (GetFrameType(pskb->data) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA))
|
||||
hdr_len += 2;
|
||||
/* hdr_len += SNAP_SIZE + sizeof(u16); */
|
||||
|
||||
@ -694,7 +694,7 @@ u8 SecSWSMS4Decryption(
|
||||
WAPI_DATA(WAPI_RX, "Decryption - Before decryption", pskb->data, pskb->len);
|
||||
|
||||
IVOffset = sMacHdrLng;
|
||||
bQosData = GetFrameType(pskb->data) == WIFI_QOS_DATA_TYPE;
|
||||
bQosData = GetFrameType(pskb->data) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA);
|
||||
if (bQosData)
|
||||
IVOffset += 2;
|
||||
|
||||
@ -757,7 +757,7 @@ u8 SecSWSMS4Decryption(
|
||||
if (pWapiSta->wapiUsk.keyId == KeyIdx && pWapiSta->wapiUsk.bSet) {
|
||||
WAPI_TRACE(WAPI_RX, "%s: Use USK for Decryption!!!\n", __FUNCTION__);
|
||||
if (precv_hdr->bWapiCheckPNInDecrypt) {
|
||||
if (GetFrameType(pskb->data) == WIFI_QOS_DATA_TYPE) {
|
||||
if (GetFrameType(pskb->data) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) {
|
||||
WapiGetLastRxUnicastPNForQoSData(TID, pWapiSta, lastRxPNforQoS);
|
||||
pLastRxPN = lastRxPNforQoS;
|
||||
} else
|
||||
|
@ -154,7 +154,7 @@ s8 rtw_get_sta_rx_nss(_adapter *adapter, struct sta_info *psta)
|
||||
else
|
||||
#endif /* CONFIG_80211AC_VHT */
|
||||
if (psta->htpriv.ht_option)
|
||||
nss = rtw_min(nss, rtw_ht_mcsset_to_nss(psta->htpriv.ht_cap.supp_mcs_set));
|
||||
nss = rtw_min(nss, rtw_ht_mcsset_to_nss(psta->htpriv.ht_cap.mcs.rx_mask));
|
||||
#endif /*CONFIG_80211N_HT*/
|
||||
RTW_INFO("%s: %d SS\n", __func__, nss);
|
||||
return nss;
|
||||
@ -183,7 +183,7 @@ s8 rtw_get_sta_tx_nss(_adapter *adapter, struct sta_info *psta)
|
||||
else
|
||||
#endif /* CONFIG_80211AC_VHT */
|
||||
if (psta->htpriv.ht_option)
|
||||
nss = rtw_min(nss, rtw_ht_mcsset_to_nss(psta->htpriv.ht_cap.supp_mcs_set));
|
||||
nss = rtw_min(nss, rtw_ht_mcsset_to_nss(psta->htpriv.ht_cap.mcs.rx_mask));
|
||||
#endif /*CONFIG_80211N_HT*/
|
||||
RTW_INFO("%s: %d SS\n", __func__, nss);
|
||||
return nss;
|
||||
@ -419,7 +419,7 @@ inline void rtw_set_oper_ch(_adapter *adapter, u8 ch)
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
|
||||
|
||||
if (dvobj->oper_channel != ch) {
|
||||
dvobj->on_oper_ch_time = rtw_get_current_time();
|
||||
dvobj->on_oper_ch_time = jiffies;
|
||||
|
||||
#ifdef DBG_CH_SWITCH
|
||||
cnt += snprintf(msg + cnt, len - cnt, "switch to ch %3u", ch);
|
||||
@ -2181,7 +2181,7 @@ void VCS_update(_adapter *padapter, struct sta_info *psta)
|
||||
case 2: /* auto */
|
||||
default:
|
||||
if (((pmlmeinfo->ERP_enable) && (pmlmeinfo->ERP_IE & BIT(1)))
|
||||
/*||(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT)*/
|
||||
/*||(pmlmepriv->ht_op_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT)*/
|
||||
) {
|
||||
if (pregpriv->vcs_type == 1) {
|
||||
psta->rtsen = 1;
|
||||
@ -2298,8 +2298,8 @@ inline bool match_ranges(u16 EID, u32 value)
|
||||
int nr_range;
|
||||
|
||||
switch (EID) {
|
||||
case _EXT_SUPPORTEDRATES_IE_:
|
||||
case _SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_EXT_SUPP_RATES:
|
||||
case WLAN_EID_SUPP_RATES:
|
||||
nr_range = sizeof(support_rate_ranges)/sizeof(u8);
|
||||
for (i = 0; i < nr_range; i++) {
|
||||
/* clear bit7 before searching. */
|
||||
@ -2331,8 +2331,8 @@ bool rtw_validate_value(u16 EID, u8 *p, u16 len)
|
||||
u32 i, nr_val;
|
||||
|
||||
switch (EID) {
|
||||
case _EXT_SUPPORTEDRATES_IE_:
|
||||
case _SUPPORTEDRATES_IE_:
|
||||
case WLAN_EID_EXT_SUPP_RATES:
|
||||
case WLAN_EID_SUPP_RATES:
|
||||
nr_val = len;
|
||||
for (i=0; i<nr_val; i++) {
|
||||
rate = *(p+i);
|
||||
@ -2370,15 +2370,15 @@ void rtw_absorb_ssid_ifneed(_adapter *padapter, WLAN_BSSID_EX *bssid, u8 *pframe
|
||||
if ((!bssid) || (!pframe))
|
||||
return;
|
||||
|
||||
if (subtype == WIFI_BEACON) {
|
||||
if (subtype == IEEE80211_STYPE_BEACON) {
|
||||
bssid->Reserved[0] = BSS_TYPE_BCN;
|
||||
ie_offset = _BEACON_IE_OFFSET_;
|
||||
} else {
|
||||
/* FIXME : more type */
|
||||
if (subtype == WIFI_PROBERSP) {
|
||||
if (subtype == IEEE80211_STYPE_PROBE_RESP) {
|
||||
ie_offset = _PROBERSP_IE_OFFSET_;
|
||||
bssid->Reserved[0] = BSS_TYPE_PROB_RSP;
|
||||
} else if (subtype == WIFI_PROBEREQ) {
|
||||
} else if (subtype == IEEE80211_STYPE_PROBE_REQ) {
|
||||
ie_offset = _PROBEREQ_IE_OFFSET_;
|
||||
bssid->Reserved[0] = BSS_TYPE_PROB_REQ;
|
||||
} else {
|
||||
@ -2397,7 +2397,7 @@ void rtw_absorb_ssid_ifneed(_adapter *padapter, WLAN_BSSID_EX *bssid, u8 *pframe
|
||||
snetwork = &(scanned->network);
|
||||
/* scan queue records as Hidden SSID && Input frame is NOT Hidden SSID */
|
||||
if (hidden_ssid_ap(snetwork) && !hidden_ssid_ap(bssid)) {
|
||||
p = rtw_get_ie(snetwork->IEs+ie_offset, _SSID_IE_, &ssid_len_ori, snetwork->IELength-ie_offset);
|
||||
p = rtw_get_ie(snetwork->IEs+ie_offset, WLAN_EID_SSID, &ssid_len_ori, snetwork->IELength-ie_offset);
|
||||
if (!p) {
|
||||
_exit_critical_bh(&padapter->mlmepriv.scanned_queue.lock, &irqL);
|
||||
return;
|
||||
@ -2679,14 +2679,14 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
/* to update WMM paramter set while receiving beacon */
|
||||
if (_rtw_memcmp(pIE->data, WMM_PARA_OUI, 6) && pIE->Length == WLAN_WMM_LEN) /* WMM */
|
||||
(WMM_param_handler(padapter, pIE)) ? report_wmm_edca_update(padapter) : 0;
|
||||
|
||||
break;
|
||||
|
||||
case _HT_EXTRA_INFO_IE_: /* HT info */
|
||||
case WLAN_EID_HT_OPERATION: /* HT info */
|
||||
/* HT_info_handler(padapter, pIE); */
|
||||
bwmode_update_check(padapter, pIE);
|
||||
break;
|
||||
@ -2695,13 +2695,13 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
|
||||
rtw_process_vht_op_mode_notify(padapter, pIE->data, psta);
|
||||
break;
|
||||
#endif /* CONFIG_80211AC_VHT */
|
||||
case _ERPINFO_IE_:
|
||||
case WLAN_EID_ERP_INFO:
|
||||
ERP_IE_handler(padapter, pIE);
|
||||
VCS_update(padapter, psta);
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
case _EXT_CAP_IE_:
|
||||
case WLAN_EID_EXT_CAPABILITY :
|
||||
if (check_ap_tdls_prohibited(pIE->data, pIE->Length) == _TRUE)
|
||||
ptdlsinfo->ap_prohibited = _TRUE;
|
||||
if (check_ap_tdls_ch_switching_prohibited(pIE->data, pIE->Length) == _TRUE)
|
||||
@ -2813,12 +2813,12 @@ unsigned int is_ap_in_tkip(_adapter *padapter)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if ((_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4)) && (_rtw_memcmp((pIE->data + 12), WPA_TKIP_CIPHER, 4)))
|
||||
return _TRUE;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
if (_rtw_memcmp((pIE->data + 8), RSN_TKIP_CIPHER, 4))
|
||||
return _TRUE;
|
||||
|
||||
@ -2847,14 +2847,14 @@ unsigned int should_forbid_n_rate(_adapter *padapter)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(cur_network->IEs + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4) &&
|
||||
((_rtw_memcmp((pIE->data + 12), WPA_CIPHER_SUITE_CCMP, 4)) ||
|
||||
(_rtw_memcmp((pIE->data + 16), WPA_CIPHER_SUITE_CCMP, 4))))
|
||||
return _FALSE;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
if ((_rtw_memcmp((pIE->data + 8), RSN_CIPHER_SUITE_CCMP, 4)) ||
|
||||
(_rtw_memcmp((pIE->data + 12), RSN_CIPHER_SUITE_CCMP, 4)))
|
||||
return _FALSE;
|
||||
@ -2886,12 +2886,12 @@ unsigned int is_ap_in_wep(_adapter *padapter)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pmlmeinfo->network.IEs + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if (_rtw_memcmp(pIE->data, RTW_WPA_OUI, 4))
|
||||
return _FALSE;
|
||||
break;
|
||||
|
||||
case _RSN_IE_2_:
|
||||
case WLAN_EID_RSN:
|
||||
return _FALSE;
|
||||
|
||||
default:
|
||||
@ -3098,7 +3098,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
|
||||
pIE = (PNDIS_802_11_VARIABLE_IEs)(pframe + i);
|
||||
|
||||
switch (pIE->ElementID) {
|
||||
case _VENDOR_SPECIFIC_IE_:
|
||||
case WLAN_EID_VENDOR_SPECIFIC:
|
||||
if ((_rtw_memcmp(pIE->data, ARTHEROS_OUI1, 3)) || (_rtw_memcmp(pIE->data, ARTHEROS_OUI2, 3))) {
|
||||
RTW_INFO("link to Artheros AP\n");
|
||||
return HT_IOT_PEER_ATHEROS;
|
||||
@ -3462,7 +3462,7 @@ int rtw_ies_get_supported_rate(u8 *ies, uint ies_len, u8 *rate_set, u8 *rate_num
|
||||
return _FALSE;
|
||||
|
||||
*rate_num = 0;
|
||||
ie = rtw_get_ie(ies, _SUPPORTEDRATES_IE_, &ie_len, ies_len);
|
||||
ie = rtw_get_ie(ies, WLAN_EID_SUPP_RATES, &ie_len, ies_len);
|
||||
if (ie == NULL)
|
||||
goto ext_rate;
|
||||
|
||||
@ -3480,7 +3480,7 @@ int rtw_ies_get_supported_rate(u8 *ies, uint ies_len, u8 *rate_set, u8 *rate_num
|
||||
}
|
||||
|
||||
ext_rate:
|
||||
ie = rtw_get_ie(ies, _EXT_SUPPORTEDRATES_IE_, &ie_len, ies_len);
|
||||
ie = rtw_get_ie(ies, WLAN_EID_EXT_SUPP_RATES, &ie_len, ies_len);
|
||||
if (ie) {
|
||||
/* get valid extended supported rates */
|
||||
for (i = 0; i < 12; i++) {
|
||||
@ -4200,7 +4200,7 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
|
||||
memcpy(pwlanhdr->addr2, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN);
|
||||
|
||||
set_frame_sub_type(pframe, WIFI_BEACON);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
len = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -4222,25 +4222,25 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame)
|
||||
len += 2;
|
||||
|
||||
/* SSID */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &len);
|
||||
|
||||
/* supported rates... */
|
||||
rate_len = rtw_get_rateset_len(cur_network->SupportedRates);
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &len);
|
||||
|
||||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &len);
|
||||
|
||||
/* IBSS Parameter Set... */
|
||||
/* ATIMWindow = cur->Configuration.ATIMWindow; */
|
||||
ATIMWindow = 0;
|
||||
pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_IBSS_PARAMS, 2, (unsigned char *)(&ATIMWindow), &len);
|
||||
|
||||
/* todo: ERP IE */
|
||||
|
||||
/* EXTERNDED SUPPORTED RATE */
|
||||
if (rate_len > 8)
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &len);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (cur_network->SupportedRates + 8), &len);
|
||||
|
||||
if ((len + TXDESC_SIZE) > 256) {
|
||||
/* RTW_INFO("marc: beacon frame too large\n"); */
|
||||
|
@ -347,13 +347,6 @@ exit:
|
||||
return res;
|
||||
}
|
||||
|
||||
void rtw_mfree_xmit_priv_lock(struct xmit_priv *pxmitpriv);
|
||||
void rtw_mfree_xmit_priv_lock(struct xmit_priv *pxmitpriv)
|
||||
{
|
||||
_rtw_free_sema(&pxmitpriv->xmit_sema);
|
||||
}
|
||||
|
||||
|
||||
void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
|
||||
{
|
||||
int i;
|
||||
@ -364,8 +357,6 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
|
||||
|
||||
rtw_hal_free_xmit_priv(padapter);
|
||||
|
||||
rtw_mfree_xmit_priv_lock(pxmitpriv);
|
||||
|
||||
if (pxmitpriv->pxmit_frame_buf == NULL)
|
||||
goto out;
|
||||
|
||||
@ -1167,7 +1158,7 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
|
||||
#endif/*CONFIG_IP_R_MONITOR*/
|
||||
pattrib->priority = UserPriority;
|
||||
pattrib->hdrlen = WLAN_HDR_A3_QOS_LEN;
|
||||
pattrib->subtype = WIFI_QOS_DATA_TYPE;
|
||||
pattrib->subtype = (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
@ -1232,11 +1223,11 @@ s32 update_tdls_attrib(_adapter *padapter, struct pkt_attrib *pattrib)
|
||||
if (pqospriv->qos_option && psta->qos_option) {
|
||||
pattrib->priority = 4; /* tdls management frame should be AC_VI */
|
||||
pattrib->hdrlen = WLAN_HDR_A3_QOS_LEN;
|
||||
pattrib->subtype = WIFI_QOS_DATA_TYPE;
|
||||
pattrib->subtype = (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA);
|
||||
} else {
|
||||
pattrib->priority = 0;
|
||||
pattrib->hdrlen = WLAN_HDR_A3_LEN;
|
||||
pattrib->subtype = WIFI_DATA_TYPE;
|
||||
pattrib->subtype = IEEE80211_FTYPE_DATA;
|
||||
}
|
||||
|
||||
/* TODO:_lock */
|
||||
@ -1499,7 +1490,7 @@ get_sta_info:
|
||||
pattrib->pkt_hdrlen = ETH_HLEN;/* (pattrib->ether_type == 0x8100) ? (14 + 4 ): 14; */ /* vlan tag */
|
||||
|
||||
pattrib->hdrlen = WLAN_HDR_A3_LEN;
|
||||
pattrib->subtype = WIFI_DATA_TYPE;
|
||||
pattrib->subtype = IEEE80211_FTYPE_DATA;
|
||||
pattrib->qos_en = psta->qos_option;
|
||||
pattrib->priority = 0;
|
||||
|
||||
@ -1766,7 +1757,7 @@ s32 rtw_make_wlanhdr(_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
||||
|
||||
set_frame_sub_type(fctrl, pattrib->subtype);
|
||||
|
||||
if (pattrib->subtype & WIFI_DATA_TYPE) {
|
||||
if (pattrib->subtype & IEEE80211_FTYPE_DATA) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)) {
|
||||
#ifdef CONFIG_TDLS
|
||||
if (pattrib->direct_link == _TRUE) {
|
||||
@ -2805,9 +2796,9 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
||||
subtype = get_frame_sub_type(pframe); /* bit(7)~bit(2) */
|
||||
|
||||
/* check if robust mgmt frame */
|
||||
if (subtype != WIFI_DEAUTH && subtype != WIFI_DISASSOC && subtype != WIFI_ACTION)
|
||||
if (subtype != IEEE80211_STYPE_DEAUTH && subtype != IEEE80211_STYPE_DISASSOC && subtype != IEEE80211_STYPE_ACTION)
|
||||
return _SUCCESS;
|
||||
if (subtype == WIFI_ACTION) {
|
||||
if (subtype == IEEE80211_STYPE_ACTION) {
|
||||
category = *(pframe + sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
if (CATEGORY_IS_NON_ROBUST(category))
|
||||
return _SUCCESS;
|
||||
@ -2840,7 +2831,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
||||
_enter_critical_bh(&padapter->security_key_mutex, &irqL);
|
||||
|
||||
if (bmcst) {
|
||||
if (subtype == WIFI_ACTION && CATEGORY_IS_GROUP_PRIVACY(category)) {
|
||||
if (subtype == IEEE80211_STYPE_ACTION && CATEGORY_IS_GROUP_PRIVACY(category)) {
|
||||
/* broadcast group privacy action frame */
|
||||
#if DBG_MGMT_XMIT_COALESEC_DUMP
|
||||
RTW_INFO(FUNC_ADPT_FMT" broadcast gp action(%u)\n"
|
||||
@ -2875,11 +2866,11 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
||||
goto xmitframe_coalesce_success;
|
||||
|
||||
#if DBG_MGMT_XMIT_COALESEC_DUMP
|
||||
if (subtype == WIFI_DEAUTH)
|
||||
if (subtype == IEEE80211_STYPE_DEAUTH)
|
||||
RTW_INFO(FUNC_ADPT_FMT" braodcast deauth\n", FUNC_ADPT_ARG(padapter));
|
||||
else if (subtype == WIFI_DISASSOC)
|
||||
else if (subtype == IEEE80211_STYPE_DISASSOC)
|
||||
RTW_INFO(FUNC_ADPT_FMT" braodcast disassoc\n", FUNC_ADPT_ARG(padapter));
|
||||
else if (subtype == WIFI_ACTION) {
|
||||
else if (subtype == IEEE80211_STYPE_ACTION) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" braodcast action(%u)\n"
|
||||
, FUNC_ADPT_ARG(padapter), category);
|
||||
}
|
||||
@ -2897,7 +2888,7 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
||||
RTW_PUT_LE64(&MME[2], padapter->securitypriv.dot11wBIPtxpn.val);
|
||||
|
||||
/* add MME IE with MIC all zero, MME string doesn't include element id and length */
|
||||
pframe = rtw_set_ie(pframe, _MME_IE_ , 16 , MME, &(pattrib->pktlen));
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_MMIE , 16 , MME, &(pattrib->pktlen));
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
/* total frame length - header length */
|
||||
frame_body_len = pattrib->pktlen - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -2961,13 +2952,13 @@ s32 rtw_mgmt_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame
|
||||
else {
|
||||
/* unicast robust mgmt frame */
|
||||
#if DBG_MGMT_XMIT_COALESEC_DUMP
|
||||
if (subtype == WIFI_DEAUTH) {
|
||||
if (subtype == IEEE80211_STYPE_DEAUTH) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" unicast deauth to "MAC_FMT"\n"
|
||||
, FUNC_ADPT_ARG(padapter), MAC_ARG(pattrib->ra));
|
||||
} else if (subtype == WIFI_DISASSOC) {
|
||||
} else if (subtype == IEEE80211_STYPE_DISASSOC) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" unicast disassoc to "MAC_FMT"\n"
|
||||
, FUNC_ADPT_ARG(padapter), MAC_ARG(pattrib->ra));
|
||||
} else if (subtype == WIFI_ACTION) {
|
||||
} else if (subtype == IEEE80211_STYPE_ACTION) {
|
||||
RTW_INFO(FUNC_ADPT_FMT" unicast action(%u) to "MAC_FMT"\n"
|
||||
, FUNC_ADPT_ARG(padapter), category, MAC_ARG(pattrib->ra));
|
||||
}
|
||||
@ -3133,7 +3124,7 @@ void rtw_update_protection(_adapter *padapter, u8 *ie, uint ie_len)
|
||||
|
||||
case AUTO_VCS:
|
||||
default:
|
||||
perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len);
|
||||
perp = rtw_get_ie(ie, WLAN_EID_ERP_INFO, &erp_len, ie_len);
|
||||
if (perp == NULL)
|
||||
pxmitpriv->vcs = NONE_VCS;
|
||||
else {
|
||||
@ -3657,7 +3648,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue)
|
||||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
|
||||
pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
|
||||
|
||||
@ -3689,7 +3680,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
|
||||
xmitframe_phead = get_list_head(pframe_queue);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
/* xmitframe_plist = get_next(xmitframe_plist); */
|
||||
@ -3731,7 +3722,7 @@ static struct xmit_frame *get_one_xmitframe(struct xmit_priv *pxmitpriv, struct
|
||||
xmitframe_phead = get_list_head(pframe_queue);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
break;
|
||||
}
|
||||
@ -3774,7 +3765,7 @@ struct xmit_frame *rtw_get_xframe(struct xmit_priv *pxmitpriv, int *num_frame)
|
||||
sta_phead = get_list_head(phwxmit->sta_queue);
|
||||
sta_plist = get_next(sta_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(sta_phead, sta_plist)) == _FALSE) {
|
||||
while (sta_phead != sta_plist) {
|
||||
|
||||
ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
|
||||
pframe_queue = &ptxservq->sta_pending;
|
||||
@ -3840,7 +3831,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
||||
sta_phead = get_list_head(phwxmit->sta_queue);
|
||||
sta_plist = get_next(sta_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(sta_phead, sta_plist)) == _FALSE) {
|
||||
while (sta_phead != sta_plist) {
|
||||
|
||||
ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
|
||||
|
||||
@ -4543,14 +4534,14 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
||||
return -1;
|
||||
|
||||
if (start == 0)
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
|
||||
pxmitframe = rtw_alloc_xmitframe(pxmitpriv);
|
||||
|
||||
if (rtw_get_passing_time_ms(start) > 2000) {
|
||||
if (drop_cnt)
|
||||
RTW_INFO("DBG_TX_DROP_FRAME %s no more pxmitframe, drop_cnt:%u\n", __FUNCTION__, drop_cnt);
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
drop_cnt = 0;
|
||||
}
|
||||
|
||||
@ -4599,7 +4590,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
|
||||
_list *list = get_next(&b2u_list);
|
||||
struct xmit_frame *b2uframe;
|
||||
|
||||
while ((rtw_end_of_queue_search(&b2u_list, list)) == _FALSE) {
|
||||
while (&b2u_list != list) {
|
||||
b2uframe = LIST_CONTAINOR(list, struct xmit_frame, list);
|
||||
list = get_next(list);
|
||||
rtw_list_delete(&b2uframe->list);
|
||||
@ -4825,9 +4816,9 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
||||
/* RTW_INFO_DUMP("enqueue, tim=", pstapriv->tim_bitmap, pstapriv->aid_bmp_len); */
|
||||
if (update_tim == _TRUE) {
|
||||
if (is_broadcast_mac_addr(pattrib->ra))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer BC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "buffer BC");
|
||||
else
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer MC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "buffer MC");
|
||||
} else
|
||||
chk_bmc_sleepq_cmd(padapter);
|
||||
|
||||
@ -4894,7 +4885,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
|
||||
if (update_tim == _TRUE) {
|
||||
/* RTW_INFO("sleepq_len==1, update BCNTIM\n"); */
|
||||
/* upate BCN for TIM IE */
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "buffer UC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "buffer UC");
|
||||
}
|
||||
}
|
||||
|
||||
@ -4931,7 +4922,7 @@ static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_
|
||||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -5029,7 +5020,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
@ -5129,7 +5120,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
|
||||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
@ -5179,11 +5170,11 @@ _exit:
|
||||
if (update_mask) {
|
||||
/* update_BCNTIM(padapter); */
|
||||
if ((update_mask & (BIT(0) | BIT(1))) == (BIT(0) | BIT(1)))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear UC&BMC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "clear UC&BMC");
|
||||
else if ((update_mask & BIT(1)) == BIT(1))
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear BMC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "clear BMC");
|
||||
else
|
||||
_update_beacon(padapter, _TIM_IE_, NULL, _TRUE, "clear UC");
|
||||
_update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE, "clear UC");
|
||||
}
|
||||
|
||||
}
|
||||
@ -5204,7 +5195,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
@ -5261,7 +5252,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
|
||||
/* RTW_INFO_DUMP("update_BCNTIM, tim=", pstapriv->tim_bitmap, pstapriv->aid_bmp_len); */
|
||||
/* upate BCN for TIM IE */
|
||||
/* update_BCNTIM(padapter); */
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_DS_PARAMS, NULL, _TRUE);
|
||||
/* update_mask = BIT(0); */
|
||||
}
|
||||
|
||||
@ -5762,7 +5753,7 @@ u8 rtw_get_tx_desc_backup(_adapter *padapter, u8 hwq, struct rtw_tx_desc_backup
|
||||
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms)
|
||||
{
|
||||
sctx->timeout_ms = timeout_ms;
|
||||
sctx->submit_time = rtw_get_current_time();
|
||||
sctx->submit_time = jiffies;
|
||||
#ifdef PLATFORM_LINUX /* TODO: add condition wating interface for other os */
|
||||
init_completion(&sctx->done);
|
||||
#endif
|
||||
@ -5829,7 +5820,7 @@ int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms)
|
||||
{
|
||||
struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops;
|
||||
|
||||
pack_tx_ops->submit_time = rtw_get_current_time();
|
||||
pack_tx_ops->submit_time = jiffies;
|
||||
pack_tx_ops->timeout_ms = timeout_ms;
|
||||
pack_tx_ops->status = RTW_SCTX_SUBMITTED;
|
||||
|
||||
|
@ -394,7 +394,7 @@ void halbtcoutsrc_LeaveLowPower(PBTC_COEXIST pBtCoexist)
|
||||
if (GLBtcBtCoexAliveRegistered == _TRUE)
|
||||
return;
|
||||
|
||||
stime = rtw_get_current_time();
|
||||
stime = jiffies;
|
||||
do {
|
||||
ready = rtw_register_task_alive(padapter, BTCOEX_ALIVE);
|
||||
if (_SUCCESS == ready)
|
||||
@ -454,7 +454,7 @@ void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist)
|
||||
/* It can only be called after 8 seconds. */
|
||||
/* ===================================== */
|
||||
|
||||
curTime = rtw_systime_to_ms(rtw_get_current_time());
|
||||
curTime = jiffies_to_msecs(jiffies);
|
||||
if ((curTime - preTime) < HALBTCOUTSRC_AGG_CHK_WINDOW_IN_MS) /* over 8 seconds you can execute this function again. */
|
||||
return;
|
||||
else
|
||||
|
118
hal/hal_com.c
118
hal/hal_com.c
@ -1376,7 +1376,7 @@ int c2h_iqk_offload_wait(_adapter *adapter, u32 timeout_ms)
|
||||
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter);
|
||||
struct submit_ctx *iqk_sctx = &hal_data->iqk_sctx;
|
||||
|
||||
iqk_sctx->submit_time = rtw_get_current_time();
|
||||
iqk_sctx->submit_time = jiffies;
|
||||
iqk_sctx->timeout_ms = timeout_ms;
|
||||
iqk_sctx->status = RTW_SCTX_SUBMITTED;
|
||||
|
||||
@ -1536,7 +1536,7 @@ int hal_read_mac_hidden_rpt(_adapter *adapter)
|
||||
int ret = _FAIL;
|
||||
int ret_fwdl;
|
||||
u8 mac_hidden_rpt[MAC_HIDDEN_RPT_LEN + MAC_HIDDEN_RPT_2_LEN] = {0};
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
u32 cnt = 0;
|
||||
u32 timeout_ms = 800;
|
||||
u32 min_cnt = 10;
|
||||
@ -1562,7 +1562,7 @@ int hal_read_mac_hidden_rpt(_adapter *adapter)
|
||||
goto mac_hidden_rpt_hdl;
|
||||
|
||||
/* polling for data ready */
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
do {
|
||||
cnt++;
|
||||
id = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL);
|
||||
@ -2088,7 +2088,7 @@ if (padapter->registrypriv.ht_enable && is_supported_ht(padapter->registrypriv.w
|
||||
}
|
||||
}
|
||||
|
||||
tmp64 = rtw_ht_mcs_set_to_bitmap(psta->htpriv.ht_cap.supp_mcs_set, tx_nss);
|
||||
tmp64 = rtw_ht_mcs_set_to_bitmap(psta->htpriv.ht_cap.mcs.rx_mask, tx_nss);
|
||||
tx_ra_bitmap |= (tmp64 << 12);
|
||||
}
|
||||
}
|
||||
@ -2249,7 +2249,7 @@ u32 rtw_sec_read_cam(_adapter *adapter, u8 addr)
|
||||
|
||||
rtw_write32(adapter, REG_CAMCMD, CAM_POLLINIG | addr);
|
||||
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
while (1) {
|
||||
if (rtw_is_surprise_removed(adapter)) {
|
||||
sr = 1;
|
||||
@ -2265,7 +2265,7 @@ u32 rtw_sec_read_cam(_adapter *adapter, u8 addr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
end = rtw_get_current_time();
|
||||
end = jiffies;
|
||||
|
||||
rdata = rtw_read32(adapter, REG_CAMREAD);
|
||||
|
||||
@ -2292,7 +2292,7 @@ void rtw_sec_write_cam(_adapter *adapter, u8 addr, u32 wdata)
|
||||
rtw_write32(adapter, REG_CAMWRITE, wdata);
|
||||
rtw_write32(adapter, REG_CAMCMD, CAM_POLLINIG | CAM_WRITE | addr);
|
||||
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
while (1) {
|
||||
if (rtw_is_surprise_removed(adapter)) {
|
||||
sr = 1;
|
||||
@ -2308,7 +2308,7 @@ void rtw_sec_write_cam(_adapter *adapter, u8 addr, u32 wdata)
|
||||
break;
|
||||
}
|
||||
}
|
||||
end = rtw_get_current_time();
|
||||
end = jiffies;
|
||||
|
||||
_exit_critical_mutex(mutex, NULL);
|
||||
|
||||
@ -3366,7 +3366,7 @@ static void rtw_hal_tsf_update_pause(_adapter *adapter)
|
||||
|
||||
rtw_hal_set_tsf_update(iface, 0);
|
||||
if (iface->mlmeextpriv.tsf_update_required) {
|
||||
iface->mlmeextpriv.tsf_update_pause_stime = rtw_get_current_time();
|
||||
iface->mlmeextpriv.tsf_update_pause_stime = jiffies;
|
||||
if (!iface->mlmeextpriv.tsf_update_pause_stime)
|
||||
iface->mlmeextpriv.tsf_update_pause_stime++;
|
||||
}
|
||||
@ -3413,7 +3413,7 @@ void rtw_hal_periodic_tsf_update_chk(_adapter *adapter)
|
||||
u32 restore_ms = 0;
|
||||
|
||||
if (dvobj->periodic_tsf_update_etime) {
|
||||
if (rtw_time_after(rtw_get_current_time(), dvobj->periodic_tsf_update_etime)) {
|
||||
if (rtw_time_after(jiffies, dvobj->periodic_tsf_update_etime)) {
|
||||
/* end for restore status */
|
||||
dvobj->periodic_tsf_update_etime = 0;
|
||||
rtw_hal_rcr_set_chk_bssid(adapter, MLME_ACTION_NONE);
|
||||
@ -3448,7 +3448,7 @@ void rtw_hal_periodic_tsf_update_chk(_adapter *adapter)
|
||||
if (!restore_ms)
|
||||
return;
|
||||
|
||||
dvobj->periodic_tsf_update_etime = rtw_get_current_time() + rtw_ms_to_systime(restore_ms);
|
||||
dvobj->periodic_tsf_update_etime = jiffies + msecs_to_jiffies(restore_ms);
|
||||
if (!dvobj->periodic_tsf_update_etime)
|
||||
dvobj->periodic_tsf_update_etime++;
|
||||
|
||||
@ -5994,7 +5994,7 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
|
||||
|
||||
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
|
||||
/* pmlmeext->mgnt_seq++; */
|
||||
set_frame_sub_type(pframe, WIFI_BEACON);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -6174,14 +6174,14 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
|
||||
pktlen += 2;
|
||||
|
||||
/* SSID */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen);
|
||||
|
||||
/* supported rates... */
|
||||
rate_len = rtw_get_rateset_len(cur_network->SupportedRates);
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen);
|
||||
|
||||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
|
||||
/* if( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) */
|
||||
{
|
||||
@ -6190,16 +6190,16 @@ static void rtw_hal_construct_P2PBeacon(_adapter *padapter, u8 *pframe, u32 *pLe
|
||||
/* IBSS Parameter Set... */
|
||||
/* ATIMWindow = cur->Configuration.ATIMWindow; */
|
||||
ATIMWindow = 0;
|
||||
pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_IBSS_PARAMS, 2, (unsigned char *)(&ATIMWindow), &pktlen);
|
||||
|
||||
/* ERP IE */
|
||||
pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_ERP_INFO, 1, &erpinfo, &pktlen);
|
||||
}
|
||||
|
||||
|
||||
/* EXTERNDED SUPPORTED RATE */
|
||||
if (rate_len > 8)
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen);
|
||||
|
||||
|
||||
/* todo:HT for adhoc */
|
||||
@ -6273,7 +6273,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
|
||||
memcpy(pwlanhdr->addr3, mac, ETH_ALEN);
|
||||
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
set_frame_sub_type(fctrl, WIFI_PROBERSP);
|
||||
set_frame_sub_type(fctrl, IEEE80211_STYPE_PROBE_RESP);
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pframe += pktlen;
|
||||
@ -6299,14 +6299,14 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
|
||||
|
||||
|
||||
/* SSID */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, 7, pwdinfo->p2p_wildcard_ssid, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, 7, pwdinfo->p2p_wildcard_ssid, &pktlen);
|
||||
|
||||
/* supported rates... */
|
||||
/* Use the OFDM rate in the P2P probe response frame. ( 6(B), 9(B), 12, 18, 24, 36, 48, 54 ) */
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, pwdinfo->support_rate, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, 8, pwdinfo->support_rate, &pktlen);
|
||||
|
||||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&pwdinfo->listen_channel, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&pwdinfo->listen_channel, &pktlen);
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (pwdinfo->driver_interface == DRIVER_CFG80211) {
|
||||
@ -6520,7 +6520,7 @@ static void rtw_hal_construct_P2PProbeRsp(_adapter *padapter, u8 *pframe, u32 *p
|
||||
wpsielen += 2;
|
||||
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
|
||||
|
||||
p2pielen = build_probe_resp_p2p_ie(pwdinfo, pframe);
|
||||
@ -6596,7 +6596,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pframe += pktlen;
|
||||
@ -6648,7 +6648,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(WPS_DPID_PBC);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
|
||||
|
||||
/* P2P IE Section. */
|
||||
@ -6930,7 +6930,7 @@ static void rtw_hal_construct_P2PNegoRsp(_adapter *padapter, u8 *pframe, u32 *pL
|
||||
|
||||
}
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &pktlen);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_nego_resp_wfd_ie(pwdinfo, pframe);
|
||||
@ -6997,7 +6997,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
|
||||
memset(pwlanhdr->addr3, 0, ETH_ALEN);
|
||||
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -7175,7 +7175,7 @@ static void rtw_hal_construct_P2PInviteRsp(_adapter *padapter, u8 *pframe, u32 *
|
||||
}
|
||||
#endif
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2pie, &pktlen);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_invitation_resp_wfd_ie(pwdinfo, pframe);
|
||||
@ -7240,7 +7240,7 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe,
|
||||
memcpy(pwlanhdr->addr3, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -7288,7 +7288,7 @@ static void rtw_hal_construct_P2PProvisionDisRsp(_adapter *padapter, u8 *pframe,
|
||||
RTW_PUT_BE16(wpsie + wpsielen, WPS_CM_PUSH_BUTTON);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pktlen);
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_provdisc_resp_wfd_ie(pwdinfo, pframe);
|
||||
@ -7405,7 +7405,7 @@ void rtw_hal_construct_beacon(_adapter *padapter,
|
||||
|
||||
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
|
||||
/* pmlmeext->mgnt_seq++; */
|
||||
set_frame_sub_type(pframe, WIFI_BEACON);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_BEACON);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -7438,21 +7438,21 @@ void rtw_hal_construct_beacon(_adapter *padapter,
|
||||
/* below for ad-hoc mode */
|
||||
|
||||
/* SSID */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen);
|
||||
|
||||
/* supported rates... */
|
||||
rate_len = rtw_get_rateset_len(cur_network->SupportedRates);
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen);
|
||||
|
||||
/* DS parameter set */
|
||||
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen);
|
||||
|
||||
if ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) {
|
||||
u32 ATIMWindow;
|
||||
/* IBSS Parameter Set... */
|
||||
/* ATIMWindow = cur->Configuration.ATIMWindow; */
|
||||
ATIMWindow = 0;
|
||||
pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_IBSS_PARAMS, 2, (unsigned char *)(&ATIMWindow), &pktlen);
|
||||
}
|
||||
|
||||
|
||||
@ -7461,7 +7461,7 @@ void rtw_hal_construct_beacon(_adapter *padapter,
|
||||
|
||||
/* EXTERNDED SUPPORTED RATE */
|
||||
if (rate_len > 8)
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen);
|
||||
|
||||
/* todo:HT for adhoc */
|
||||
#endif
|
||||
@ -7498,7 +7498,7 @@ static void rtw_hal_construct_PSPoll(_adapter *padapter,
|
||||
fctrl = &(pwlanhdr->frame_ctl);
|
||||
*(fctrl) = 0;
|
||||
SetPwrMgt(fctrl);
|
||||
set_frame_sub_type(pframe, WIFI_PSPOLL);
|
||||
set_frame_sub_type(pframe, (IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL));
|
||||
|
||||
/* AID. */
|
||||
set_duration(pframe, (pmlmeinfo->aid | 0xc000));
|
||||
@ -7542,7 +7542,7 @@ void rtw_hal_construct_fw_dbg_msg_pkt(
|
||||
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
|
||||
set_frame_sub_type(pframe, WIFI_DATA);
|
||||
set_frame_sub_type(pframe, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA));
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
||||
@ -7611,7 +7611,7 @@ void rtw_hal_construct_NullFunctionData(
|
||||
if (bQoS == _TRUE) {
|
||||
struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr;
|
||||
|
||||
set_frame_sub_type(pframe, WIFI_QOS_DATA_NULL);
|
||||
set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
|
||||
|
||||
pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe;
|
||||
SetPriority(&pwlanqoshdr->qc, AC);
|
||||
@ -7619,7 +7619,7 @@ void rtw_hal_construct_NullFunctionData(
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos);
|
||||
} else {
|
||||
set_frame_sub_type(pframe, WIFI_DATA_NULL);
|
||||
set_frame_sub_type(pframe, IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC);
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
}
|
||||
@ -7653,7 +7653,7 @@ void rtw_hal_construct_ProbeRsp(_adapter *padapter, u8 *pframe, u32 *pLength,
|
||||
memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
|
||||
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
set_frame_sub_type(fctrl, WIFI_PROBERSP);
|
||||
set_frame_sub_type(fctrl, IEEE80211_STYPE_PROBE_RESP);
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pframe += pktlen;
|
||||
@ -7749,7 +7749,7 @@ static void rtw_hal_construct_ARPRsp(
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* MAC Header. */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
SetFrameType(fctrl, WIFI_DATA);
|
||||
SetFrameType(fctrl, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA));
|
||||
/* set_frame_sub_type(fctrl, 0); */
|
||||
SetToDs(fctrl);
|
||||
memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||
@ -7883,7 +7883,7 @@ static void rtw_hal_construct_na_message(_adapter *padapter,
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* MAC Header. */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
SetFrameType(fctrl, WIFI_DATA);
|
||||
SetFrameType(fctrl, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA));
|
||||
SetToDs(fctrl);
|
||||
memcpy(pwlanhdr->addr1,
|
||||
get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN);
|
||||
@ -8054,25 +8054,25 @@ static void rtw_hal_construct_ProbeReq(_adapter *padapter, u8 *pframe,
|
||||
memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
|
||||
|
||||
SetSeqNum(pwlanhdr, 0);
|
||||
set_frame_sub_type(pframe, WIFI_PROBEREQ);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_PROBE_REQ);
|
||||
|
||||
pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pframe += pktlen;
|
||||
|
||||
if (ssid == NULL)
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, 0, NULL, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, 0, NULL, &pktlen);
|
||||
else {
|
||||
/* RTW_INFO("%s len:%d\n", ssid->SSID, ssid->SSID_len); */
|
||||
pframe = rtw_set_ie(pframe, _SSID_IE_, ssid->SSID_len, ssid->SSID, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, ssid->SSID_len, ssid->SSID, &pktlen);
|
||||
}
|
||||
|
||||
get_rate_set(padapter, bssrate, &bssrate_len);
|
||||
|
||||
if (bssrate_len > 8) {
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES , 8, bssrate, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES , (bssrate_len - 8), (bssrate + 8), &pktlen);
|
||||
} else
|
||||
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES , bssrate_len , bssrate, &pktlen);
|
||||
|
||||
*pLength = pktlen;
|
||||
}
|
||||
@ -8232,7 +8232,7 @@ static void rtw_hal_construct_GTKRsp(
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* MAC Header. */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
SetFrameType(fctrl, WIFI_DATA);
|
||||
SetFrameType(fctrl, (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA));
|
||||
/* set_frame_sub_type(fctrl, 0); */
|
||||
SetToDs(fctrl);
|
||||
|
||||
@ -9280,7 +9280,7 @@ static u32 _rtw_wow_pattern_read_cam(_adapter *adapter, u8 addr)
|
||||
|
||||
rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_ADDR_V2(addr));
|
||||
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
while (1) {
|
||||
if (rtw_is_surprise_removed(adapter))
|
||||
break;
|
||||
@ -9351,7 +9351,7 @@ static void _rtw_wow_pattern_write_cam(_adapter *adapter, u8 addr, u32 wdata)
|
||||
rtw_write32(adapter, REG_WKFMCAM_RWD, wdata);
|
||||
rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_WE | BIT_WKFCAM_ADDR_V2(addr));
|
||||
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
while (1) {
|
||||
if (rtw_is_surprise_removed(adapter))
|
||||
break;
|
||||
@ -9365,7 +9365,7 @@ static void _rtw_wow_pattern_write_cam(_adapter *adapter, u8 addr, u32 wdata)
|
||||
break;
|
||||
}
|
||||
}
|
||||
end = rtw_get_current_time();
|
||||
end = jiffies;
|
||||
|
||||
_exit_critical_mutex(mutex, NULL);
|
||||
|
||||
@ -9418,7 +9418,7 @@ static u8 _rtw_wow_pattern_clean_cam(_adapter *adapter)
|
||||
_enter_critical_mutex(mutex, NULL);
|
||||
rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_CLR_V1);
|
||||
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
while (1) {
|
||||
if (rtw_is_surprise_removed(adapter))
|
||||
break;
|
||||
@ -12442,7 +12442,7 @@ void rtw_dump_rx_dframe_info(_adapter *padapter, void *sel)
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
plist = get_next(plist);
|
||||
@ -12523,9 +12523,9 @@ void rtw_store_phy_info(_adapter *padapter, union recv_frame *prframe)
|
||||
}
|
||||
}
|
||||
#ifdef DBG_RX_DFRAME_RAW_DATA
|
||||
if ((dframe_type == WIFI_DATA_TYPE) || (dframe_type == WIFI_QOS_DATA_TYPE) || (padapter->registrypriv.mp_mode == 1)) {
|
||||
if ((dframe_type == IEEE80211_FTYPE_DATA) || (dframe_type == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) || (padapter->registrypriv.mp_mode == 1)) {
|
||||
|
||||
/*RTW_INFO("=>%s WIFI_DATA_TYPE or WIFI_QOS_DATA_TYPE\n", __FUNCTION__);*/
|
||||
/*RTW_INFO("=>%s IEEE80211_FTYPE_DATA or (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)\n", __FUNCTION__);*/
|
||||
if (psta) {
|
||||
if (is_multicast_ether_addr(get_ra(get_recvframe_data(prframe))))
|
||||
psta_dframe_info = &psta->sta_dframe_info_bmc;
|
||||
@ -14424,7 +14424,7 @@ u8 rtw_ap_bcn_recovery(_adapter *padapter)
|
||||
#ifdef CONFIG_BCN_XMIT_PROTECT
|
||||
u8 rtw_ap_bcn_queue_empty_check(_adapter *padapter, u32 txbcn_timer_ms)
|
||||
{
|
||||
u32 start_time = rtw_get_current_time();
|
||||
u32 start_time = jiffies;
|
||||
u8 bcn_queue_empty = _FALSE;
|
||||
|
||||
do {
|
||||
@ -14585,7 +14585,7 @@ u8 * rtw_hal_set_8812a_vendor_ie(_adapter *padapter , u8 *pframe ,uint *frlen )
|
||||
vendor_info[6] = RT_HT_CAP_USE_JAGUAR_CCUT;
|
||||
else
|
||||
vendor_info[6] = RT_HT_CAP_USE_JAGUAR_BCUT;
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_,vender_len,vendor_info , frlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC,vender_len,vendor_info , frlen);
|
||||
|
||||
return pframe;
|
||||
}
|
||||
|
@ -2960,7 +2960,7 @@ s8 phy_get_txpwr_lmt_abs(
|
||||
lmt = hal_spec->txgi_max;
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
if (ent->lmt_2g[bw][tlrs][ch_idx][ntx_idx] != ww_lmt_val)
|
||||
@ -2979,7 +2979,7 @@ s8 phy_get_txpwr_lmt_abs(
|
||||
lmt = hal_spec->txgi_max;
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
if (ent->lmt_5g[bw][tlrs - 1][ch_idx][ntx_idx] != ww_lmt_val)
|
||||
@ -3174,7 +3174,7 @@ static void phy_txpwr_lmt_cck_ofdm_mt_chk(_adapter *adapter)
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
|
||||
@ -3245,7 +3245,7 @@ static void phy_txpwr_lmt_cross_ref_ht_vht(_adapter *adapter)
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
|
||||
@ -3427,7 +3427,7 @@ void phy_txpwr_limit_bandwidth_chk(_adapter *adapter)
|
||||
|
||||
head = &rfctl->txpwr_lmt_list;
|
||||
cur = get_next(head);
|
||||
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) {
|
||||
while (head != cur) {
|
||||
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
|
||||
cur = get_next(cur);
|
||||
|
||||
|
@ -38,7 +38,7 @@ static void _rtw_bss_nums_count(_adapter *adapter, u8 *pbss_nums)
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
|
@ -3150,7 +3150,7 @@ static int _cpu_sleep(struct dvobj_priv *d, u32 timeout)
|
||||
mac = dvobj_to_halmac(d);
|
||||
api = HALMAC_GET_API(mac);
|
||||
|
||||
start_t = rtw_get_current_time();
|
||||
start_t = jiffies;
|
||||
|
||||
status = _enter_cpu_sleep_mode(d);
|
||||
if (status != HALMAC_RET_SUCCESS) {
|
||||
@ -3650,7 +3650,7 @@ int rtw_halmac_txfifo_wait_empty(struct dvobj_priv *d, u32 timeout)
|
||||
|
||||
|
||||
a = dvobj_get_primary_adapter(d);
|
||||
start_time = rtw_get_current_time();
|
||||
start_time = jiffies;
|
||||
|
||||
do {
|
||||
cnt++;
|
||||
|
@ -54,7 +54,7 @@ u8 rtw_hal_read_chip_info(_adapter *padapter)
|
||||
{
|
||||
u8 rtn = _SUCCESS;
|
||||
u8 hci_type = rtw_get_intf_type(padapter);
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
|
||||
/* before access eFuse, make sure card enable has been called */
|
||||
if ((hci_type == RTW_SDIO || hci_type == RTW_GSPI)
|
||||
@ -472,7 +472,7 @@ s32 rtw_hal_fw_dl(_adapter *padapter, u8 wowlan)
|
||||
#ifdef RTW_HALMAC
|
||||
s32 rtw_hal_fw_mem_dl(_adapter *padapter, enum fw_mem mem)
|
||||
{
|
||||
systime dlfw_start_time = rtw_get_current_time();
|
||||
systime dlfw_start_time = jiffies;
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
struct debug_priv *pdbgpriv = &dvobj->drv_dbg;
|
||||
s32 rst = _FALSE;
|
||||
|
@ -132,7 +132,7 @@ static void rtw_hal_mcc_build_p2p_noa_attr(PADAPTER padapter, u8 *ie, u32 *ie_le
|
||||
, p2p_noa_attr_ie[p2p_noa_attr_len + 3]);
|
||||
|
||||
p2p_noa_attr_len = p2p_noa_attr_len + 4;
|
||||
rtw_set_ie(ie, _VENDOR_SPECIFIC_IE_, p2p_noa_attr_len, (u8 *)p2p_noa_attr_ie, ie_len);
|
||||
rtw_set_ie(ie, WLAN_EID_VENDOR_SPECIFIC, p2p_noa_attr_len, (u8 *)p2p_noa_attr_ie, ie_len);
|
||||
}
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ static void rtw_hal_mcc_update_go_p2p_ie(PADAPTER padapter)
|
||||
RTW_INFO("p2p_go_noa_ie_len:%d\n", pmccadapriv->p2p_go_noa_ie_len);
|
||||
RTW_INFO_DUMP("\n", pmccadapriv->p2p_go_noa_ie, pmccadapriv->p2p_go_noa_ie_len);
|
||||
}
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_VENDOR_SPECIFIC, P2P_OUI, _TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -200,7 +200,7 @@ static void rtw_hal_mcc_remove_go_p2p_ie(PADAPTER padapter)
|
||||
return;
|
||||
|
||||
pmccadapriv->p2p_go_noa_ie_len = 0;
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, P2P_OUI, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_VENDOR_SPECIFIC, P2P_OUI, _TRUE);
|
||||
}
|
||||
|
||||
/* restore IQK value for all interface */
|
||||
@ -459,7 +459,7 @@ static void rtw_hal_config_mcc_role_setting(PADAPTER padapter, u8 order)
|
||||
plist = get_next(phead);
|
||||
pmccadapriv->mcc_macid_bitmap = 0;
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
plist = get_next(plist);
|
||||
pmccadapriv->mcc_macid_bitmap |= BIT(psta->cmn.mac_id);
|
||||
@ -2249,7 +2249,7 @@ static u8 rtw_hal_set_mcc_setting(PADAPTER padapter, u8 status)
|
||||
u8 ret = _FAIL;
|
||||
struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv);
|
||||
u8 stop = (status < MCC_SETCMD_STATUS_START_CONNECT) ? _TRUE : _FALSE;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
u32 start_time = jiffies;
|
||||
|
||||
RTW_INFO("===> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
|
||||
|
||||
@ -2538,7 +2538,7 @@ void rtw_hal_mcc_c2h_handler(PADAPTER padapter, u8 buflen, u8 *tmpBuf)
|
||||
case MCC_RPT_READY:
|
||||
_enter_critical_bh(&pmccobjpriv->mcc_lock, &irqL);
|
||||
/* initialize counter & time */
|
||||
pmccobjpriv->mcc_launch_time = rtw_get_current_time();
|
||||
pmccobjpriv->mcc_launch_time = jiffies;
|
||||
pmccobjpriv->mcc_c2h_status = MCC_RPT_READY;
|
||||
pmccobjpriv->cur_mcc_success_cnt = 0;
|
||||
pmccobjpriv->prev_mcc_success_cnt = 0;
|
||||
@ -3236,7 +3236,7 @@ void rtw_hal_mcc_issue_null_data(_adapter *padapter, u8 chbw_allow, u8 ps_mode)
|
||||
{
|
||||
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
|
||||
_adapter *iface = NULL;
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
u8 i = 0;
|
||||
|
||||
if (!MCC_EN(padapter))
|
||||
|
@ -1059,17 +1059,17 @@ u8 phydm_c2H_content_parsing(void *dm_void, u8 c2h_cmd_id, u8 c2h_cmd_len,
|
||||
u64 odm_get_current_time(struct dm_struct *dm)
|
||||
{
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
|
||||
return (u64)rtw_get_current_time();
|
||||
return (u64)jiffies;
|
||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211)
|
||||
return jiffies;
|
||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2)
|
||||
return jiffies;
|
||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
|
||||
return rtw_get_current_time();
|
||||
return jiffies;
|
||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_WIN)
|
||||
return PlatformGetCurrentTime();
|
||||
#elif (DM_ODM_SUPPORT_TYPE & ODM_IOT)
|
||||
return rtw_get_current_time();
|
||||
return jiffies;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ s32 InitLLTTable8192E(PADAPTER padapter, u8 txpktbuf_bndy)
|
||||
value32 = rtw_read32(padapter, REG_AUTO_LLT);
|
||||
|
||||
rtw_write32(padapter, REG_AUTO_LLT, value32 | BIT_AUTO_INIT_LLT);
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
while (((value32 = rtw_read32(padapter, REG_AUTO_LLT)) & BIT_AUTO_INIT_LLT)
|
||||
&& ((passing_time = rtw_get_passing_time_ms(start)) < 1000)
|
||||
)
|
||||
@ -367,7 +367,7 @@ static s32 polling_fwdl_chksum(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
|
||||
{
|
||||
s32 ret = _FAIL;
|
||||
u32 value32;
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
u32 cnt = 0;
|
||||
|
||||
/* polling CheckSum report */
|
||||
@ -398,7 +398,7 @@ static s32 _FWFreeToGo8192E(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
|
||||
{
|
||||
s32 ret = _FAIL;
|
||||
u32 value32;
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
u32 cnt = 0;
|
||||
|
||||
value32 = rtw_read32(adapter, REG_MCUFWDL);
|
||||
@ -554,7 +554,7 @@ FirmwareDownload8192E(
|
||||
}
|
||||
|
||||
_FWDownloadEnable_8192E(Adapter, _TRUE);
|
||||
fwdl_start_time = rtw_get_current_time();
|
||||
fwdl_start_time = jiffies;
|
||||
while (!RTW_CANNOT_IO(Adapter)
|
||||
&& (write_fw++ < 3 || rtw_get_passing_time_ms(fwdl_start_time) < 500)) {
|
||||
/* reset FWDL chksum */
|
||||
@ -3963,7 +3963,7 @@ u8 SetHwReg8192E(PADAPTER Adapter, u8 variable, u8 *val)
|
||||
u16 val16;
|
||||
u32 reg_200 = 0, reg_204 = 0, reg_214 = 0;
|
||||
u32 init_reg_200 = 0, init_reg_204 = 0, init_reg_214 = 0;
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
u32 pass_ms;
|
||||
int i = 0;
|
||||
|
||||
@ -4509,7 +4509,7 @@ GetHalDefVar8192E(
|
||||
*((u32 *)pValue) = 8;
|
||||
break;
|
||||
case HW_VAR_BEST_AMPDU_DENSITY:
|
||||
*((u32 *)pValue) = AMPDU_DENSITY_VALUE_7;
|
||||
*((u32 *)pValue) = IEEE80211_HT_MPDU_DENSITY_16;
|
||||
break;
|
||||
default:
|
||||
bResult = GetHalDefVar(Adapter, eVariable, pValue);
|
||||
|
@ -38,7 +38,7 @@ void rtl8192e_sreset_xmit_status_check(_adapter *padapter)
|
||||
/* total xmit irp = 4 */
|
||||
/* RTW_INFO("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__FUNCTION__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt); */
|
||||
/* if(pxmitpriv->txirp_cnt == NR_XMITBUFF+1) */
|
||||
current_time = rtw_get_current_time();
|
||||
current_time = jiffies;
|
||||
|
||||
if (0 == pxmitpriv->free_xmitbuf_cnt || 0 == pxmitpriv->free_xmit_extbuf_cnt) {
|
||||
|
||||
|
@ -568,12 +568,12 @@ s32 rtl8192eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
||||
|
||||
sta_phead = get_list_head(phwxmit->sta_queue);
|
||||
sta_plist = get_next(sta_phead);
|
||||
single_sta_in_queue = rtw_end_of_queue_search(sta_phead, get_next(sta_plist));
|
||||
single_sta_in_queue = (sta_phead == get_next(sta_plist));
|
||||
|
||||
xmitframe_phead = get_list_head(&ptxservq->sta_pending);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == _FALSE) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
|
@ -693,7 +693,7 @@ u32 rtl8192eu_hal_init(PADAPTER Adapter)
|
||||
rt_rf_power_state eRfPowerStateToSet;
|
||||
|
||||
|
||||
systime init_start_time = rtw_get_current_time();
|
||||
systime init_start_time = jiffies;
|
||||
|
||||
|
||||
#ifdef DBG_HAL_INIT_PROFILING
|
||||
@ -763,7 +763,7 @@ u32 rtl8192eu_hal_init(PADAPTER Adapter)
|
||||
for (hal_init_profiling_i = 0; hal_init_profiling_i < HAL_INIT_STAGES_NUM; hal_init_profiling_i++)
|
||||
hal_init_stages_timestamp[hal_init_profiling_i] = 0;
|
||||
|
||||
#define HAL_INIT_PROFILE_TAG(stage) do { hal_init_stages_timestamp[(stage)] = rtw_get_current_time(); } while (0)
|
||||
#define HAL_INIT_PROFILE_TAG(stage) do { hal_init_stages_timestamp[(stage)] = jiffies; } while (0)
|
||||
#else
|
||||
#define HAL_INIT_PROFILE_TAG(stage) do {} while (0)
|
||||
#endif /* DBG_HAL_INIT_PROFILING */
|
||||
@ -1123,7 +1123,7 @@ exit:
|
||||
RTW_INFO("%s in %dms\n", __FUNCTION__, rtw_get_passing_time_ms(init_start_time));
|
||||
|
||||
#ifdef DBG_HAL_INIT_PROFILING
|
||||
hal_init_stages_timestamp[HAL_INIT_STAGES_END] = rtw_get_current_time();
|
||||
hal_init_stages_timestamp[HAL_INIT_STAGES_END] = jiffies;
|
||||
|
||||
for (hal_init_profiling_i = 0; hal_init_profiling_i < HAL_INIT_STAGES_NUM - 1; hal_init_profiling_i++) {
|
||||
RTW_INFO("DBG_HAL_INIT_PROFILING: %35s, %u, %5u, %5u\n"
|
||||
@ -1710,7 +1710,7 @@ GetHalDefVar8192EUsb(
|
||||
switch (eVariable) {
|
||||
|
||||
case HW_VAR_MAX_RX_AMPDU_FACTOR:
|
||||
*((u32 *)pValue) = MAX_AMPDU_FACTOR_64K; /* MAX_AMPDU_FACTOR_64K; */
|
||||
*((u32 *)pValue) = IEEE80211_HT_MAX_AMPDU_64K; /* IEEE80211_HT_MAX_AMPDU_64K; */
|
||||
break;
|
||||
default:
|
||||
GetHalDefVar8192E(Adapter, eVariable, pValue);
|
||||
|
@ -50,7 +50,7 @@ void interrupt_handler_8192eu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
|
||||
if (pHalData->IntArray[0] & IMR_BCNDMAINT0_88E) {
|
||||
struct tdls_ch_switch *pchsw_info = &padapter->tdlsinfo.chsw_info;
|
||||
u32 last_time = pchsw_info->cur_time;
|
||||
pchsw_info->cur_time = rtw_systime_to_ms(rtw_get_current_time());
|
||||
pchsw_info->cur_time = jiffies_to_msecs(jiffies);
|
||||
if ((atomic_read(&pchsw_info->chsw_on) == _TRUE) &&
|
||||
/* Sometimes we receive multiple interrupts in very little time period, use the follow condition test to filter */
|
||||
(pchsw_info->cur_time - last_time > padapter->mlmeextpriv.mlmext_info.bcn_interval - 5) &&
|
||||
|
@ -907,8 +907,8 @@ struct rf_ctl_t {
|
||||
#define RTW_CAC_STOPPED 0
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
#define IS_CAC_STOPPED(rfctl) ((rfctl)->cac_end_time == RTW_CAC_STOPPED)
|
||||
#define IS_CH_WAITING(rfctl) (!IS_CAC_STOPPED(rfctl) && rtw_time_after((rfctl)->cac_end_time, rtw_get_current_time()))
|
||||
#define IS_UNDER_CAC(rfctl) (IS_CH_WAITING(rfctl) && rtw_time_after(rtw_get_current_time(), (rfctl)->cac_start_time))
|
||||
#define IS_CH_WAITING(rfctl) (!IS_CAC_STOPPED(rfctl) && rtw_time_after((rfctl)->cac_end_time, jiffies))
|
||||
#define IS_UNDER_CAC(rfctl) (IS_CH_WAITING(rfctl) && rtw_time_after(jiffies, (rfctl)->cac_start_time))
|
||||
#define IS_RADAR_DETECTED(rfctl) ((rfctl)->radar_detected)
|
||||
#else
|
||||
#define IS_CAC_STOPPED(rfctl) 1
|
||||
|
@ -343,7 +343,7 @@ typedef struct ieee_param {
|
||||
u16 capability;
|
||||
int flags;
|
||||
u8 tx_supp_rates[16];
|
||||
struct rtw_ieee80211_ht_cap ht_cap;
|
||||
struct ieee80211_ht_cap ht_cap;
|
||||
} add_sta;
|
||||
struct {
|
||||
u8 reserved[2];/* for set max_num_sta */
|
||||
@ -368,7 +368,7 @@ struct sta_data {
|
||||
u32 sta_set;
|
||||
u8 tx_supp_rates[16];
|
||||
u32 tx_supp_rates_len;
|
||||
struct rtw_ieee80211_ht_cap ht_cap;
|
||||
struct ieee80211_ht_cap ht_cap;
|
||||
u64 rx_pkts;
|
||||
u64 rx_bytes;
|
||||
u64 rx_drops;
|
||||
@ -1550,8 +1550,6 @@ enum rtw_ieee80211_wnm_actioncode {
|
||||
};
|
||||
#endif
|
||||
|
||||
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
|
||||
* 00:50:F2 */
|
||||
#define WME_OUI_TYPE 2
|
||||
|
||||
#define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0
|
||||
|
@ -260,7 +260,6 @@ void rtw_hlist_add_head_rcu(rtw_hlist_node *n, rtw_hlist_head *h);
|
||||
void rtw_hlist_del_rcu(rtw_hlist_node *n);
|
||||
|
||||
extern void _rtw_init_sema(_sema *sema, int init_val);
|
||||
extern void _rtw_free_sema(_sema *sema);
|
||||
extern void _rtw_up_sema(_sema *sema);
|
||||
extern u32 _rtw_down_sema(_sema *sema);
|
||||
extern void _rtw_mutex_init(_mutex *pmutex);
|
||||
@ -274,32 +273,19 @@ extern void _rtw_spinunlock_ex(_lock *plock);
|
||||
extern void _rtw_init_queue(_queue *pqueue);
|
||||
extern void _rtw_deinit_queue(_queue *pqueue);
|
||||
extern u32 _rtw_queue_empty(_queue *pqueue);
|
||||
extern u32 rtw_end_of_queue_search(_list *queue, _list *pelement);
|
||||
|
||||
extern systime _rtw_get_current_time(void);
|
||||
extern u32 _rtw_systime_to_ms(systime stime);
|
||||
extern systime _rtw_ms_to_systime(u32 ms);
|
||||
extern systime _rtw_us_to_systime(u32 us);
|
||||
extern s32 _rtw_get_passing_time_ms(systime start);
|
||||
extern s32 _rtw_get_remaining_time_ms(systime end);
|
||||
extern s32 _rtw_get_time_interval_ms(systime start, systime end);
|
||||
extern bool _rtw_time_after(systime a, systime b);
|
||||
|
||||
#ifdef DBG_SYSTIME
|
||||
#define rtw_get_current_time() ({systime __stime = _rtw_get_current_time(); __stime;})
|
||||
#define rtw_systime_to_ms(stime) ({u32 __ms = _rtw_systime_to_ms(stime); typecheck(systime, stime); __ms;})
|
||||
#define rtw_ms_to_systime(ms) ({systime __stime = _rtw_ms_to_systime(ms); __stime;})
|
||||
#define rtw_us_to_systime(us) ({systime __stime = _rtw_us_to_systime(us); __stime;})
|
||||
#define rtw_get_passing_time_ms(start) ({u32 __ms = _rtw_get_passing_time_ms(start); typecheck(systime, start); __ms;})
|
||||
#define rtw_get_remaining_time_ms(end) ({u32 __ms = _rtw_get_remaining_time_ms(end); typecheck(systime, end); __ms;})
|
||||
#define rtw_get_time_interval_ms(start, end) ({u32 __ms = _rtw_get_time_interval_ms(start, end); typecheck(systime, start); typecheck(systime, end); __ms;})
|
||||
#define rtw_time_after(a,b) ({bool __r = _rtw_time_after(a,b); typecheck(systime, a); typecheck(systime, b); __r;})
|
||||
#define rtw_time_before(a,b) ({bool __r = _rtw_time_after(b, a); typecheck(systime, a); typecheck(systime, b); __r;})
|
||||
#else
|
||||
#define rtw_get_current_time() _rtw_get_current_time()
|
||||
#define rtw_systime_to_ms(stime) _rtw_systime_to_ms(stime)
|
||||
#define rtw_ms_to_systime(ms) _rtw_ms_to_systime(ms)
|
||||
#define rtw_us_to_systime(us) _rtw_us_to_systime(us)
|
||||
#define rtw_get_passing_time_ms(start) _rtw_get_passing_time_ms(start)
|
||||
#define rtw_get_remaining_time_ms(end) _rtw_get_remaining_time_ms(end)
|
||||
#define rtw_get_time_interval_ms(start, end) _rtw_get_time_interval_ms(start, end)
|
||||
|
@ -46,7 +46,7 @@ struct ht_priv {
|
||||
|
||||
u8 op_present:1; /* ht_op is present */
|
||||
|
||||
struct rtw_ieee80211_ht_cap ht_cap;
|
||||
struct ieee80211_ht_cap ht_cap;
|
||||
u8 ht_op[HT_OP_IE_LEN];
|
||||
|
||||
};
|
||||
|
@ -392,7 +392,7 @@ void rtw_rfctl_deinit(_adapter *adapter);
|
||||
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
struct rf_ctl_t;
|
||||
#define CH_IS_NON_OCP(rt_ch_info) (rtw_time_after((rt_ch_info)->non_ocp_end_time, rtw_get_current_time()))
|
||||
#define CH_IS_NON_OCP(rt_ch_info) (rtw_time_after((rt_ch_info)->non_ocp_end_time, jiffies))
|
||||
bool rtw_is_cac_reset_needed(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset);
|
||||
bool _rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset);
|
||||
bool rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl);
|
||||
|
@ -156,7 +156,6 @@ __inline static void _init_pwrlock(_pwrlock *plock)
|
||||
|
||||
__inline static void _free_pwrlock(_pwrlock *plock)
|
||||
{
|
||||
_rtw_free_sema(plock);
|
||||
}
|
||||
|
||||
|
||||
|
364
include/wifi.h
364
include/wifi.h
@ -71,154 +71,40 @@
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
enum WIFI_FRAME_TYPE {
|
||||
WIFI_MGT_TYPE = (0),
|
||||
WIFI_CTRL_TYPE = (BIT(2)),
|
||||
WIFI_DATA_TYPE = (BIT(3)),
|
||||
WIFI_QOS_DATA_TYPE = (BIT(7) | BIT(3)), /* !< QoS Data */
|
||||
};
|
||||
|
||||
enum WIFI_FRAME_SUBTYPE {
|
||||
|
||||
/* below is for mgt frame */
|
||||
WIFI_ASSOCREQ = (0 | WIFI_MGT_TYPE),
|
||||
WIFI_ASSOCRSP = (BIT(4) | WIFI_MGT_TYPE),
|
||||
WIFI_REASSOCREQ = (BIT(5) | WIFI_MGT_TYPE),
|
||||
WIFI_REASSOCRSP = (BIT(5) | BIT(4) | WIFI_MGT_TYPE),
|
||||
WIFI_PROBEREQ = (BIT(6) | WIFI_MGT_TYPE),
|
||||
WIFI_PROBERSP = (BIT(6) | BIT(4) | WIFI_MGT_TYPE),
|
||||
WIFI_BEACON = (BIT(7) | WIFI_MGT_TYPE),
|
||||
WIFI_ATIM = (BIT(7) | BIT(4) | WIFI_MGT_TYPE),
|
||||
WIFI_DISASSOC = (BIT(7) | BIT(5) | WIFI_MGT_TYPE),
|
||||
WIFI_AUTH = (BIT(7) | BIT(5) | BIT(4) | WIFI_MGT_TYPE),
|
||||
WIFI_DEAUTH = (BIT(7) | BIT(6) | WIFI_MGT_TYPE),
|
||||
WIFI_ACTION = (BIT(7) | BIT(6) | BIT(4) | WIFI_MGT_TYPE),
|
||||
WIFI_ACTION_NOACK = (BIT(7) | BIT(6) | BIT(5) | WIFI_MGT_TYPE),
|
||||
|
||||
/* below is for control frame */
|
||||
WIFI_BF_REPORT_POLL = (BIT(6) | WIFI_CTRL_TYPE),
|
||||
WIFI_NDPA = (BIT(6) | BIT(4) | WIFI_CTRL_TYPE),
|
||||
WIFI_BAR = (BIT(7) | WIFI_CTRL_TYPE),
|
||||
WIFI_PSPOLL = (BIT(7) | BIT(5) | WIFI_CTRL_TYPE),
|
||||
WIFI_RTS = (BIT(7) | BIT(5) | BIT(4) | WIFI_CTRL_TYPE),
|
||||
WIFI_CTS = (BIT(7) | BIT(6) | WIFI_CTRL_TYPE),
|
||||
WIFI_ACK = (BIT(7) | BIT(6) | BIT(4) | WIFI_CTRL_TYPE),
|
||||
WIFI_CFEND = (BIT(7) | BIT(6) | BIT(5) | WIFI_CTRL_TYPE),
|
||||
WIFI_CFEND_CFACK = (BIT(7) | BIT(6) | BIT(5) | BIT(4) | WIFI_CTRL_TYPE),
|
||||
|
||||
/* below is for data frame */
|
||||
WIFI_DATA = (0 | WIFI_DATA_TYPE),
|
||||
WIFI_DATA_CFACK = (BIT(4) | WIFI_DATA_TYPE),
|
||||
WIFI_DATA_CFPOLL = (BIT(5) | WIFI_DATA_TYPE),
|
||||
WIFI_DATA_CFACKPOLL = (BIT(5) | BIT(4) | WIFI_DATA_TYPE),
|
||||
WIFI_DATA_NULL = (BIT(6) | WIFI_DATA_TYPE),
|
||||
WIFI_CF_ACK = (BIT(6) | BIT(4) | WIFI_DATA_TYPE),
|
||||
WIFI_CF_POLL = (BIT(6) | BIT(5) | WIFI_DATA_TYPE),
|
||||
WIFI_CF_ACKPOLL = (BIT(6) | BIT(5) | BIT(4) | WIFI_DATA_TYPE),
|
||||
WIFI_QOS_DATA_NULL = (BIT(6) | WIFI_QOS_DATA_TYPE),
|
||||
};
|
||||
|
||||
enum WIFI_REASON_CODE {
|
||||
_RSON_RESERVED_ = 0,
|
||||
_RSON_UNSPECIFIED_ = 1,
|
||||
_RSON_AUTH_NO_LONGER_VALID_ = 2,
|
||||
_RSON_DEAUTH_STA_LEAVING_ = 3,
|
||||
_RSON_INACTIVITY_ = 4,
|
||||
_RSON_UNABLE_HANDLE_ = 5,
|
||||
_RSON_CLS2_ = 6,
|
||||
_RSON_CLS3_ = 7,
|
||||
_RSON_DISAOC_STA_LEAVING_ = 8,
|
||||
_RSON_ASOC_NOT_AUTH_ = 9,
|
||||
|
||||
/* WPA reason */
|
||||
_RSON_INVALID_IE_ = 13,
|
||||
_RSON_MIC_FAILURE_ = 14,
|
||||
_RSON_4WAY_HNDSHK_TIMEOUT_ = 15,
|
||||
_RSON_GROUP_KEY_UPDATE_TIMEOUT_ = 16,
|
||||
_RSON_DIFF_IE_ = 17,
|
||||
_RSON_MLTCST_CIPHER_NOT_VALID_ = 18,
|
||||
_RSON_UNICST_CIPHER_NOT_VALID_ = 19,
|
||||
_RSON_AKMP_NOT_VALID_ = 20,
|
||||
_RSON_UNSUPPORT_RSNE_VER_ = 21,
|
||||
_RSON_INVALID_RSNE_CAP_ = 22,
|
||||
_RSON_IEEE_802DOT1X_AUTH_FAIL_ = 23,
|
||||
|
||||
/* belowing are Realtek definition */
|
||||
_RSON_PMK_NOT_AVAILABLE_ = 24,
|
||||
_RSON_TDLS_TEAR_TOOFAR_ = 25,
|
||||
_RSON_TDLS_TEAR_UN_RSN_ = 26,
|
||||
};
|
||||
/*ieee80211 management */
|
||||
#define WIFI_ACTION_NOACK (BIT(7) | BIT(6) | BIT(5) | IEEE80211_FTYPE_MGMT)
|
||||
/* below is for control frame */
|
||||
#define WIFI_NDPA (BIT(6) | BIT(4) | IEEE80211_FTYPE_CTL)
|
||||
|
||||
/* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */
|
||||
|
||||
enum WIFI_STATUS_CODE {
|
||||
_STATS_SUCCESSFUL_ = 0,
|
||||
_STATS_FAILURE_ = 1,
|
||||
_STATS_SEC_DISABLED_ = 5,
|
||||
_STATS_NOT_IN_SAME_BSS_ = 7,
|
||||
_STATS_CAP_FAIL_ = 10,
|
||||
_STATS_NO_ASOC_ = 11,
|
||||
_STATS_OTHER_ = 12,
|
||||
_STATS_NO_SUPP_ALG_ = 13,
|
||||
_STATS_OUT_OF_AUTH_SEQ_ = 14,
|
||||
_STATS_CHALLENGE_FAIL_ = 15,
|
||||
_STATS_AUTH_TIMEOUT_ = 16,
|
||||
_STATS_UNABLE_HANDLE_STA_ = 17,
|
||||
_STATS_RATE_FAIL_ = 18,
|
||||
_STATS_REFUSED_TEMPORARILY_ = 30,
|
||||
_STATS_DECLINE_REQ_ = 37,
|
||||
_STATS_INVALID_PARAMETERS_ = 38,
|
||||
_STATS_INVALID_RSNIE_ = 72,
|
||||
enum {
|
||||
_STATS_REFUSED_TEMPORARILY_ = 30, /* Code-22-65535 reserved */
|
||||
};
|
||||
|
||||
/* IEEE 802.11r */
|
||||
#define WLAN_STATUS_INVALID_PMKID 53
|
||||
|
||||
enum WIFI_REG_DOMAIN {
|
||||
DOMAIN_FCC = 1,
|
||||
DOMAIN_IC = 2,
|
||||
DOMAIN_ETSI = 3,
|
||||
DOMAIN_SPAIN = 4,
|
||||
DOMAIN_FRANCE = 5,
|
||||
DOMAIN_MKK = 6,
|
||||
DOMAIN_ISRAEL = 7,
|
||||
DOMAIN_MKK1 = 8,
|
||||
DOMAIN_MKK2 = 9,
|
||||
DOMAIN_MKK3 = 10,
|
||||
DOMAIN_MAX
|
||||
};
|
||||
|
||||
#define _TO_DS_ BIT(8)
|
||||
#define _FROM_DS_ BIT(9)
|
||||
#define _MORE_FRAG_ BIT(10)
|
||||
#define _RETRY_ BIT(11)
|
||||
#define _PWRMGT_ BIT(12)
|
||||
#define _MORE_DATA_ BIT(13)
|
||||
#define _PRIVACY_ BIT(14)
|
||||
#define _ORDER_ BIT(15)
|
||||
|
||||
#define SetToDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_TO_DS_); \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_TODS); \
|
||||
} while (0)
|
||||
|
||||
#define GetToDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_TO_DS_)) != 0)
|
||||
#define GetToDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_TODS)) != 0)
|
||||
|
||||
#define ClearToDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(IEEE80211_FCTL_TODS)); \
|
||||
} while (0)
|
||||
|
||||
#define SetFrDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_FROMDS); \
|
||||
} while (0)
|
||||
|
||||
#define GetFrDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_FROM_DS_)) != 0)
|
||||
#define GetFrDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_FROMDS)) != 0)
|
||||
|
||||
#define ClearFrDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(IEEE80211_FCTL_FROMDS)); \
|
||||
} while (0)
|
||||
|
||||
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
|
||||
@ -226,66 +112,61 @@ enum WIFI_REG_DOMAIN {
|
||||
|
||||
#define SetMFrag(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_MOREFRAGS); \
|
||||
} while (0)
|
||||
|
||||
#define GetMFrag(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_MORE_FRAG_)) != 0)
|
||||
#define GetMFrag(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_MOREFRAGS)) != 0)
|
||||
|
||||
#define ClearMFrag(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(IEEE80211_FCTL_MOREFRAGS)); \
|
||||
} while (0)
|
||||
|
||||
#define SetRetry(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_RETRY_); \
|
||||
} while (0)
|
||||
|
||||
#define GetRetry(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_RETRY_)) != 0)
|
||||
#define GetRetry(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_RETRY)) != 0)
|
||||
|
||||
#define ClearRetry(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(IEEE80211_FCTL_RETRY)); \
|
||||
} while (0)
|
||||
|
||||
#define SetPwrMgt(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_PM); \
|
||||
} while (0)
|
||||
|
||||
#define GetPwrMgt(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_PWRMGT_)) != 0)
|
||||
#define GetPwrMgt(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_PM)) != 0)
|
||||
|
||||
#define ClearPwrMgt(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(IEEE80211_FCTL_PM)); \
|
||||
} while (0)
|
||||
|
||||
#define SetMData(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_MOREDATA); \
|
||||
} while (0)
|
||||
|
||||
#define GetMData(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_MORE_DATA_)) != 0)
|
||||
#define GetMData(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_MOREDATA)) != 0)
|
||||
|
||||
#define ClearMData(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(IEEE80211_FCTL_MOREDATA)); \
|
||||
} while (0)
|
||||
|
||||
#define SetPrivacy(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); \
|
||||
} while (0)
|
||||
|
||||
#define GetPrivacy(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_PRIVACY_)) != 0)
|
||||
#define GetPrivacy(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_PROTECTED)) != 0)
|
||||
|
||||
#define ClearPrivacy(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(IEEE80211_FCTL_PROTECTED)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define GetOrder(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
|
||||
#define GetOrder(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_ORDER)) != 0)
|
||||
|
||||
#define GetFrameType(pbuf) (le16_to_cpu(*(unsigned short *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
|
||||
@ -377,54 +258,6 @@ __inline static unsigned char *get_ta(unsigned char *pframe)
|
||||
return ta;
|
||||
}
|
||||
|
||||
/* can't apply to mesh mode */
|
||||
__inline static unsigned char *get_da(unsigned char *pframe)
|
||||
{
|
||||
unsigned char *da;
|
||||
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
|
||||
|
||||
switch (to_fr_ds) {
|
||||
case 0x00: /* ToDs=0, FromDs=0 */
|
||||
da = GetAddr1Ptr(pframe);
|
||||
break;
|
||||
case 0x01: /* ToDs=0, FromDs=1 */
|
||||
da = GetAddr1Ptr(pframe);
|
||||
break;
|
||||
case 0x02: /* ToDs=1, FromDs=0 */
|
||||
da = GetAddr3Ptr(pframe);
|
||||
break;
|
||||
default: /* ToDs=1, FromDs=1 */
|
||||
da = GetAddr3Ptr(pframe);
|
||||
break;
|
||||
}
|
||||
|
||||
return da;
|
||||
}
|
||||
|
||||
/* can't apply to mesh mode */
|
||||
__inline static unsigned char *get_sa(unsigned char *pframe)
|
||||
{
|
||||
unsigned char *sa;
|
||||
unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe);
|
||||
|
||||
switch (to_fr_ds) {
|
||||
case 0x00: /* ToDs=0, FromDs=0 */
|
||||
sa = get_addr2_ptr(pframe);
|
||||
break;
|
||||
case 0x01: /* ToDs=0, FromDs=1 */
|
||||
sa = GetAddr3Ptr(pframe);
|
||||
break;
|
||||
case 0x02: /* ToDs=1, FromDs=0 */
|
||||
sa = get_addr2_ptr(pframe);
|
||||
break;
|
||||
default: /* ToDs=1, FromDs=1 */
|
||||
sa = GetAddr4Ptr(pframe);
|
||||
break;
|
||||
}
|
||||
|
||||
return sa;
|
||||
}
|
||||
|
||||
/* can't apply to mesh mode */
|
||||
__inline static unsigned char *get_hdr_bssid(unsigned char *pframe)
|
||||
{
|
||||
@ -452,21 +285,21 @@ __inline static unsigned char *get_hdr_bssid(unsigned char *pframe)
|
||||
|
||||
__inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
||||
{
|
||||
if (WIFI_CTRL_TYPE == GetFrameType(pframe))
|
||||
if (IEEE80211_FTYPE_CTL == GetFrameType(pframe))
|
||||
return _TRUE;
|
||||
else
|
||||
return _FALSE;
|
||||
}
|
||||
static inline int IsFrameTypeMgnt(unsigned char *pframe)
|
||||
{
|
||||
if (GetFrameType(pframe) == WIFI_MGT_TYPE)
|
||||
if (GetFrameType(pframe) == IEEE80211_FTYPE_MGMT)
|
||||
return _TRUE;
|
||||
else
|
||||
return _FALSE;
|
||||
}
|
||||
static inline int IsFrameTypeData(unsigned char *pframe)
|
||||
{
|
||||
if (GetFrameType(pframe) == WIFI_DATA_TYPE)
|
||||
if (GetFrameType(pframe) == IEEE80211_FTYPE_DATA)
|
||||
return _TRUE;
|
||||
else
|
||||
return _FALSE;
|
||||
@ -501,47 +334,6 @@ static inline int IsFrameTypeData(unsigned char *pframe)
|
||||
|
||||
#define _FIXED_IE_LENGTH_ _BEACON_IE_OFFSET_
|
||||
|
||||
#define _SSID_IE_ 0
|
||||
#define _SUPPORTEDRATES_IE_ 1
|
||||
#define _DSSET_IE_ 3
|
||||
#define _TIM_IE_ 5
|
||||
#define _IBSS_PARA_IE_ 6
|
||||
#define _COUNTRY_IE_ 7
|
||||
#define _CHLGETXT_IE_ 16
|
||||
#define _SUPPORTED_CH_IE_ 36
|
||||
#define _CH_SWTICH_ANNOUNCE_ 37 /* Secondary Channel Offset */
|
||||
#define _MEAS_REQ_IE_ 38
|
||||
#define _MEAS_RSP_IE_ 39
|
||||
#define _RSN_IE_2_ 48
|
||||
#define _SSN_IE_1_ 221
|
||||
#define _ERPINFO_IE_ 42
|
||||
#define _EXT_SUPPORTEDRATES_IE_ 50
|
||||
|
||||
#define _HT_CAPABILITY_IE_ 45
|
||||
#define _MDIE_ 54
|
||||
#define _FTIE_ 55
|
||||
#define _TIMEOUT_ITVL_IE_ 56
|
||||
#define _SRC_IE_ 59
|
||||
#define _HT_EXTRA_INFO_IE_ 61
|
||||
#define _HT_ADD_INFO_IE_ 61 /* _HT_EXTRA_INFO_IE_ */
|
||||
#define _WAPI_IE_ 68
|
||||
#define _EID_RRM_EN_CAP_IE_ 70
|
||||
|
||||
|
||||
/* #define EID_BSSCoexistence 72 */ /* 20/40 BSS Coexistence
|
||||
* #define EID_BSSIntolerantChlReport 73 */
|
||||
#define _RIC_Descriptor_IE_ 75
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
#define _MME_IE_ 76 /* 802.11w Management MIC element */
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#define _LINK_ID_IE_ 101
|
||||
#define _CH_SWITCH_TIMING_ 104
|
||||
#define _PTI_BUFFER_STATUS_ 106
|
||||
#define _EXT_CAP_IE_ 127
|
||||
#define _VENDOR_SPECIFIC_IE_ 221
|
||||
|
||||
#define _RESERVED47_ 47
|
||||
|
||||
typedef enum _ELEMENT_ID {
|
||||
EID_SsId = 0, /* service set identifier (0:32) */
|
||||
EID_SupRates = 1, /* supported rates (1:8) */
|
||||
@ -685,50 +477,17 @@ typedef enum _ELEMENT_ID {
|
||||
|
||||
#define set_order_bit(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_ORDER); \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
||||
#define GetOrderBit(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
|
||||
#define GetOrderBit(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(IEEE80211_FCTL_ORDER)) != 0)
|
||||
|
||||
#define ACT_CAT_VENDOR 0x7F/* 127 */
|
||||
|
||||
/**
|
||||
* struct rtw_ieee80211_bar - HT Block Ack Request
|
||||
*
|
||||
* This structure refers to "HT BlockAckReq" as
|
||||
* described in 802.11n draft section 7.2.1.7.1
|
||||
*/
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW)
|
||||
struct rtw_ieee80211_bar {
|
||||
unsigned short frame_control;
|
||||
unsigned short duration;
|
||||
unsigned char ra[6];
|
||||
unsigned char ta[6];
|
||||
unsigned short control;
|
||||
unsigned short start_seq_num;
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct rtw_ieee80211_ht_cap - HT capabilities
|
||||
*
|
||||
* This structure refers to "HT capabilities element" as
|
||||
* described in 802.11n draft section 7.3.2.52
|
||||
*/
|
||||
|
||||
struct rtw_ieee80211_ht_cap {
|
||||
unsigned short cap_info;
|
||||
unsigned char ampdu_params_info;
|
||||
unsigned char supp_mcs_set[16];
|
||||
unsigned short extended_ht_cap_info;
|
||||
unsigned int tx_BF_cap_info;
|
||||
unsigned char antenna_selection_info;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
* struct rtw_ieee80211_ht_cap - HT additional information
|
||||
* struct ieee80211_ht_cap - HT additional information
|
||||
*
|
||||
* This structure refers to "HT information element" as
|
||||
* described in 802.11n draft section 7.3.2.53
|
||||
@ -782,31 +541,7 @@ struct ADDBA_request {
|
||||
unsigned short BA_starting_seqctrl;
|
||||
} __attribute__((packed));
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_FACTOR {
|
||||
MAX_AMPDU_FACTOR_8K = 0,
|
||||
MAX_AMPDU_FACTOR_16K = 1,
|
||||
MAX_AMPDU_FACTOR_32K = 2,
|
||||
MAX_AMPDU_FACTOR_64K = 3,
|
||||
} HT_CAP_AMPDU_FACTOR;
|
||||
|
||||
typedef enum _VHT_CAP_AMPDU_FACTOR {
|
||||
MAX_AMPDU_FACTOR_128K = 4,
|
||||
MAX_AMPDU_FACTOR_256K = 5,
|
||||
MAX_AMPDU_FACTOR_512K = 6,
|
||||
MAX_AMPDU_FACTOR_1M = 7,
|
||||
} VHT_CAP_AMPDU_FACTOR;
|
||||
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
AMPDU_DENSITY_VALUE_0 = 0 , /* For no restriction */
|
||||
AMPDU_DENSITY_VALUE_1 = 1 , /* For 1/4 us */
|
||||
AMPDU_DENSITY_VALUE_2 = 2 , /* For 1/2 us */
|
||||
AMPDU_DENSITY_VALUE_3 = 3 , /* For 1 us */
|
||||
AMPDU_DENSITY_VALUE_4 = 4 , /* For 2 us */
|
||||
AMPDU_DENSITY_VALUE_5 = 5 , /* For 4 us */
|
||||
AMPDU_DENSITY_VALUE_6 = 6 , /* For 8 us */
|
||||
AMPDU_DENSITY_VALUE_7 = 7 , /* For 16 us */
|
||||
} HT_CAP_AMPDU_DENSITY;
|
||||
|
||||
/* 802.11n HT capabilities masks */
|
||||
#define IEEE80211_HT_CAP_RX_STBC_1R 0x0100
|
||||
@ -822,41 +557,8 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
#define IEEE80211_MAX_AMPDU_BUF 0x40
|
||||
#endif
|
||||
|
||||
/* Spatial Multiplexing Power Save Modes */
|
||||
#define WLAN_HT_CAP_SM_PS_STATIC 0
|
||||
#define WLAN_HT_CAP_SM_PS_DYNAMIC 1
|
||||
#define WLAN_HT_CAP_SM_PS_INVALID 2
|
||||
#define WLAN_HT_CAP_SM_PS_DISABLED 3
|
||||
|
||||
|
||||
#define OP_MODE_PURE 0
|
||||
#define OP_MODE_MAY_BE_LEGACY_STAS 1
|
||||
#define OP_MODE_20MHZ_HT_STA_ASSOCED 2
|
||||
#define OP_MODE_MIXED 3
|
||||
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK ((u8) BIT(0) | BIT(1))
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE ((u8) BIT(0))
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW ((u8) BIT(0) | BIT(1))
|
||||
#define HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH ((u8) BIT(2))
|
||||
#define HT_INFO_HT_PARAM_RIFS_MODE ((u8) BIT(3))
|
||||
#define HT_INFO_HT_PARAM_CTRL_ACCESS_ONLY ((u8) BIT(4))
|
||||
#define HT_INFO_HT_PARAM_SRV_INTERVAL_GRANULARITY ((u8) BIT(5))
|
||||
|
||||
#define HT_INFO_OPERATION_MODE_OP_MODE_MASK \
|
||||
((u16) (0x0001 | 0x0002))
|
||||
#define HT_INFO_OPERATION_MODE_OP_MODE_OFFSET 0
|
||||
#define HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT ((u8) BIT(2))
|
||||
#define HT_INFO_OPERATION_MODE_TRANSMIT_BURST_LIMIT ((u8) BIT(3))
|
||||
#define HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT ((u8) BIT(4))
|
||||
|
||||
#define HT_INFO_STBC_PARAM_DUAL_BEACON ((u16) BIT(6))
|
||||
#define HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT ((u16) BIT(7))
|
||||
#define HT_INFO_STBC_PARAM_SECONDARY_BCN ((u16) BIT(8))
|
||||
#define HT_INFO_STBC_PARAM_LSIG_TXOP_PROTECT_ALLOWED ((u16) BIT(9))
|
||||
#define HT_INFO_STBC_PARAM_PCO_ACTIVE ((u16) BIT(10))
|
||||
#define HT_INFO_STBC_PARAM_PCO_PHASE ((u16) BIT(11))
|
||||
|
||||
|
||||
|
||||
/* #endif */
|
||||
|
||||
|
@ -862,12 +862,12 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
||||
SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/);
|
||||
/* pmlmeext->mgnt_seq++; */
|
||||
|
||||
if (pnetwork->network.Reserved[0] == BSS_TYPE_BCN) { /* WIFI_BEACON */
|
||||
if (pnetwork->network.Reserved[0] == BSS_TYPE_BCN) { /* IEEE80211_STYPE_BEACON */
|
||||
memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
|
||||
set_frame_sub_type(pbuf, WIFI_BEACON);
|
||||
set_frame_sub_type(pbuf, IEEE80211_STYPE_BEACON);
|
||||
} else {
|
||||
memcpy(pwlanhdr->addr1, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
set_frame_sub_type(pbuf, WIFI_PROBERSP);
|
||||
set_frame_sub_type(pbuf, IEEE80211_STYPE_PROBE_RESP);
|
||||
}
|
||||
|
||||
memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN);
|
||||
@ -904,7 +904,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38))
|
||||
#ifndef COMPAT_KERNEL_RELEASE
|
||||
/* patch for cfg80211, update beacon ies to information_elements */
|
||||
if (pnetwork->network.Reserved[0] == BSS_TYPE_BCN) { /* WIFI_BEACON */
|
||||
if (pnetwork->network.Reserved[0] == BSS_TYPE_BCN) { /* IEEE80211_STYPE_BEACON */
|
||||
|
||||
if (bss->len_information_elements != bss->len_beacon_ies) {
|
||||
bss->information_elements = bss->beacon_ies;
|
||||
@ -2527,7 +2527,7 @@ u32 rtw_cfg80211_wait_scan_req_empty(_adapter *adapter, u32 timeout_ms)
|
||||
systime start;
|
||||
u32 pass_ms;
|
||||
|
||||
start = rtw_get_current_time();
|
||||
start = jiffies;
|
||||
|
||||
while (rtw_get_passing_time_ms(start) <= timeout_ms) {
|
||||
|
||||
@ -2633,7 +2633,7 @@ static void _rtw_cfg80211_surveydone_event_callback(_adapter *padapter, struct c
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -2657,7 +2657,7 @@ static void _rtw_cfg80211_surveydone_event_callback(_adapter *padapter, struct c
|
||||
if (_rtw_memcmp(pnetwork->network.Ssid.Ssid, "Ralink_11n_AP", 13)) {
|
||||
uint ie_len = 0;
|
||||
u8 *p = NULL;
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
|
||||
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, WLAN_EID_RSN, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
|
||||
RTW_INFO("ie_len=%d\n", ie_len);
|
||||
}
|
||||
}
|
||||
@ -3227,7 +3227,7 @@ cancel_ps_deny:
|
||||
|
||||
exit:
|
||||
if (pmlmepriv)
|
||||
pmlmepriv->lastscantime = rtw_get_current_time();
|
||||
pmlmepriv->lastscantime = jiffies;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -4344,9 +4344,9 @@ void rtw_cfg80211_indicate_sta_assoc(_adapter *padapter, u8 *pmgmt_frame, uint f
|
||||
{
|
||||
struct station_info sinfo;
|
||||
u8 ie_offset;
|
||||
if (get_frame_sub_type(pmgmt_frame) == WIFI_ASSOCREQ)
|
||||
if (get_frame_sub_type(pmgmt_frame) == IEEE80211_STYPE_ASSOC_REQ)
|
||||
ie_offset = _ASOCREQ_IE_OFFSET_;
|
||||
else /* WIFI_REASSOCREQ */
|
||||
else /* IEEE80211_STYPE_REASSOC_REQ */
|
||||
ie_offset = _REASOCREQ_IE_OFFSET_;
|
||||
|
||||
memset(&sinfo, 0, sizeof(sinfo));
|
||||
@ -4416,7 +4416,7 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, const u8 *da, unsign
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pmgmt_frame, WIFI_DEAUTH);
|
||||
set_frame_sub_type(pmgmt_frame, IEEE80211_STYPE_DEAUTH);
|
||||
|
||||
pmgmt_frame += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
frame_len = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -4944,8 +4944,8 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
/* pbss_network->IEs will not include p2p_ie, wfd ie */
|
||||
rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, _VENDOR_SPECIFIC_IE_, P2P_OUI, 4);
|
||||
rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, _VENDOR_SPECIFIC_IE_, WFD_OUI, 4);
|
||||
rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, WLAN_EID_VENDOR_SPECIFIC, P2P_OUI, 4);
|
||||
rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, WLAN_EID_VENDOR_SPECIFIC, WFD_OUI, 4);
|
||||
|
||||
if (rtw_check_beacon_data(adapter, pbuf, len) == _SUCCESS) {
|
||||
#ifdef CONFIG_P2P
|
||||
@ -5531,7 +5531,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||
plist = get_next(phead);
|
||||
|
||||
/* check asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -5718,7 +5718,7 @@ struct sta_info *rtw_sta_info_get_by_idx(struct sta_priv *pstapriv, const int id
|
||||
plist = get_next(phead);
|
||||
|
||||
/* check asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
if (idx == i)
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
plist = get_next(plist);
|
||||
@ -6380,7 +6380,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
|
||||
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
|
||||
pmlmeext->mgnt_seq++;
|
||||
set_frame_sub_type(pframe, WIFI_ACTION);
|
||||
set_frame_sub_type(pframe, IEEE80211_STYPE_ACTION);
|
||||
|
||||
pframe += sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
@ -6438,7 +6438,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
p2pielen += devinfo_contentlen;
|
||||
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2p_ie, &p2p_ielen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, p2pielen, (unsigned char *) p2p_ie, &p2p_ielen);
|
||||
/* p2pielen = build_prov_disc_request_p2p_ie( pwdinfo, pframe, NULL, 0, pwdinfo->tx_prov_disc_info.peerDevAddr); */
|
||||
/* pframe += p2pielen; */
|
||||
pattrib->pktlen += p2p_ielen;
|
||||
@ -6473,7 +6473,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
*(u16 *)(wpsie + wpsielen) = cpu_to_be16(pwdinfo->tx_prov_disc_info.wps_config_method_request);
|
||||
wpsielen += 2;
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
pframe = rtw_set_ie(pframe, WLAN_EID_VENDOR_SPECIFIC, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
@ -6569,7 +6569,7 @@ void rtw_cfg80211_external_auth_request(_adapter *padapter, union recv_frame *rf
|
||||
cfg80211_external_auth_request(netdev,
|
||||
(struct cfg80211_external_auth_params *)¶ms, GFP_ATOMIC);
|
||||
#elif (KERNEL_VERSION(2, 6, 37) <= LINUX_VERSION_CODE)
|
||||
set_frame_sub_type(frame, WIFI_AUTH);
|
||||
set_frame_sub_type(frame, IEEE80211_STYPE_AUTH);
|
||||
|
||||
memcpy(frame + 4, get_my_bssid(&pmlmeinfo->network), ETH_ALEN);
|
||||
memcpy(frame + 10, adapter_mac_addr(padapter), ETH_ALEN);
|
||||
@ -6604,7 +6604,7 @@ inline bool rtw_cfg80211_is_ro_ch_once(_adapter *adapter)
|
||||
|
||||
inline void rtw_cfg80211_set_last_ro_ch_time(_adapter *adapter)
|
||||
{
|
||||
adapter->cfg80211_wdinfo.last_ro_ch_time = rtw_get_current_time();
|
||||
adapter->cfg80211_wdinfo.last_ro_ch_time = jiffies;
|
||||
|
||||
if (!adapter->cfg80211_wdinfo.last_ro_ch_time)
|
||||
adapter->cfg80211_wdinfo.last_ro_ch_time++;
|
||||
@ -6711,7 +6711,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy,
|
||||
RTW_INFO(FUNC_ADPT_FMT" init listen_channel %u\n"
|
||||
, FUNC_ADPT_ARG(padapter), padapter->wdinfo.listen_channel);
|
||||
} else if (rtw_p2p_chk_state(pwdinfo , P2P_STATE_LISTEN)
|
||||
&& (time_after_eq(rtw_get_current_time(), pwdev_priv->probe_resp_ie_update_time)
|
||||
&& (time_after_eq(jiffies, pwdev_priv->probe_resp_ie_update_time)
|
||||
&& rtw_get_passing_time_ms(pwdev_priv->probe_resp_ie_update_time) < 50)
|
||||
) {
|
||||
if (padapter->wdinfo.listen_channel != remain_ch) {
|
||||
@ -7247,7 +7247,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
|
||||
u8 is_p2p = 0;
|
||||
#endif
|
||||
int type = (-1);
|
||||
systime start = rtw_get_current_time();
|
||||
systime start = jiffies;
|
||||
_adapter *padapter;
|
||||
struct dvobj_priv *dvobj;
|
||||
struct rtw_wdev_priv *pwdev_priv;
|
||||
@ -8188,7 +8188,7 @@ u8 *rtw_cfg80211_construct_mesh_beacon_ies(struct wiphy *wiphy, _adapter *adapte
|
||||
*c = WLAN_EID_TIM;
|
||||
*(c + 1) = 4;
|
||||
c += 6;
|
||||
//c = rtw_set_ie(c, _TIM_IE_, 4, NULL, NULL);
|
||||
//c = rtw_set_ie(c, WLAN_EID_DS_PARAMS, 4, NULL, NULL);
|
||||
|
||||
/* Extended Supported Rates */
|
||||
if (n_bitrates > 8)
|
||||
@ -8598,9 +8598,9 @@ static void rtw_cfg80211_mpath_set_pinfo(struct rtw_mesh_path *mpath, u8 *next_h
|
||||
pinfo->frame_qlen = mpath->frame_queue_len;
|
||||
pinfo->sn = mpath->sn;
|
||||
pinfo->metric = mpath->metric;
|
||||
if (rtw_time_after(mpath->exp_time, rtw_get_current_time()))
|
||||
if (rtw_time_after(mpath->exp_time, jiffies))
|
||||
pinfo->exptime = rtw_get_remaining_time_ms(mpath->exp_time);
|
||||
pinfo->discovery_timeout = rtw_systime_to_ms(mpath->discovery_timeout);
|
||||
pinfo->discovery_timeout = jiffies_to_msecs(mpath->discovery_timeout);
|
||||
pinfo->discovery_retries = mpath->discovery_retries;
|
||||
if (mpath->flags & RTW_MESH_PATH_ACTIVE)
|
||||
pinfo->flags |= NL80211_MPATH_FLAG_ACTIVE;
|
||||
@ -8889,7 +8889,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
|
||||
memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen);
|
||||
pmlmepriv->wps_beacon_ie_len = wps_ielen;
|
||||
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_VENDOR_SPECIFIC, wps_oui, _TRUE);
|
||||
|
||||
}
|
||||
|
||||
@ -9192,7 +9192,7 @@ int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len,
|
||||
ret = rtw_cfg80211_set_probe_resp_wpsp2pie(net, buf, len);
|
||||
#ifdef CONFIG_P2P
|
||||
if (ret == 0)
|
||||
adapter_wdev_data((_adapter *)rtw_netdev_priv(net))->probe_resp_ie_update_time = rtw_get_current_time();
|
||||
adapter_wdev_data((_adapter *)rtw_netdev_priv(net))->probe_resp_ie_update_time = jiffies;
|
||||
#endif
|
||||
break;
|
||||
case 0x4: /* ASSOC_RESP */
|
||||
@ -10068,7 +10068,7 @@ int rtw_wdev_alloc(_adapter *padapter, struct wiphy *wiphy)
|
||||
_rtw_spinlock_init(&pwdev_priv->connect_req_lock);
|
||||
|
||||
pwdev_priv->p2p_enabled = _FALSE;
|
||||
pwdev_priv->probe_resp_ie_update_time = rtw_get_current_time();
|
||||
pwdev_priv->probe_resp_ie_update_time = jiffies;
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;
|
||||
rtw_wdev_invit_info_init(&pwdev_priv->invit_info);
|
||||
rtw_wdev_nego_info_init(&pwdev_priv->nego_info);
|
||||
|
@ -358,7 +358,7 @@ static inline char *iwe_stream_protocol_process(_adapter *padapter,
|
||||
#ifdef CONFIG_80211N_HT
|
||||
/* parsing HT_CAP_IE */
|
||||
if(padapter->registrypriv.ht_enable && is_supported_ht(padapter->registrypriv.wireless_mode)) {
|
||||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], WLAN_EID_HT_CAPABILITY, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
if (p && ht_ielen > 0)
|
||||
ht_cap = _TRUE;
|
||||
}
|
||||
@ -423,12 +423,12 @@ static inline char *iwe_stream_rate_process(_adapter *padapter,
|
||||
|
||||
/* parsing HT_CAP_IE */
|
||||
if(is_supported_ht(padapter->registrypriv.wireless_mode)) {
|
||||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], WLAN_EID_HT_CAPABILITY, &ht_ielen, pnetwork->network.IELength - ie_offset);
|
||||
if (p && ht_ielen > 0) {
|
||||
struct rtw_ieee80211_ht_cap *pht_capie;
|
||||
struct ieee80211_ht_cap *pht_capie;
|
||||
ht_cap = _TRUE;
|
||||
pht_capie = (struct rtw_ieee80211_ht_cap *)(p + 2);
|
||||
memcpy(&mcs_rate , pht_capie->supp_mcs_set, 2);
|
||||
pht_capie = (struct ieee80211_ht_cap *)(p + 2);
|
||||
memcpy(&mcs_rate , pht_capie->mcs.rx_mask, 2);
|
||||
bw_40MHz = (pht_capie->cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40) ? 1 : 0;
|
||||
short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) ? 1 : 0;
|
||||
}
|
||||
@ -1093,7 +1093,7 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
|
||||
while (cnt < ielen) {
|
||||
eid = buf[cnt];
|
||||
|
||||
if ((eid == _VENDOR_SPECIFIC_IE_) && (_rtw_memcmp(&buf[cnt + 2], wps_oui, 4) == _TRUE)) {
|
||||
if ((eid == WLAN_EID_VENDOR_SPECIFIC) && (_rtw_memcmp(&buf[cnt + 2], wps_oui, 4) == _TRUE)) {
|
||||
RTW_INFO("SET WPS_IE\n");
|
||||
|
||||
padapter->securitypriv.wps_ie_len = ((buf[cnt + 1] + 2) < MAX_WPS_IE_LEN) ? (buf[cnt + 1] + 2) : MAX_WPS_IE_LEN;
|
||||
@ -1150,7 +1150,7 @@ static int rtw_wx_get_name(struct net_device *dev,
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
/* parsing HT_CAP_IE */
|
||||
if( is_supported_ht(padapter->registrypriv.wireless_mode)&&(padapter->registrypriv.ht_enable)) {
|
||||
p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength - 12);
|
||||
p = rtw_get_ie(&pcur_bss->IEs[12], WLAN_EID_HT_CAPABILITY, &ht_ielen, pcur_bss->IELength - 12);
|
||||
if (p && ht_ielen > 0 )
|
||||
ht_cap = _TRUE;
|
||||
}
|
||||
@ -1725,7 +1725,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
||||
|
||||
while (1) {
|
||||
|
||||
if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == _TRUE) {
|
||||
if (phead != pmlmepriv->pscanned) {
|
||||
#if 0
|
||||
ret = -EINVAL;
|
||||
goto cancel_ps_deny;
|
||||
@ -2177,7 +2177,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
if ((stop - ev) < SCAN_ITEM_SIZE) {
|
||||
@ -2317,7 +2317,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
||||
pmlmepriv->pscanned = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == _TRUE) {
|
||||
if (phead != pmlmepriv->pscanned) {
|
||||
#if 0
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) {
|
||||
rtw_set_802_11_ssid(padapter, &ndis_ssid);
|
||||
@ -3686,7 +3686,7 @@ static int rtw_get_ap_info(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
|
||||
@ -4241,7 +4241,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -4370,7 +4370,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -4456,7 +4456,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -4530,7 +4530,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -4600,7 +4600,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -4698,7 +4698,7 @@ static int rtw_p2p_connect(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -4843,7 +4843,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -5100,7 +5100,7 @@ static int rtw_p2p_set_pc(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
@ -5348,7 +5348,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
if (uintPeerChannel != 0)
|
||||
@ -6177,7 +6177,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
@ -7226,7 +7226,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
|
||||
(WLAN_STA_HT & flags)) {
|
||||
psta->htpriv.ht_option = _TRUE;
|
||||
psta->qos_option = 1;
|
||||
memcpy((void *)&psta->htpriv.ht_cap, (void *)¶m->u.add_sta.ht_cap, sizeof(struct rtw_ieee80211_ht_cap));
|
||||
memcpy((void *)&psta->htpriv.ht_cap, (void *)¶m->u.add_sta.ht_cap, sizeof(struct ieee80211_ht_cap));
|
||||
} else
|
||||
psta->htpriv.ht_option = _FALSE;
|
||||
|
||||
@ -7325,7 +7325,7 @@ static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *par
|
||||
u32 sta_set;
|
||||
u8 tx_supp_rates[16];
|
||||
u32 tx_supp_rates_len;
|
||||
struct rtw_ieee80211_ht_cap ht_cap;
|
||||
struct ieee80211_ht_cap ht_cap;
|
||||
u64 rx_pkts;
|
||||
u64 rx_bytes;
|
||||
u64 rx_drops;
|
||||
@ -7358,7 +7358,7 @@ static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *par
|
||||
memcpy(psta_data->tx_supp_rates, psta->bssrateset, psta->bssratelen);
|
||||
#ifdef CONFIG_80211N_HT
|
||||
if(padapter->registrypriv.ht_enable && is_supported_ht(padapter->registrypriv.wireless_mode))
|
||||
memcpy(&psta_data->ht_cap, &psta->htpriv.ht_cap, sizeof(struct rtw_ieee80211_ht_cap));
|
||||
memcpy(&psta_data->ht_cap, &psta->htpriv.ht_cap, sizeof(struct ieee80211_ht_cap));
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
psta_data->rx_pkts = psta->sta_stats.rx_data_pkts;
|
||||
psta_data->rx_bytes = psta->sta_stats.rx_bytes;
|
||||
@ -7450,7 +7450,7 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param,
|
||||
|
||||
memcpy(pmlmepriv->wps_beacon_ie, param->u.bcn_ie.buf, ie_len);
|
||||
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE);
|
||||
update_beacon(padapter, WLAN_EID_VENDOR_SPECIFIC, wps_oui, _TRUE);
|
||||
|
||||
pmlmeext->bstart_bss = _TRUE;
|
||||
|
||||
@ -7833,7 +7833,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
||||
int probereq_wpsie_len = len;
|
||||
u8 wps_oui[4] = {0x0, 0x50, 0xf2, 0x04};
|
||||
|
||||
if ((_VENDOR_SPECIFIC_IE_ == probereq_wpsie[0]) &&
|
||||
if ((WLAN_EID_VENDOR_SPECIFIC == probereq_wpsie[0]) &&
|
||||
(_rtw_memcmp(&probereq_wpsie[2], wps_oui, 4) == _TRUE)) {
|
||||
cp_sz = probereq_wpsie_len > MAX_WPS_IE_LEN ? MAX_WPS_IE_LEN : probereq_wpsie_len;
|
||||
|
||||
@ -7960,7 +7960,7 @@ static int rtw_wowlan_ctrl(struct net_device *dev,
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct sta_info *psta = NULL;
|
||||
int ret = 0;
|
||||
systime start_time = rtw_get_current_time();
|
||||
systime start_time = jiffies;
|
||||
poidparam.subcode = 0;
|
||||
|
||||
RTW_INFO("+rtw_wowlan_ctrl: %s\n", extra);
|
||||
@ -8032,7 +8032,7 @@ static int rtw_wowlan_set_pattern(struct net_device *dev,
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct wowlan_ioctl_param poidparam;
|
||||
int ret = 0, len = 0, i = 0;
|
||||
systime start_time = rtw_get_current_time();
|
||||
systime start_time = jiffies;
|
||||
u8 input[wrqu->data.length];
|
||||
u8 index = 0;
|
||||
|
||||
@ -8103,7 +8103,7 @@ static int rtw_ap_wowlan_ctrl(struct net_device *dev,
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct sta_info *psta = NULL;
|
||||
int ret = 0;
|
||||
systime start_time = rtw_get_current_time();
|
||||
systime start_time = jiffies;
|
||||
poidparam.subcode = 0;
|
||||
|
||||
RTW_INFO("+rtw_ap_wowlan_ctrl: %s\n", extra);
|
||||
@ -11493,7 +11493,7 @@ static struct xmit_frame *createloopbackpkt(PADAPTER padapter, u32 size)
|
||||
pattrib->ack_policy = 0;
|
||||
/* pattrib->pkt_hdrlen = ETH_HLEN; */
|
||||
pattrib->hdrlen = WLAN_HDR_A3_LEN;
|
||||
pattrib->subtype = WIFI_DATA;
|
||||
pattrib->subtype = (IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA);
|
||||
pattrib->priority = 0;
|
||||
pattrib->qsel = pattrib->priority;
|
||||
/* do_queue_select(padapter, pattrib); */
|
||||
|
@ -3485,8 +3485,8 @@ netdev_open_normal_process:
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS
|
||||
pwrctrlpriv->radio_on_start_time = rtw_get_current_time();
|
||||
pwrctrlpriv->pwr_saving_start_time = rtw_get_current_time();
|
||||
pwrctrlpriv->radio_on_start_time = jiffies;
|
||||
pwrctrlpriv->pwr_saving_start_time = jiffies;
|
||||
pwrctrlpriv->pwr_saving_time = 0;
|
||||
pwrctrlpriv->on_time = 0;
|
||||
pwrctrlpriv->tx_time = 0;
|
||||
@ -3607,7 +3607,7 @@ int rtw_ips_pwr_up(_adapter *padapter)
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
#endif/* #ifdef DBG_CONFIG_ERROR_DETECT */
|
||||
#endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */
|
||||
systime start_time = rtw_get_current_time();
|
||||
systime start_time = jiffies;
|
||||
RTW_INFO("===> rtw_ips_pwr_up..............\n");
|
||||
|
||||
#if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS)
|
||||
@ -3628,7 +3628,7 @@ int rtw_ips_pwr_up(_adapter *padapter)
|
||||
|
||||
void rtw_ips_pwr_down(_adapter *padapter)
|
||||
{
|
||||
systime start_time = rtw_get_current_time();
|
||||
systime start_time = jiffies;
|
||||
RTW_INFO("===> rtw_ips_pwr_down...................\n");
|
||||
|
||||
padapter->net_closed = _TRUE;
|
||||
@ -4629,7 +4629,7 @@ int rtw_suspend_common(_adapter *padapter)
|
||||
#endif
|
||||
|
||||
int ret = 0;
|
||||
systime start_time = rtw_get_current_time();
|
||||
systime start_time = jiffies;
|
||||
|
||||
RTW_PRINT(" suspend start\n");
|
||||
RTW_INFO("==> %s (%s:%d)\n", __FUNCTION__, current->comm, current->pid);
|
||||
@ -5096,7 +5096,7 @@ exit:
|
||||
int rtw_resume_common(_adapter *padapter)
|
||||
{
|
||||
int ret = 0;
|
||||
systime start_time = rtw_get_current_time();
|
||||
systime start_time = jiffies;
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
if (pwrpriv->bInSuspend == _FALSE)
|
||||
|
@ -562,16 +562,16 @@ void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, u8 bgroup
|
||||
systime cur_time = 0;
|
||||
|
||||
if (psecuritypriv->last_mic_err_time == 0)
|
||||
psecuritypriv->last_mic_err_time = rtw_get_current_time();
|
||||
psecuritypriv->last_mic_err_time = jiffies;
|
||||
else {
|
||||
cur_time = rtw_get_current_time();
|
||||
cur_time = jiffies;
|
||||
|
||||
if (cur_time - psecuritypriv->last_mic_err_time < 60 * HZ) {
|
||||
psecuritypriv->btkip_countermeasure = _TRUE;
|
||||
psecuritypriv->last_mic_err_time = 0;
|
||||
psecuritypriv->btkip_countermeasure_time = cur_time;
|
||||
} else
|
||||
psecuritypriv->last_mic_err_time = rtw_get_current_time();
|
||||
psecuritypriv->last_mic_err_time = jiffies;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
|
@ -1167,13 +1167,13 @@ static void LinkLayerStats(_adapter *padapter)
|
||||
if (rtw_mi_check_fwstate(padapter, _FW_LINKED)) {
|
||||
if ( pwrpriv->bpower_saving == _TRUE ) {
|
||||
pwrpriv->pwr_saving_time += rtw_get_passing_time_ms(pwrpriv->pwr_saving_start_time);
|
||||
pwrpriv->pwr_saving_start_time = rtw_get_current_time();
|
||||
pwrpriv->pwr_saving_start_time = jiffies;
|
||||
}
|
||||
} else {
|
||||
#ifdef CONFIG_IPS
|
||||
if ( pwrpriv->bpower_saving == _TRUE ) {
|
||||
pwrpriv->pwr_saving_time += rtw_get_passing_time_ms(pwrpriv->pwr_saving_start_time);
|
||||
pwrpriv->pwr_saving_start_time = rtw_get_current_time();
|
||||
pwrpriv->pwr_saving_start_time = jiffies;
|
||||
}
|
||||
#else
|
||||
pwrpriv->pwr_saving_time = pwrpriv->on_time;
|
||||
|
@ -888,7 +888,7 @@ static int proc_get_tx_info_msg(struct seq_file *m, void *v)
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
|
@ -1122,7 +1122,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
|
||||
}
|
||||
}
|
||||
|
||||
pmlmeext->last_scan_time = rtw_get_current_time();
|
||||
pmlmeext->last_scan_time = jiffies;
|
||||
RTW_INFO("<======== %s return %d\n", __FUNCTION__, ret);
|
||||
|
||||
return ret;
|
||||
|
@ -442,7 +442,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
pHalData->srestpriv.last_tx_complete_time = rtw_get_current_time();
|
||||
pHalData->srestpriv.last_tx_complete_time = jiffies;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -563,7 +563,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
pHalData->srestpriv.last_tx_time = rtw_get_current_time();
|
||||
pHalData->srestpriv.last_tx_time = jiffies;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
|
@ -389,7 +389,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
||||
plist = get_next(phead);
|
||||
|
||||
/* free sta asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) {
|
||||
while (phead != plist) {
|
||||
int stainfo_offset;
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
plist = get_next(plist);
|
||||
|
@ -367,7 +367,7 @@ void rtw_mstat_update(const enum mstat_f flags, const MSTAT_STATUS status, u32 s
|
||||
|
||||
/* if (rtw_get_passing_time_ms(update_time) > 5000) { */
|
||||
/* rtw_mstat_dump(RTW_DBGDUMP); */
|
||||
update_time = rtw_get_current_time();
|
||||
update_time = jiffies;
|
||||
/* } */
|
||||
}
|
||||
|
||||
@ -847,11 +847,6 @@ void _rtw_init_sema(_sema *sema, int init_val)
|
||||
|
||||
}
|
||||
|
||||
void _rtw_free_sema(_sema *sema)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void _rtw_up_sema(_sema *sema)
|
||||
{
|
||||
|
||||
@ -999,61 +994,20 @@ u32 _rtw_queue_empty(_queue *pqueue)
|
||||
return rtw_is_list_empty(&(pqueue->queue));
|
||||
}
|
||||
|
||||
|
||||
u32 rtw_end_of_queue_search(_list *head, _list *plist)
|
||||
{
|
||||
if (head == plist)
|
||||
return _TRUE;
|
||||
else
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
|
||||
systime _rtw_get_current_time(void)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
return jiffies;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline u32 _rtw_systime_to_ms(systime stime)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return jiffies_to_msecs(stime);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline systime _rtw_ms_to_systime(u32 ms)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return msecs_to_jiffies(ms);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline systime _rtw_us_to_systime(u32 us)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return usecs_to_jiffies(us);
|
||||
#else
|
||||
#error "TBD\n"
|
||||
#endif
|
||||
}
|
||||
|
||||
/* the input parameter start use the same unit as returned by rtw_get_current_time */
|
||||
/* the input parameter start use the same unit as returned by jiffies */
|
||||
inline s32 _rtw_get_passing_time_ms(systime start)
|
||||
{
|
||||
return _rtw_systime_to_ms(_rtw_get_current_time() - start);
|
||||
return jiffies_to_msecs(jiffies - start);
|
||||
}
|
||||
|
||||
inline s32 _rtw_get_remaining_time_ms(systime end)
|
||||
{
|
||||
return _rtw_systime_to_ms(end - _rtw_get_current_time());
|
||||
return jiffies_to_msecs(end - jiffies);
|
||||
}
|
||||
|
||||
inline s32 _rtw_get_time_interval_ms(systime start, systime end)
|
||||
{
|
||||
return _rtw_systime_to_ms(end - start);
|
||||
return jiffies_to_msecs(end - start);
|
||||
}
|
||||
|
||||
inline bool _rtw_time_after(systime a, systime b)
|
||||
@ -1197,9 +1151,9 @@ inline void rtw_resume_unlock_suspend(void)
|
||||
inline void rtw_lock_suspend_timeout(u32 timeout_ms)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock_timeout(&rtw_suspend_lock, rtw_ms_to_systime(timeout_ms));
|
||||
wake_lock_timeout(&rtw_suspend_lock, msecs_to_jiffies(timeout_ms));
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
android_lock_suspend_auto_expire(&rtw_suspend_lock, rtw_ms_to_systime(timeout_ms));
|
||||
android_lock_suspend_auto_expire(&rtw_suspend_lock, msecs_to_jiffies(timeout_ms));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1207,9 +1161,9 @@ inline void rtw_lock_suspend_timeout(u32 timeout_ms)
|
||||
inline void rtw_lock_traffic_suspend_timeout(u32 timeout_ms)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock_timeout(&rtw_suspend_traffic_lock, rtw_ms_to_systime(timeout_ms));
|
||||
wake_lock_timeout(&rtw_suspend_traffic_lock, msecs_to_jiffies(timeout_ms));
|
||||
#elif defined(CONFIG_ANDROID_POWER)
|
||||
android_lock_suspend_auto_expire(&rtw_suspend_traffic_lock, rtw_ms_to_systime(timeout_ms));
|
||||
android_lock_suspend_auto_expire(&rtw_suspend_traffic_lock, msecs_to_jiffies(timeout_ms));
|
||||
#endif
|
||||
/* RTW_INFO("traffic lock timeout:%d\n", timeout_ms); */
|
||||
}
|
||||
@ -1918,20 +1872,20 @@ int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms)
|
||||
|
||||
head = &blist->queue;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
|
||||
list = get_next(list);
|
||||
|
||||
if (_rtw_memcmp(ent->addr, addr, ETH_ALEN) == _TRUE) {
|
||||
exist = _TRUE;
|
||||
if (rtw_time_after(rtw_get_current_time(), ent->exp_time))
|
||||
if (rtw_time_after(jiffies, ent->exp_time))
|
||||
timeout = _TRUE;
|
||||
ent->exp_time = rtw_get_current_time()
|
||||
+ rtw_ms_to_systime(timeout_ms);
|
||||
ent->exp_time = jiffies
|
||||
+ msecs_to_jiffies(timeout_ms);
|
||||
break;
|
||||
}
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) {
|
||||
if (rtw_time_after(jiffies, ent->exp_time)) {
|
||||
rtw_list_delete(&ent->list);
|
||||
rtw_mfree(ent, sizeof(struct blacklist_ent));
|
||||
}
|
||||
@ -1941,8 +1895,8 @@ int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms)
|
||||
ent = rtw_malloc(sizeof(struct blacklist_ent));
|
||||
if (ent) {
|
||||
memcpy(ent->addr, addr, ETH_ALEN);
|
||||
ent->exp_time = rtw_get_current_time()
|
||||
+ rtw_ms_to_systime(timeout_ms);
|
||||
ent->exp_time = jiffies
|
||||
+ msecs_to_jiffies(timeout_ms);
|
||||
rtw_list_insert_tail(&ent->list, head);
|
||||
}
|
||||
}
|
||||
@ -1962,7 +1916,7 @@ int rtw_blacklist_del(_queue *blist, const u8 *addr)
|
||||
enter_critical_bh(&blist->lock);
|
||||
head = &blist->queue;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
|
||||
list = get_next(list);
|
||||
|
||||
@ -1973,7 +1927,7 @@ int rtw_blacklist_del(_queue *blist, const u8 *addr)
|
||||
break;
|
||||
}
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) {
|
||||
if (rtw_time_after(jiffies, ent->exp_time)) {
|
||||
rtw_list_delete(&ent->list);
|
||||
rtw_mfree(ent, sizeof(struct blacklist_ent));
|
||||
}
|
||||
@ -1994,12 +1948,12 @@ int rtw_blacklist_search(_queue *blist, const u8 *addr)
|
||||
enter_critical_bh(&blist->lock);
|
||||
head = &blist->queue;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
|
||||
list = get_next(list);
|
||||
|
||||
if (_rtw_memcmp(ent->addr, addr, ETH_ALEN) == _TRUE) {
|
||||
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) {
|
||||
if (rtw_time_after(jiffies, ent->exp_time)) {
|
||||
rtw_list_delete(&ent->list);
|
||||
rtw_mfree(ent, sizeof(struct blacklist_ent));
|
||||
} else
|
||||
@ -2007,7 +1961,7 @@ int rtw_blacklist_search(_queue *blist, const u8 *addr)
|
||||
break;
|
||||
}
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) {
|
||||
if (rtw_time_after(jiffies, ent->exp_time)) {
|
||||
rtw_list_delete(&ent->list);
|
||||
rtw_mfree(ent, sizeof(struct blacklist_ent));
|
||||
}
|
||||
@ -2033,7 +1987,7 @@ void rtw_blacklist_flush(_queue *blist)
|
||||
|
||||
head = &tmp;
|
||||
list = get_next(head);
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
|
||||
list = get_next(list);
|
||||
rtw_list_delete(&ent->list);
|
||||
@ -2050,15 +2004,15 @@ void dump_blacklist(void *sel, _queue *blist, const char *title)
|
||||
head = &blist->queue;
|
||||
list = get_next(head);
|
||||
|
||||
if (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
if (head != list) {
|
||||
if (title)
|
||||
RTW_PRINT_SEL(sel, "%s:\n", title);
|
||||
|
||||
while (rtw_end_of_queue_search(head, list) == _FALSE) {
|
||||
while (head != list) {
|
||||
ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
|
||||
list = get_next(list);
|
||||
|
||||
if (rtw_time_after(rtw_get_current_time(), ent->exp_time))
|
||||
if (rtw_time_after(jiffies, ent->exp_time))
|
||||
RTW_PRINT_SEL(sel, MAC_FMT" expired\n", MAC_ARG(ent->addr));
|
||||
else
|
||||
RTW_PRINT_SEL(sel, MAC_FMT" %u\n", MAC_ARG(ent->addr)
|
||||
|
Loading…
Reference in New Issue
Block a user