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);
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);
@@ -627,7 +627,7 @@ 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);
@@ -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);
@@ -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);
@@ -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);

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);
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);
@@ -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);