Remove function rtw_end_of_queue_search()

Port of 84660700807cbcd649c58ff8ce7f65021765b15c
This commit is contained in:
Carlos Garces 2021-10-14 22:37:57 +02:00
parent bb871e7167
commit 355a2df5ab
28 changed files with 140 additions and 150 deletions

View File

@ -329,7 +329,7 @@ static bool rtw_mesh_acnode_candidate_exist(_adapter *adapter)
head = get_list_head(queue); head = get_list_head(queue);
list = get_next(head); list = get_next(head);
while (!rtw_end_of_queue_search(head, list)) { while (head != list) {
scanned = LIST_CONTAINOR(list, struct wlan_network, list); scanned = LIST_CONTAINOR(list, struct wlan_network, list);
list = get_next(list); list = get_next(list);
@ -409,7 +409,7 @@ struct sta_info *_rtw_mesh_acnode_prevent_pick_sacrifice(_adapter *adapter)
head = &stapriv->asoc_list; head = &stapriv->asoc_list;
list = get_next(head); 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); sta = LIST_CONTAINOR(list, struct sta_info, asoc_list);
list = get_next(list); list = get_next(list);
@ -627,7 +627,7 @@ static void rtw_mesh_cto_mgate_blacklist_chk(_adapter *adapter)
enter_critical_bh(&blist->lock); enter_critical_bh(&blist->lock);
head = &blist->queue; head = &blist->queue;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
ent = LIST_CONTAINOR(list, struct blacklist_ent, list); ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
list = get_next(list); list = get_next(list);
@ -748,7 +748,7 @@ void rtw_mesh_peer_status_chk(_adapter *adapter)
head = &stapriv->asoc_list; head = &stapriv->asoc_list;
list = get_next(head); 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); sta = LIST_CONTAINOR(list, struct sta_info, asoc_list);
list = get_next(list); list = get_next(list);
@ -893,7 +893,7 @@ static u8 rtw_mesh_offch_cto_mgate_required(_adapter *adapter)
head = get_list_head(queue); head = get_list_head(queue);
pos = get_next(head); pos = get_next(head);
while (!rtw_end_of_queue_search(head, pos)) { while (!head == pos) {
scanned = LIST_CONTAINOR(pos, struct wlan_network, list); scanned = LIST_CONTAINOR(pos, struct wlan_network, list);
if (rtw_get_passing_time_ms(scanned->last_scanned) < mcfg->peer_sel_policy.scanr_exp_ms 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); pos = get_next(pos);
} }
if (rtw_end_of_queue_search(head, pos)) if (head == pos)
ret = 1; ret = 1;
exit_critical_bh(&(mlme->scanned_queue.lock)); exit_critical_bh(&(mlme->scanned_queue.lock));
@ -979,7 +979,7 @@ u8 rtw_mesh_select_operating_ch(_adapter *adapter)
head = get_list_head(queue); head = get_list_head(queue);
pos = get_next(head); pos = get_next(head);
while (!rtw_end_of_queue_search(head, pos)) { while (!head == pos) {
scanned = LIST_CONTAINOR(pos, struct wlan_network, list); scanned = LIST_CONTAINOR(pos, struct wlan_network, list);
pos = get_next(pos); pos = get_next(pos);
@ -1085,7 +1085,7 @@ void dump_mesh_networks(void *sel, _adapter *adapter)
head = get_list_head(queue); head = get_list_head(queue);
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
network = LIST_CONTAINOR(list, struct wlan_network, list); network = LIST_CONTAINOR(list, struct wlan_network, list);
list = get_next(list); list = get_next(list);
@ -2643,7 +2643,7 @@ u8 rtw_mesh_ps_annc(_adapter *adapter, u8 ps)
head = &stapriv->asoc_list; head = &stapriv->asoc_list;
list = get_next(head); list = get_next(head);
while ((rtw_end_of_queue_search(head, list)) == _FALSE) { while (head != list) {
int stainfo_offset; int stainfo_offset;
sta = LIST_CONTAINOR(list, struct sta_info, asoc_list); sta = LIST_CONTAINOR(list, struct sta_info, asoc_list);
@ -2695,7 +2695,7 @@ static void mpath_tx_tasklet_hdl(void *priv)
head = &tmp; head = &tmp;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
xframe = LIST_CONTAINOR(list, struct xmit_frame, list); xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
list = get_next(list); list = get_next(list);
rtw_list_delete(&xframe->list); rtw_list_delete(&xframe->list);
@ -2726,7 +2726,7 @@ static void rtw_mpath_tx_queue_flush(_adapter *adapter)
head = &tmp; head = &tmp;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
xframe = LIST_CONTAINOR(list, struct xmit_frame, list); xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
list = get_next(list); list = get_next(list);
rtw_list_delete(&xframe->list); rtw_list_delete(&xframe->list);
@ -3253,7 +3253,7 @@ static bool rtw_mesh_data_bmc_to_uc(_adapter *adapter
head = &stapriv->asoc_list; head = &stapriv->asoc_list;
list = get_next(head); list = get_next(head);
while ((rtw_end_of_queue_search(head, list)) == _FALSE) { while (head != list) {
int stainfo_offset; int stainfo_offset;
sta = LIST_CONTAINOR(list, struct sta_info, asoc_list); sta = LIST_CONTAINOR(list, struct sta_info, asoc_list);

View File

@ -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); enter_critical_bh(&mpath->frame_queue.lock);
head = &mpath->frame_queue.queue; head = &mpath->frame_queue.queue;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
xframe = LIST_CONTAINOR(list, struct xmit_frame, list); xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
list = get_next(list); list = get_next(list);
memcpy(xframe->attrib.ra, sta->cmn.mac_addr, ETH_ALEN); 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; head = &failq;
list = get_next(head); 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) { 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" RTW_MPATH_DBG(FUNC_ADPT_FMT" mpath queue for gate %pM is full!\n"
, FUNC_ADPT_ARG(gate_mpath->adapter), gate_mpath->dst); , FUNC_ADPT_ARG(gate_mpath->adapter), gate_mpath->dst);
@ -1047,7 +1047,7 @@ void rtw_mesh_path_flush_pending(struct rtw_mesh_path *mpath)
head = &tmp; head = &tmp;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
xframe = LIST_CONTAINOR(list, struct xmit_frame, list); xframe = LIST_CONTAINOR(list, struct xmit_frame, list);
list = get_next(list); list = get_next(list);
rtw_list_delete(&xframe->list); rtw_list_delete(&xframe->list);

View File

@ -425,12 +425,12 @@ void expire_timeout_chk(_adapter *padapter)
/* check auth_queue */ /* check auth_queue */
#ifdef DBG_EXPIRATION_CHK #ifdef DBG_EXPIRATION_CHK
if (rtw_end_of_queue_search(phead, plist) == _FALSE) { if (phead != plist) {
RTW_INFO(FUNC_ADPT_FMT" auth_list, cnt:%u\n" RTW_INFO(FUNC_ADPT_FMT" auth_list, cnt:%u\n"
, FUNC_ADPT_ARG(padapter), pstapriv->auth_list_cnt); , FUNC_ADPT_ARG(padapter), pstapriv->auth_list_cnt);
} }
#endif #endif
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info, auth_list); psta = LIST_CONTAINOR(plist, struct sta_info, auth_list);
plist = get_next(plist); plist = get_next(plist);
@ -474,12 +474,12 @@ void expire_timeout_chk(_adapter *padapter)
/* check asoc_queue */ /* check asoc_queue */
#ifdef DBG_EXPIRATION_CHK #ifdef DBG_EXPIRATION_CHK
if (rtw_end_of_queue_search(phead, plist) == _FALSE) { if (phead != plist) {
RTW_INFO(FUNC_ADPT_FMT" asoc_list, cnt:%u\n" RTW_INFO(FUNC_ADPT_FMT" asoc_list, cnt:%u\n"
, FUNC_ADPT_ARG(padapter), pstapriv->asoc_list_cnt); , FUNC_ADPT_ARG(padapter), pstapriv->asoc_list_cnt);
} }
#endif #endif
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);
#ifdef CONFIG_ATMEL_RC_PATCH #ifdef CONFIG_ATMEL_RC_PATCH
@ -807,7 +807,7 @@ u8 rtw_ap_find_mini_tx_rate(_adapter *adapter)
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);
@ -1452,7 +1452,7 @@ static void rtw_ap_check_scan(_adapter *padapter)
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
phead = get_list_head(queue); phead = get_list_head(queue);
if (rtw_end_of_queue_search(phead, get_next(phead)) == _TRUE) if (phead == get_next(phead))
if (padapter->registrypriv.wifi_spec) { if (padapter->registrypriv.wifi_spec) {
do_scan = _TRUE; do_scan = _TRUE;
reason |= RTW_AUTO_SCAN_REASON_2040_BSS; reason |= RTW_AUTO_SCAN_REASON_2040_BSS;
@ -1485,7 +1485,7 @@ static void rtw_ap_check_scan(_adapter *padapter)
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
@ -2546,7 +2546,7 @@ static void _rtw_macaddr_acl_deinit(_adapter *adapter, u8 period, bool clear_onl
_enter_critical_bh(&(acl_node_q->lock), &irqL); _enter_critical_bh(&(acl_node_q->lock), &irqL);
head = get_list_head(acl_node_q); head = get_list_head(acl_node_q);
list = get_next(head); 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); acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list);
list = get_next(list); list = get_next(list);
@ -2616,7 +2616,7 @@ int rtw_acl_add_sta(_adapter *adapter, u8 period, const u8 *addr)
list = get_next(head); list = get_next(head);
/* search for existed entry */ /* search for existed entry */
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list); acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list);
list = get_next(list); list = get_next(list);
@ -2688,7 +2688,7 @@ int rtw_acl_remove_sta(_adapter *adapter, u8 period, const u8 *addr)
head = get_list_head(acl_node_q); head = get_list_head(acl_node_q);
list = get_next(head); 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); acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list);
list = get_next(list); list = get_next(list);
@ -2883,7 +2883,7 @@ u8 rtw_ap_bmc_frames_hdl(_adapter *padapter)
xmitframe_phead = get_list_head(&psta_bmc->sleep_q); xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);
@ -3515,7 +3515,7 @@ void associated_clients_update(_adapter *padapter, u8 updated, u32 sta_info_type
plist = get_next(phead); plist = get_next(phead);
/* check asoc_queue */ /* check asoc_queue */
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);
@ -3914,7 +3914,7 @@ int rtw_ap_inform_ch_switch(_adapter *padapter, u8 new_ch, u8 ch_offset)
plist = get_next(phead); plist = get_next(phead);
/* for each sta in asoc_queue */ /* for each sta in asoc_queue */
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);
@ -3949,7 +3949,7 @@ int rtw_sta_flush(_adapter *padapter, bool enqueue)
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
int stainfo_offset; int stainfo_offset;
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
@ -4073,7 +4073,7 @@ void rtw_ap_restore_network(_adapter *padapter)
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
int stainfo_offset; int stainfo_offset;
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
@ -4952,7 +4952,7 @@ u8 rtw_ap_sta_states_check(_adapter *adapter)
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);
@ -5039,7 +5039,7 @@ void tx_beacon_handlder(struct dvobj_priv *pdvobj)
padapter = NULL; padapter = NULL;
phead = get_list_head(&pdvobj->ap_if_q); phead = get_list_head(&pdvobj->ap_if_q);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
padapter = LIST_CONTAINOR(plist, struct _ADAPTER, list); padapter = LIST_CONTAINOR(plist, struct _ADAPTER, list);
plist = get_next(plist); plist = get_next(plist);

View File

@ -5227,7 +5227,7 @@ void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
phead = &st_ctl->tracker_q.queue; phead = &st_ctl->tracker_q.queue;
plist = get_next(phead); plist = get_next(phead);
pnext = get_next(plist); pnext = get_next(plist);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
st = LIST_CONTAINOR(plist, struct session_tracker, list); st = LIST_CONTAINOR(plist, struct session_tracker, list);
plist = pnext; plist = pnext;
pnext = get_next(pnext); pnext = get_next(pnext);
@ -5263,7 +5263,7 @@ void session_tracker_chk_for_sta(_adapter *adapter, struct sta_info *sta)
_exit_critical_bh(&st_ctl->tracker_q.lock, &irqL); _exit_critical_bh(&st_ctl->tracker_q.lock, &irqL);
plist = get_next(&dlist); plist = get_next(&dlist);
while (rtw_end_of_queue_search(&dlist, plist) == _FALSE) { while (&dlist != plist) {
st = LIST_CONTAINOR(plist, struct session_tracker, list); st = LIST_CONTAINOR(plist, struct session_tracker, list);
plist = get_next(plist); plist = get_next(plist);
rtw_mfree((u8 *)st, sizeof(struct session_tracker)); rtw_mfree((u8 *)st, sizeof(struct session_tracker));
@ -5294,7 +5294,7 @@ void session_tracker_chk_for_adapter(_adapter *adapter)
phead = &(stapriv->sta_hash[i]); phead = &(stapriv->sta_hash[i]);
plist = get_next(phead); 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); sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
@ -5352,7 +5352,7 @@ void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
phead = &st_ctl->tracker_q.queue; phead = &st_ctl->tracker_q.queue;
plist = get_next(phead); plist = get_next(phead);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
st = LIST_CONTAINOR(plist, struct session_tracker, list); st = LIST_CONTAINOR(plist, struct session_tracker, list);
if (st->local_naddr == local_naddr if (st->local_naddr == local_naddr
@ -5364,7 +5364,7 @@ void session_tracker_cmd_hdl(_adapter *adapter, struct st_cmd_parm *parm)
plist = get_next(plist); plist = get_next(plist);
} }
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
st = NULL; st = NULL;
switch (cmd) { switch (cmd) {

View File

@ -842,7 +842,7 @@ int proc_get_rx_stat(struct seq_file *m, void *v)
for (i = 0; i < NUM_STA; i++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
pstats = &psta->sta_stats; 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++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE) 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); 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) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE) if ((_rtw_memcmp(psta->cmn.mac_addr, bc_addr, ETH_ALEN) != _TRUE)
@ -3662,7 +3662,7 @@ int proc_get_all_sta_info(struct seq_file *m, void *v)
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); 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++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
if (psta->tdls_sta_state != TDLS_STATE_NONE) { 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]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN); 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]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN); memcpy(&mac_addr[psta->cmn.mac_id][0], psta->cmn.mac_addr, ETH_ALEN);

View File

@ -480,7 +480,7 @@ void _rtw_free_network_queue(_adapter *padapter, u8 isfreeall)
phead = get_list_head(scanned_queue); phead = get_list_head(scanned_queue);
plist = get_next(phead); plist = get_next(phead);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pwlan = LIST_CONTAINOR(plist, struct wlan_network, list); pwlan = LIST_CONTAINOR(plist, struct wlan_network, list);
@ -962,7 +962,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
#endif #endif
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
@ -3661,7 +3661,7 @@ int rtw_select_roaming_candidate(struct mlme_priv *mlme)
mlme->pscanned = get_next(phead); 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); pnetwork = LIST_CONTAINOR(mlme->pscanned, struct wlan_network, list);
if (pnetwork == NULL) { if (pnetwork == NULL) {
@ -3855,7 +3855,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
phead = get_list_head(queue); phead = get_list_head(queue);
pmlmepriv->pscanned = get_next(phead); 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); pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list);
if (pnetwork == NULL) { if (pnetwork == NULL) {

View File

@ -3549,7 +3549,7 @@ u16 rtw_rx_ampdu_apply(_adapter *adapter)
phead = &pstapriv->asoc_list; phead = &pstapriv->asoc_list;
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
int stainfo_offset; int stainfo_offset;
sta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); sta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
@ -10457,7 +10457,7 @@ void issue_action_BSSCoexistPacket(_adapter *padapter)
u8 *p; u8 *p;
WLAN_BSSID_EX *pbss_network; WLAN_BSSID_EX *pbss_network;
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
@ -11306,7 +11306,7 @@ void start_clnt_join(_adapter *padapter)
_enter_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL); _enter_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL);
for (pos = get_next(head); !rtw_end_of_queue_search(head, pos); pos = get_next(pos)) { for (pos = get_next(head); !head == pos; pos = get_next(pos)) {
scanned = LIST_CONTAINOR(pos, struct wlan_network, list); scanned = LIST_CONTAINOR(pos, struct wlan_network, list);
@ -11322,7 +11322,7 @@ void start_clnt_join(_adapter *padapter)
_exit_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL); _exit_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL);
if (scanned == NULL || rtw_end_of_queue_search(head, pos) || has_p2p_ie == _FALSE) if (scanned == NULL || head == pos || has_p2p_ie == _FALSE)
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
/* To avoid connecting to AP fail during resume process, change retry count from 5 to 1 */ /* To avoid connecting to AP fail during resume process, change retry count from 5 to 1 */
issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, 1, 100); issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, 1, 100);
@ -12697,7 +12697,7 @@ void linked_status_chk_tdls(_adapter *padapter)
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
@ -12979,7 +12979,7 @@ bypass_active_keep_alive:
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
@ -13001,7 +13001,7 @@ bypass_active_keep_alive:
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL); _exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
plist = get_next(&dlist); plist = get_next(&dlist);
while (rtw_end_of_queue_search(&dlist, plist) == _FALSE) { while (&dlist != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info, list); psta = LIST_CONTAINOR(plist, struct sta_info, list);
plist = get_next(plist); plist = get_next(plist);
rtw_list_delete(&psta->list); rtw_list_delete(&psta->list);
@ -15888,7 +15888,7 @@ u8 chk_bmc_sleepq_hdl(_adapter *padapter, unsigned char *pbuf)
xmitframe_phead = get_list_head(&psta_bmc->sleep_q); xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);

View File

@ -64,7 +64,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
plist = get_next(phead); plist = get_next(phead);
/* look up sta asoc_queue */ /* 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); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);
@ -2459,7 +2459,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
plist = get_next(phead); plist = get_next(phead);
/* look up sta asoc_queue */ /* 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); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);

View File

@ -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]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)
@ -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]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); ptdls_sta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE) if (ptdls_sta->tdls_sta_state & TDLS_LINKED_STATE)

View File

@ -345,7 +345,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue)
phead = get_list_head(pframequeue); phead = get_list_head(pframequeue);
plist = get_next(phead); plist = get_next(phead);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
precvframe = LIST_CONTAINOR(plist, union recv_frame, u); precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
plist = get_next(plist); plist = get_next(plist);
@ -1627,7 +1627,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);
@ -2692,7 +2692,7 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
data = get_recvframe_data(prframe); 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); pnextrframe = LIST_CONTAINOR(plist, union recv_frame , u);
pnfhdr = &pnextrframe->u.hdr; pnfhdr = &pnextrframe->u.hdr;
@ -2940,7 +2940,7 @@ static void recv_free_fwd_resource(_adapter *adapter, struct xmit_frame *fwd_fra
_list *list; _list *list;
list = get_next(b2u_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); b2uframe = LIST_CONTAINOR(list, struct xmit_frame, list);
list = get_next(list); list = get_next(list);
rtw_list_delete(&b2uframe->list); rtw_list_delete(&b2uframe->list);
@ -2974,7 +2974,7 @@ static void recv_fwd_pkt_hdl(_adapter *adapter, _pkt *pkt
_list *list = get_next(b2u_list); _list *list = get_next(b2u_list);
struct xmit_frame *b2uframe; 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); b2uframe = LIST_CONTAINOR(list, struct xmit_frame, list);
list = get_next(list); list = get_next(list);
rtw_list_delete(&b2uframe->list); rtw_list_delete(&b2uframe->list);
@ -3314,7 +3314,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
phead = get_list_head(ppending_recvframe_queue); phead = get_list_head(ppending_recvframe_queue);
plist = get_next(phead); plist = get_next(phead);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u); pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
pnextattrib = &pnextrframe->u.hdr.attrib; pnextattrib = &pnextrframe->u.hdr.attrib;

View File

@ -593,7 +593,7 @@ void _dump_regd_exc_list(void *sel, struct rf_ctl_t *rfctl)
head = &rfctl->reg_exc_list; head = &rfctl->reg_exc_list;
cur = get_next(head); cur = get_next(head);
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) { while (head != cur) {
u8 has_country; u8 has_country;
ent = LIST_CONTAINOR(cur, struct regd_exc_ent, list); 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; head = &rfctl->reg_exc_list;
cur = get_next(head); cur = get_next(head);
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) { while (head != cur) {
u8 has_country; u8 has_country;
ent = LIST_CONTAINOR(cur, struct regd_exc_ent, list); 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; head = &rfctl->reg_exc_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct regd_exc_ent, list);
cur = get_next(cur); cur = get_next(cur);
rtw_list_delete(&ent->list); rtw_list_delete(&ent->list);
@ -869,7 +869,7 @@ void dump_txpwr_lmt(void *sel, _adapter *adapter)
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
@ -892,7 +892,7 @@ void dump_txpwr_lmt(void *sel, _adapter *adapter)
_RTW_PRINT_SEL(sel, "|"); _RTW_PRINT_SEL(sel, "|");
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
_RTW_PRINT_SEL(sel, "%3c " _RTW_PRINT_SEL(sel, "%3c "
@ -922,7 +922,7 @@ void dump_txpwr_lmt(void *sel, _adapter *adapter)
RTW_PRINT_SEL(sel, "%3u ", ch); RTW_PRINT_SEL(sel, "%3u ", ch);
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
lmt = phy_get_txpwr_lmt_abs(adapter, ent->regd_name, band, bw, tlrs, ntx_idx, ch, 0); 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; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); cur = get_next(head);
i = 0; i = 0;
while ((rtw_end_of_queue_search(head, cur)) == _FALSE) { while (head != cur) {
ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
lmt_offset = phy_get_txpwr_lmt(adapter, ent->regd_name, band, bw, path, rs, ntx_idx, ch, 0); 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 */ /* search for existed entry */
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); 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; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
@ -1172,7 +1172,7 @@ void rtw_txpwr_lmt_list_free(struct rf_ctl_t *rfctl)
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
if (ent->regd_name == rfctl->regd_name) if (ent->regd_name == rfctl->regd_name)

View File

@ -1423,7 +1423,7 @@ static int retrieve_scan_result(struct rm_obj *prm)
/* search scan queue to find requested SSID */ /* search scan queue to find requested SSID */
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
@ -2050,7 +2050,7 @@ void rm_dbg_list_sta(_adapter *padapter, char *s)
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, psta = LIST_CONTAINOR(plist,
struct sta_info, hash_list); 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]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, psta = LIST_CONTAINOR(plist,
struct sta_info, hash_list); struct sta_info, hash_list);
@ -2395,7 +2395,7 @@ static void rm_dbg_list_meas(_adapter *padapter, char *s)
plist = get_next(phead); plist = get_next(phead);
meas_amount = 0; meas_amount = 0;
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
prm = LIST_CONTAINOR(plist, struct rm_obj, list); prm = LIST_CONTAINOR(plist, struct rm_obj, list);
meas_amount++; meas_amount++;
plist = get_next(plist); plist = get_next(plist);

View File

@ -329,7 +329,7 @@ static struct rm_obj *_rm_get_rmobj(_queue *queue, u32 rmid)
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
prm = LIST_CONTAINOR(plist, struct rm_obj, list); prm = LIST_CONTAINOR(plist, struct rm_obj, list);
if (rmid == (prm->rmid)) { 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); _enter_critical(&queue->lock, &irqL);
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
prm = LIST_CONTAINOR(plist, struct rm_obj, list); prm = LIST_CONTAINOR(plist, struct rm_obj, list);
plist = get_next(plist); plist = get_next(plist);

View File

@ -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"); 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) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);

View File

@ -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); _enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
phead = &st_ctl->tracker_q.queue; phead = &st_ctl->tracker_q.queue;
plist = get_next(phead); plist = get_next(phead);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
st = LIST_CONTAINOR(plist, struct session_tracker, list); st = LIST_CONTAINOR(plist, struct session_tracker, list);
plist = get_next(plist); plist = get_next(plist);
rtw_list_delete(&st->list); 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); _enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
phead = &st_ctl->tracker_q.queue; phead = &st_ctl->tracker_q.queue;
plist = get_next(phead); plist = get_next(phead);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
st = LIST_CONTAINOR(plist, struct session_tracker, list); st = LIST_CONTAINOR(plist, struct session_tracker, list);
plist = get_next(plist); 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); phead = get_list_head(&pstapriv->free_sta_queue);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info , list); psta = LIST_CONTAINOR(plist, struct sta_info , list);
plist = get_next(plist); plist = get_next(plist);
} }
@ -391,7 +391,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
phead = &(pstapriv->sta_hash[index]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
int i; int i;
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list); psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
plist = get_next(plist); plist = get_next(plist);
@ -803,7 +803,7 @@ void rtw_free_all_stainfo(_adapter *padapter)
phead = &(pstapriv->sta_hash[index]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
plist = get_next(plist); 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); 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); 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); _enter_critical_bh(&(acl_node_q->lock), &irqL);
head = get_list_head(acl_node_q); head = get_list_head(acl_node_q);
list = get_next(head); 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); acl_node = LIST_CONTAINOR(list, struct rtw_wlan_acl_node, list);
list = get_next(list); list = get_next(list);

View File

@ -111,7 +111,7 @@ void rtw_free_all_tdls_sta(_adapter *padapter, u8 enqueue_cmd)
phead = &(pstapriv->sta_hash[index]); phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
@ -231,7 +231,7 @@ u8 rtw_is_tdls_sta_existed(_adapter *padapter)
for (i = 0; i < NUM_STA; i++) { for (i = 0; i < NUM_STA; i++) {
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);
if (psta->tdls_sta_state != TDLS_STATE_NONE) { if (psta->tdls_sta_state != TDLS_STATE_NONE) {
@ -2478,7 +2478,7 @@ int On_TDLS_Peer_Traffic_Rsp(_adapter *padapter, union recv_frame *precv_frame,
xmitframe_plist = get_next(xmitframe_phead); xmitframe_plist = get_next(xmitframe_phead);
/* transmit buffered frames */ /* 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);
rtw_list_delete(&pxmitframe->list); rtw_list_delete(&pxmitframe->list);

View File

@ -3656,7 +3656,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue)
phead = get_list_head(pframequeue); phead = get_list_head(pframequeue);
plist = get_next(phead); plist = get_next(phead);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list); pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
@ -3688,7 +3688,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
xmitframe_phead = get_list_head(pframe_queue); xmitframe_phead = get_list_head(pframe_queue);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
/* xmitframe_plist = get_next(xmitframe_plist); */ /* xmitframe_plist = get_next(xmitframe_plist); */
@ -3730,7 +3730,7 @@ static struct xmit_frame *get_one_xmitframe(struct xmit_priv *pxmitpriv, struct
xmitframe_phead = get_list_head(pframe_queue); xmitframe_phead = get_list_head(pframe_queue);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
break; break;
} }
@ -3773,7 +3773,7 @@ struct xmit_frame *rtw_get_xframe(struct xmit_priv *pxmitpriv, int *num_frame)
sta_phead = get_list_head(phwxmit->sta_queue); sta_phead = get_list_head(phwxmit->sta_queue);
sta_plist = get_next(sta_phead); 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); ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
pframe_queue = &ptxservq->sta_pending; pframe_queue = &ptxservq->sta_pending;
@ -3839,7 +3839,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
sta_phead = get_list_head(phwxmit->sta_queue); sta_phead = get_list_head(phwxmit->sta_queue);
sta_plist = get_next(sta_phead); 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); ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
@ -4598,7 +4598,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
_list *list = get_next(&b2u_list); _list *list = get_next(&b2u_list);
struct xmit_frame *b2uframe; 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); b2uframe = LIST_CONTAINOR(list, struct xmit_frame, list);
list = get_next(list); list = get_next(list);
rtw_list_delete(&b2uframe->list); rtw_list_delete(&b2uframe->list);
@ -4930,7 +4930,7 @@ static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_
phead = get_list_head(pframequeue); phead = get_list_head(pframequeue);
plist = get_next(phead); plist = get_next(phead);
while (rtw_end_of_queue_search(phead, plist) == _FALSE) { while (phead != plist) {
pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list); pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
plist = get_next(plist); plist = get_next(plist);
@ -5028,7 +5028,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);
@ -5128,7 +5128,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
xmitframe_phead = get_list_head(&psta_bmc->sleep_q); xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);
@ -5203,7 +5203,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_phead = get_list_head(&psta->sleep_q);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);

View File

@ -12442,7 +12442,7 @@ void rtw_dump_rx_dframe_info(_adapter *padapter, void *sel)
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);

View File

@ -2960,7 +2960,7 @@ s8 phy_get_txpwr_lmt_abs(
lmt = hal_spec->txgi_max; lmt = hal_spec->txgi_max;
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
if (ent->lmt_2g[bw][tlrs][ch_idx][ntx_idx] != ww_lmt_val) 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; lmt = hal_spec->txgi_max;
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
if (ent->lmt_5g[bw][tlrs - 1][ch_idx][ntx_idx] != ww_lmt_val) 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; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
@ -3245,7 +3245,7 @@ static void phy_txpwr_lmt_cross_ref_ht_vht(_adapter *adapter)
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);
@ -3427,7 +3427,7 @@ void phy_txpwr_limit_bandwidth_chk(_adapter *adapter)
head = &rfctl->txpwr_lmt_list; head = &rfctl->txpwr_lmt_list;
cur = get_next(head); 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); ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list);
cur = get_next(cur); cur = get_next(cur);

View File

@ -38,7 +38,7 @@ static void _rtw_bss_nums_count(_adapter *adapter, u8 *pbss_nums)
phead = get_list_head(queue); phead = get_list_head(queue);
plist = get_next(phead); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);

View File

@ -459,7 +459,7 @@ static void rtw_hal_config_mcc_role_setting(PADAPTER padapter, u8 order)
plist = get_next(phead); plist = get_next(phead);
pmccadapriv->mcc_macid_bitmap = 0; 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); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);
pmccadapriv->mcc_macid_bitmap |= BIT(psta->cmn.mac_id); pmccadapriv->mcc_macid_bitmap |= BIT(psta->cmn.mac_id);

View File

@ -568,12 +568,12 @@ s32 rtl8192eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
sta_phead = get_list_head(phwxmit->sta_queue); sta_phead = get_list_head(phwxmit->sta_queue);
sta_plist = get_next(sta_phead); 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_phead = get_list_head(&ptxservq->sta_pending);
xmitframe_plist = get_next(xmitframe_phead); 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); pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist); xmitframe_plist = get_next(xmitframe_plist);

View File

@ -273,7 +273,6 @@ extern void _rtw_spinunlock_ex(_lock *plock);
extern void _rtw_init_queue(_queue *pqueue); extern void _rtw_init_queue(_queue *pqueue);
extern void _rtw_deinit_queue(_queue *pqueue); extern void _rtw_deinit_queue(_queue *pqueue);
extern u32 _rtw_queue_empty(_queue *pqueue); extern u32 _rtw_queue_empty(_queue *pqueue);
extern u32 rtw_end_of_queue_search(_list *queue, _list *pelement);
extern s32 _rtw_get_passing_time_ms(systime start); extern s32 _rtw_get_passing_time_ms(systime start);
extern s32 _rtw_get_remaining_time_ms(systime end); extern s32 _rtw_get_remaining_time_ms(systime end);

View File

@ -2633,7 +2633,7 @@ static void _rtw_cfg80211_surveydone_event_callback(_adapter *padapter, struct c
plist = get_next(phead); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
@ -5531,7 +5531,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
plist = get_next(phead); plist = get_next(phead);
/* check asoc_queue */ /* check asoc_queue */
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); 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); plist = get_next(phead);
/* check asoc_queue */ /* check asoc_queue */
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
if (idx == i) if (idx == i)
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);

View File

@ -1725,7 +1725,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
while (1) { while (1) {
if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == _TRUE) { if (phead != pmlmepriv->pscanned) {
#if 0 #if 0
ret = -EINVAL; ret = -EINVAL;
goto cancel_ps_deny; 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
if ((stop - ev) < SCAN_ITEM_SIZE) { 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); pmlmepriv->pscanned = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == _TRUE) { if (phead != pmlmepriv->pscanned) {
#if 0 #if 0
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) { if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) {
rtw_set_802_11_ssid(padapter, &ndis_ssid); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
@ -4241,7 +4241,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
plist = get_next(phead); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); 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); plist = get_next(phead);
while (1) { while (1) {
if (rtw_end_of_queue_search(phead, plist) == _TRUE) if (phead == plist)
break; break;
if (uintPeerChannel != 0) if (uintPeerChannel != 0)
@ -6177,7 +6177,7 @@ static int rtw_dbg_port(struct net_device *dev,
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
plist = get_next(plist); plist = get_next(plist);

View File

@ -888,7 +888,7 @@ static int proc_get_tx_info_msg(struct seq_file *m, void *v)
phead = &(pstapriv->sta_hash[i]); phead = &(pstapriv->sta_hash[i]);
plist = get_next(phead); 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); psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);

View File

@ -389,7 +389,7 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
plist = get_next(phead); plist = get_next(phead);
/* free sta asoc_queue */ /* free sta asoc_queue */
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) { while (phead != plist) {
int stainfo_offset; int stainfo_offset;
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
plist = get_next(plist); plist = get_next(plist);

View File

@ -994,15 +994,6 @@ u32 _rtw_queue_empty(_queue *pqueue)
return rtw_is_list_empty(&(pqueue->queue)); 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;
}
/* the input parameter start use the same unit as returned by jiffies */ /* the input parameter start use the same unit as returned by jiffies */
inline s32 _rtw_get_passing_time_ms(systime start) inline s32 _rtw_get_passing_time_ms(systime start)
{ {
@ -1881,7 +1872,7 @@ int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms)
head = &blist->queue; head = &blist->queue;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
ent = LIST_CONTAINOR(list, struct blacklist_ent, list); ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
list = get_next(list); list = get_next(list);
@ -1925,7 +1916,7 @@ int rtw_blacklist_del(_queue *blist, const u8 *addr)
enter_critical_bh(&blist->lock); enter_critical_bh(&blist->lock);
head = &blist->queue; head = &blist->queue;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
ent = LIST_CONTAINOR(list, struct blacklist_ent, list); ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
list = get_next(list); list = get_next(list);
@ -1957,7 +1948,7 @@ int rtw_blacklist_search(_queue *blist, const u8 *addr)
enter_critical_bh(&blist->lock); enter_critical_bh(&blist->lock);
head = &blist->queue; head = &blist->queue;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
ent = LIST_CONTAINOR(list, struct blacklist_ent, list); ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
list = get_next(list); list = get_next(list);
@ -1996,7 +1987,7 @@ void rtw_blacklist_flush(_queue *blist)
head = &tmp; head = &tmp;
list = get_next(head); list = get_next(head);
while (rtw_end_of_queue_search(head, list) == _FALSE) { while (head != list) {
ent = LIST_CONTAINOR(list, struct blacklist_ent, list); ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
list = get_next(list); list = get_next(list);
rtw_list_delete(&ent->list); rtw_list_delete(&ent->list);
@ -2013,11 +2004,11 @@ void dump_blacklist(void *sel, _queue *blist, const char *title)
head = &blist->queue; head = &blist->queue;
list = get_next(head); list = get_next(head);
if (rtw_end_of_queue_search(head, list) == _FALSE) { if (head != list) {
if (title) if (title)
RTW_PRINT_SEL(sel, "%s:\n", 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); ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
list = get_next(list); list = get_next(list);