staging: r8188eu: Eliminate macro to get next list item
authorLarry Finger <Larry.Finger@lwfinger.net>
Sun, 9 Feb 2014 21:15:58 +0000 (15:15 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 20:41:15 +0000 (12:41 -0800)
The driver contains a macro that gets the next item in a linked list.
Replace it with a simple copy of the pointer.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 files changed:
drivers/staging/rtl8188eu/core/rtw_ap.c
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/core/rtw_debug.c
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
drivers/staging/rtl8188eu/core/rtw_mlme.c
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/core/rtw_p2p.c
drivers/staging/rtl8188eu/core/rtw_recv.c
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
drivers/staging/rtl8188eu/include/osdep_service.h
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
drivers/staging/rtl8188eu/os_dep/xmit_linux.c

index f32011cde44a541205807ef8cb3076d6a81e5da7..62a614706308e3aba40048410759d16ede29380a 100644 (file)
@@ -285,12 +285,12 @@ void      expire_timeout_chk(struct adapter *padapter)
        spin_lock_bh(&pstapriv->auth_list_lock);
 
        phead = &pstapriv->auth_list;
-       plist = get_next(phead);
+       plist = phead->next;
 
        /* check auth_queue */
        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                psta = container_of(plist, struct sta_info, auth_list);
-               plist = get_next(plist);
+               plist = plist->next;
 
                if (psta->expire_to > 0) {
                        psta->expire_to--;
@@ -319,12 +319,12 @@ void      expire_timeout_chk(struct adapter *padapter)
        spin_lock_bh(&pstapriv->asoc_list_lock);
 
        phead = &pstapriv->asoc_list;
-       plist = get_next(phead);
+       plist = phead->next;
 
        /* check asoc_queue */
        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                psta = container_of(plist, struct sta_info, asoc_list);
-               plist = get_next(plist);
+               plist = plist->next;
 
                if (chk_sta_is_alive(psta) || !psta->expire_to) {
                        psta->expire_to = pstapriv->expire_to;
@@ -1144,11 +1144,11 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
        spin_lock_bh(&(pacl_node_q->lock));
 
        phead = get_list_head(pacl_node_q);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (!rtw_end_of_queue_search(phead, plist)) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
-               plist = get_next(plist);
+               plist = plist->next;
 
                if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
                        if (paclnode->valid) {
@@ -1205,11 +1205,11 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
        spin_lock_bh(&(pacl_node_q->lock));
 
        phead = get_list_head(pacl_node_q);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (!rtw_end_of_queue_search(phead, plist)) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
-               plist = get_next(plist);
+               plist = plist->next;
 
                if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
                        if (paclnode->valid) {
@@ -1503,13 +1503,13 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
                spin_lock_bh(&pstapriv->asoc_list_lock);
 
                phead = &pstapriv->asoc_list;
-               plist = get_next(phead);
+               plist = phead->next;
 
                /* check asoc_queue */
                while ((rtw_end_of_queue_search(phead, plist)) == false) {
                        psta = container_of(plist, struct sta_info, asoc_list);
 
-                       plist = get_next(plist);
+                       plist = plist->next;
 
                        VCS_update(padapter, psta);
                }
@@ -1777,12 +1777,12 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
 
        spin_lock_bh(&pstapriv->asoc_list_lock);
        phead = &pstapriv->asoc_list;
-       plist = get_next(phead);
+       plist = phead->next;
 
        /* for each sta in asoc_queue */
        while (!rtw_end_of_queue_search(phead, plist)) {
                psta = container_of(plist, struct sta_info, asoc_list);
-               plist = get_next(plist);
+               plist = plist->next;
 
                issue_action_spct_ch_switch(padapter, psta->hwaddr, new_ch, ch_offset);
                psta->expire_to = ((pstapriv->expire_to * 2) > 5) ? 5 : (pstapriv->expire_to * 2);
@@ -1811,13 +1811,13 @@ int rtw_sta_flush(struct adapter *padapter)
 
        spin_lock_bh(&pstapriv->asoc_list_lock);
        phead = &pstapriv->asoc_list;
-       plist = get_next(phead);
+       plist = phead->next;
 
        /* free sta asoc_queue */
        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                psta = container_of(plist, struct sta_info, asoc_list);
 
-               plist = get_next(plist);
+               plist = plist->next;
 
                rtw_list_delete(&psta->asoc_list);
                pstapriv->asoc_list_cnt--;
@@ -1942,10 +1942,10 @@ void stop_ap_mode(struct adapter *padapter)
        /* for ACL */
        spin_lock_bh(&(pacl_node_q->lock));
        phead = get_list_head(pacl_node_q);
-       plist = get_next(phead);
+       plist = phead->next;
        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
-               plist = get_next(plist);
+               plist = plist->next;
 
                if (paclnode->valid) {
                        paclnode->valid = false;
index d24252de84f93a9205bf92823b7a731db193e896..cc322e5b0d6cb658f98d47fa32856e3298cc43c3 100644 (file)
@@ -173,7 +173,7 @@ _func_enter_;
        if (rtw_is_list_empty(&(queue->queue))) {
                obj = NULL;
        } else {
-               obj = container_of(get_next(&(queue->queue)), struct cmd_obj, list);
+               obj = container_of((&queue->queue)->next, struct cmd_obj, list);
                rtw_list_delete(&obj->list);
        }
 
index 76e7b7b582f04fda9192a53e6f4ce4d81c8d77c8..1812ba9659b8d0f9b1f3648adf9017211dec3627 100644 (file)
@@ -851,12 +851,12 @@ int proc_get_all_sta_info(char *page, char **start,
 
        for (i = 0; i < NUM_STA; i++) {
                phead = &(pstapriv->sta_hash[i]);
-               plist = get_next(phead);
+               plist = phead->next;
 
                while ((rtw_end_of_queue_search(phead, plist)) == false) {
                        psta = container_of(plist, struct sta_info, hash_list);
 
-                       plist = get_next(plist);
+                       plist = plist->next;
 
                        len += snprintf(page + len, count - len, "sta's macaddr: %pM\n", psta->hwaddr);
                        len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
index 125ba4c70bf29630bf5ee05f2830e50937700be7..0f0f515b0596450f0a082aba153f87b2790fbf35 100644 (file)
@@ -78,7 +78,7 @@ _func_enter_;
 
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("\n rtw_do_join: phead = %p; plist = %p\n\n\n", phead, plist));
 
index 55090d7074ddfa3bd0ea44ad9e21346138aaed53..700a34d73c2d9ece54127bd9c39968d557f4bd7f 100644 (file)
@@ -167,7 +167,7 @@ _func_enter_;
        if (_rtw_queue_empty(queue)) {
                pnetwork = NULL;
        } else {
-               pnetwork = container_of(get_next(&queue->queue), struct wlan_network, list);
+               pnetwork = container_of((&queue->queue)->next, struct wlan_network, list);
 
                rtw_list_delete(&(pnetwork->list));
        }
@@ -193,7 +193,7 @@ _func_enter_;
                pnetwork = NULL;
                goto exit;
        }
-       plist = get_next(&(free_queue->queue));
+       plist = free_queue->queue.next;
 
        pnetwork = container_of(plist , struct wlan_network, list);
 
@@ -282,13 +282,13 @@ _func_enter_;
                goto exit;
        }
        phead = get_list_head(scanned_queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (plist != phead) {
                pnetwork = container_of(plist, struct wlan_network , list);
                if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN) == true)
                        break;
-               plist = get_next(plist);
+               plist = plist->next;
        }
        if (plist == phead)
                pnetwork = NULL;
@@ -311,12 +311,12 @@ _func_enter_;
        spin_lock_bh(&scanned_queue->lock);
 
        phead = get_list_head(scanned_queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (rtw_end_of_queue_search(phead, plist) == false) {
                pnetwork = container_of(plist, struct wlan_network, list);
 
-               plist = get_next(plist);
+               plist = plist->next;
 
                _rtw_free_network(pmlmepriv, pnetwork, isfreeall);
        }
@@ -494,7 +494,7 @@ struct      wlan_network    *rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
 _func_enter_;
        phead = get_list_head(scanned_queue);
 
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -507,7 +507,7 @@ _func_enter_;
                                oldest = pwlan;
                }
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 _func_exit_;
        return oldest;
@@ -587,7 +587,7 @@ _func_enter_;
 
        spin_lock_bh(&queue->lock);
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -600,7 +600,7 @@ _func_enter_;
                if ((oldest == ((struct wlan_network *)0)) ||
                    time_after(oldest->last_scanned, pnetwork->last_scanned))
                        oldest = pnetwork;
-               plist = get_next(plist);
+               plist = plist->next;
        }
        /* If we didn't find a match, then get a new network slot to initialize
         * with this beacon's information */
@@ -908,10 +908,10 @@ _func_enter_;
        spin_lock_bh(&free_queue->lock);
 
        phead = get_list_head(scan_queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (plist != phead) {
-               ptemp = get_next(plist);
+               ptemp = plist->next;
                rtw_list_delete(plist);
                rtw_list_insert_tail(plist, &free_queue->queue);
                plist = ptemp;
@@ -1747,7 +1747,7 @@ _func_enter_;
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
        phead = get_list_head(queue);
        adapter = (struct adapter *)pmlmepriv->nic_hdl;
-       pmlmepriv->pscanned = get_next(phead);
+       pmlmepriv->pscanned = phead->next;
        while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) {
                pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
                if (pnetwork == NULL) {
@@ -1755,7 +1755,7 @@ _func_enter_;
                        ret = _FAIL;
                        goto exit;
                }
-               pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
+               pmlmepriv->pscanned = pmlmepriv->pscanned->next;
                rtw_check_join_candidate(pmlmepriv, &candidate, pnetwork);
        }
        if (candidate == NULL) {
index 8e923352d1e9fee2880dffc15af9679950623841..2c5d704b0a4d45171f479ae450a3bc1af1df7d80 100644 (file)
@@ -6226,7 +6226,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
                spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
                phead = get_list_head(queue);
-               plist = get_next(phead);
+               plist = phead->next;
 
                while (1) {
                        int len;
@@ -6238,7 +6238,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
 
                        pnetwork = container_of(plist, struct wlan_network, list);
 
-                       plist = get_next(plist);
+                       plist = plist->next;
 
                        pbss_network = (struct wlan_bssid_ex *)&pnetwork->network;
 
@@ -8372,12 +8372,12 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
                        spin_lock_bh(&psta_bmc->sleep_q.lock);
 
                        xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
-                       xmitframe_plist = get_next(xmitframe_phead);
+                       xmitframe_plist = xmitframe_phead->next;
 
                        while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
                                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
-                               xmitframe_plist = get_next(xmitframe_plist);
+                               xmitframe_plist = xmitframe_plist->next;
 
                                rtw_list_delete(&pxmitframe->list);
 
index e91a2eeb20843ef0783abfe89f5b3b0d966469cf..4670eb371a9d46a068b57581fa36a7415c014ac8 100644 (file)
@@ -57,13 +57,13 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
 
        spin_lock_bh(&pstapriv->asoc_list_lock);
        phead = &pstapriv->asoc_list;
-       plist = get_next(phead);
+       plist = phead->next;
 
        /* look up sta asoc_queue */
        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                psta = container_of(plist, struct sta_info, asoc_list);
 
-               plist = get_next(plist);
+               plist = plist->next;
 
 
                if (psta->is_p2p_device) {
@@ -980,13 +980,13 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
 
                                        spin_lock_bh(&pstapriv->asoc_list_lock);
                                        phead = &pstapriv->asoc_list;
-                                       plist = get_next(phead);
+                                       plist = phead->next;
 
                                        /* look up sta asoc_queue */
                                        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                                                psta = container_of(plist, struct sta_info, asoc_list);
 
-                                               plist = get_next(plist);
+                                               plist = plist->next;
 
                                                if (psta->is_p2p_device && (psta->dev_cap&P2P_DEVCAP_CLIENT_DISCOVERABILITY) &&
                                                    !memcmp(psta->dev_addr, dev_addr, ETH_ALEN)) {
index 8ef31902f9281e647f777965726f8e0a36320d81..e624afe0f86b1c84dce84867dc42b32c9b810d68 100644 (file)
@@ -149,7 +149,7 @@ _func_enter_;
        } else {
                phead = get_list_head(pfree_recv_queue);
 
-               plist = get_next(phead);
+               plist = phead->next;
 
                hdr = container_of(plist, struct recv_frame_hdr, list);
 
@@ -271,12 +271,12 @@ _func_enter_;
        spin_lock(&pframequeue->lock);
 
        phead = get_list_head(pframequeue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (rtw_end_of_queue_search(phead, plist) == false) {
                hdr = container_of(plist, struct recv_frame_hdr, list);
 
-               plist = get_next(plist);
+               plist = plist->next;
 
                rtw_free_recvframe((union recv_frame *)hdr, pfree_recv_queue);
        }
@@ -336,7 +336,7 @@ struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue)
        } else {
                phead = get_list_head(queue);
 
-               plist = get_next(phead);
+               plist = phead->next;
 
                precvbuf = container_of(plist, struct recv_buf, list);
 
@@ -1097,12 +1097,12 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
                        spin_lock_bh(&psta->sleep_q.lock);
 
                        xmitframe_phead = get_list_head(&psta->sleep_q);
-                       xmitframe_plist = get_next(xmitframe_phead);
+                       xmitframe_plist = xmitframe_phead->next;
 
                        if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
                                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
-                               xmitframe_plist = get_next(xmitframe_plist);
+                               xmitframe_plist = xmitframe_plist->next;
 
                                rtw_list_delete(&pxmitframe->list);
 
@@ -1515,7 +1515,7 @@ _func_enter_;
        pfree_recv_queue = &adapter->recvpriv.free_recv_queue;
 
        phead = get_list_head(defrag_q);
-       plist = get_next(phead);
+       plist = phead->next;
        pfhdr = container_of(plist, struct recv_frame_hdr, list);
        prframe = (union recv_frame *)pfhdr;
        rtw_list_delete(&(prframe->u.list));
@@ -1533,7 +1533,7 @@ _func_enter_;
 
        plist = get_list_head(defrag_q);
 
-       plist = get_next(plist);
+       plist = plist->next;
 
        while (rtw_end_of_queue_search(phead, plist) == false) {
                pnfhdr = container_of(plist, struct recv_frame_hdr , list);
@@ -1567,7 +1567,7 @@ _func_enter_;
                recvframe_put(prframe, pnfhdr->len);
 
                pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len;
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        /* free the defrag_q queue and return the prframe */
@@ -1841,14 +1841,14 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
        struct rx_pkt_attrib *pnextattrib;
 
        phead = get_list_head(ppending_recvframe_queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (rtw_end_of_queue_search(phead, plist) == false) {
                hdr = container_of(plist, struct recv_frame_hdr, list);
                pnextattrib = &hdr->attrib;
 
                if (SN_LESS(pnextattrib->seq_num, pattrib->seq_num))
-                       plist = get_next(plist);
+                       plist = plist->next;
                else if (SN_EQUAL(pnextattrib->seq_num, pattrib->seq_num))
                        return false;
                else
@@ -1872,7 +1872,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
        struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
 
        phead =         get_list_head(ppending_recvframe_queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        /*  Handling some condition for forced indicate case. */
        if (bforced) {
@@ -1895,7 +1895,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
                        RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_,
                                 ("recv_indicatepkts_in_order: indicate=%d seq=%d amsdu=%d\n",
                                  preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
-                       plist = get_next(plist);
+                       plist = plist->next;
                        rtw_list_delete(&(prframe->u.hdr.list));
 
                        if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
index 6f870b87c0ac90d67611e5f4cdff262726e3cef3..5c9326d12f5f4f8be4b4e6fb012039fb4ac4ce9e 100644 (file)
@@ -160,11 +160,11 @@ _func_enter_;
        spin_lock_bh(&pstapriv->sta_hash_lock);
 
        phead = get_list_head(&pstapriv->free_sta_queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                psta = container_of(plist, struct sta_info , list);
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pstapriv->sta_hash_lock);
@@ -190,12 +190,12 @@ _func_enter_;
                spin_lock_bh(&pstapriv->sta_hash_lock);
                for (index = 0; index < NUM_STA; index++) {
                        phead = &(pstapriv->sta_hash[index]);
-                       plist = get_next(phead);
+                       plist = phead->next;
 
                        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                                int i;
                                psta = container_of(plist, struct sta_info , hash_list);
-                               plist = get_next(plist);
+                               plist = plist->next;
 
                                for (i = 0; i < 16; i++) {
                                        preorder_ctrl = &psta->recvreorder_ctrl[i];
@@ -236,7 +236,7 @@ _func_enter_;
                spin_unlock_bh(&pfree_sta_queue->lock);
                psta = NULL;
        } else {
-               psta = container_of(get_next(&pfree_sta_queue->queue), struct sta_info, list);
+               psta = container_of((&pfree_sta_queue->queue)->next, struct sta_info, list);
                rtw_list_delete(&(psta->list));
                spin_unlock_bh(&pfree_sta_queue->lock);
                _rtw_init_stainfo(psta);
@@ -373,13 +373,13 @@ _func_enter_;
                spin_lock_bh(&ppending_recvframe_queue->lock);
 
                phead =         get_list_head(ppending_recvframe_queue);
-               plist = get_next(phead);
+               plist = phead->next;
 
                while (!rtw_is_list_empty(phead)) {
                        prhdr = container_of(plist, struct recv_frame_hdr, list);
                        prframe = (union recv_frame *)prhdr;
 
-                       plist = get_next(plist);
+                       plist = plist->next;
 
                        rtw_list_delete(&(prframe->u.hdr.list));
 
@@ -454,12 +454,12 @@ _func_enter_;
 
        for (index = 0; index < NUM_STA; index++) {
                phead = &(pstapriv->sta_hash[index]);
-               plist = get_next(phead);
+               plist = phead->next;
 
                while ((!rtw_end_of_queue_search(phead, plist))) {
                        psta = container_of(plist, struct sta_info , hash_list);
 
-                       plist = get_next(plist);
+                       plist = plist->next;
 
                        if (pbcmc_stainfo != psta)
                                rtw_free_stainfo(padapter , psta);
@@ -497,7 +497,7 @@ _func_enter_;
        spin_lock_bh(&pstapriv->sta_hash_lock);
 
        phead = &(pstapriv->sta_hash[index]);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while ((!rtw_end_of_queue_search(phead, plist))) {
                psta = container_of(plist, struct sta_info, hash_list);
@@ -507,7 +507,7 @@ _func_enter_;
                        break;
                }
                psta = NULL;
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pstapriv->sta_hash_lock);
@@ -564,10 +564,10 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
 
        spin_lock_bh(&(pacl_node_q->lock));
        phead = get_list_head(pacl_node_q);
-       plist = get_next(phead);
+       plist = phead->next;
        while ((!rtw_end_of_queue_search(phead, plist))) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
-               plist = get_next(plist);
+               plist = plist->next;
 
                if (!memcmp(paclnode->addr, mac_addr, ETH_ALEN)) {
                        if (paclnode->valid) {
index 8658ba655380f3adcfd70ad6cd8201de1cc50af6..3b584b450941fd4f4a0b707bc68c2167934d5295 100644 (file)
@@ -1259,7 +1259,7 @@ _func_enter_;
        } else {
                phead = get_list_head(pfree_queue);
 
-               plist = get_next(phead);
+               plist = phead->next;
 
                pxmitbuf = container_of(plist, struct xmit_buf, list);
 
@@ -1327,7 +1327,7 @@ _func_enter_;
        } else {
                phead = get_list_head(pfree_xmitbuf_queue);
 
-               plist = get_next(phead);
+               plist = phead->next;
 
                pxmitbuf = container_of(plist, struct xmit_buf, list);
 
@@ -1415,7 +1415,7 @@ _func_enter_;
        } else {
                phead = get_list_head(pfree_xmit_queue);
 
-               plist = get_next(phead);
+               plist = phead->next;
 
                pxframe = container_of(plist, struct xmit_frame, list);
 
@@ -1498,12 +1498,12 @@ _func_enter_;
        spin_lock_bh(&(pframequeue->lock));
 
        phead = get_list_head(pframequeue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (!rtw_end_of_queue_search(phead, plist)) {
                pxmitframe = container_of(plist, struct xmit_frame, list);
 
-               plist = get_next(plist);
+               plist = plist->next;
 
                rtw_free_xmitframe(pxmitpriv, pxmitframe);
        }
@@ -1530,12 +1530,12 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
        struct  xmit_frame      *pxmitframe = NULL;
 
        xmitframe_phead = get_list_head(pframe_queue);
-       xmitframe_plist = get_next(xmitframe_phead);
+       xmitframe_plist = xmitframe_phead->next;
 
        if (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
-               xmitframe_plist = get_next(xmitframe_plist);
+               xmitframe_plist = xmitframe_plist->next;
 
                rtw_list_delete(&pxmitframe->list);
 
@@ -1572,7 +1572,7 @@ _func_enter_;
                phwxmit = phwxmit_i + inx[i];
 
                sta_phead = get_list_head(phwxmit->sta_queue);
-               sta_plist = get_next(sta_phead);
+               sta_plist = sta_phead->next;
 
                while (!rtw_end_of_queue_search(sta_phead, sta_plist)) {
                        ptxservq = container_of(sta_plist, struct tx_servq, tx_pending);
@@ -1590,7 +1590,7 @@ _func_enter_;
                                goto exit;
                        }
 
-                       sta_plist = get_next(sta_plist);
+                       sta_plist = sta_plist->next;
                }
        }
 exit:
@@ -2070,12 +2070,12 @@ static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struc
        struct hw_xmit *phwxmits =  padapter->xmitpriv.hwxmits;
 
        phead = get_list_head(pframequeue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (!rtw_end_of_queue_search(phead, plist)) {
                pxmitframe = container_of(plist, struct xmit_frame, list);
 
-               plist = get_next(plist);
+               plist = plist->next;
 
                xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe);
 
@@ -2137,12 +2137,12 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
        spin_lock_bh(&psta->sleep_q.lock);
 
        xmitframe_phead = get_list_head(&psta->sleep_q);
-       xmitframe_plist = get_next(xmitframe_phead);
+       xmitframe_plist = xmitframe_phead->next;
 
        while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
-               xmitframe_plist = get_next(xmitframe_plist);
+               xmitframe_plist = xmitframe_plist->next;
 
                rtw_list_delete(&pxmitframe->list);
 
@@ -2218,12 +2218,12 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
                spin_lock_bh(&psta_bmc->sleep_q.lock);
 
                xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
-               xmitframe_plist = get_next(xmitframe_phead);
+               xmitframe_plist = xmitframe_phead->next;
 
                while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
                        pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
-                       xmitframe_plist = get_next(xmitframe_plist);
+                       xmitframe_plist = xmitframe_plist->next;
 
                        rtw_list_delete(&pxmitframe->list);
 
@@ -2265,12 +2265,12 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
        spin_lock_bh(&psta->sleep_q.lock);
 
        xmitframe_phead = get_list_head(&psta->sleep_q);
-       xmitframe_plist = get_next(xmitframe_phead);
+       xmitframe_plist = xmitframe_phead->next;
 
        while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
-               xmitframe_plist = get_next(xmitframe_plist);
+               xmitframe_plist = xmitframe_plist->next;
 
                switch (pxmitframe->attrib.priority) {
                case 1:
index 50bc215b12ba1b88940d14c1e14e5327549ab24d..3476f88983302add9de5f150119528e5162ee310 100644 (file)
@@ -537,11 +537,11 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
        spin_lock_bh(&pxmitpriv->lock);
 
        xmitframe_phead = get_list_head(&ptxservq->sta_pending);
-       xmitframe_plist = get_next(xmitframe_phead);
+       xmitframe_plist = xmitframe_phead->next;
 
        while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
-               xmitframe_plist = get_next(xmitframe_plist);
+               xmitframe_plist = xmitframe_plist->next;
 
                pxmitframe->agg_num = 0; /*  not first frame of aggregation */
                pxmitframe->pkt_offset = 0; /*  not first frame of aggregation, no need to reserve offset */
index 59399210a8912f83842dc9b180db297e1bc14474..09e2d487df8c61f7642d4fbe1b369df21c8cccf3 100644 (file)
@@ -62,11 +62,6 @@ struct       __queue {
        spinlock_t lock;
 };
 
-static inline struct list_head *get_next(struct list_head *list)
-{
-       return list->next;
-}
-
 static inline struct list_head *get_list_head(struct __queue *queue)
 {
        return &(queue->queue);
index f9e52b3ac876322479d36d77e5fc47d84078c7a3..08be34ef5e142a4c5c6903b31f7dcb2186da69d9 100644 (file)
@@ -1139,7 +1139,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
        authmode = padapter->securitypriv.ndisauthtype;
        spin_lock_bh(&queue->lock);
        phead = get_list_head(queue);
-       pmlmepriv->pscanned = get_next(phead);
+       pmlmepriv->pscanned = phead->next;
 
        while (1) {
                if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == true)
@@ -1147,7 +1147,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
 
                pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
 
-               pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
+               pmlmepriv->pscanned = pmlmepriv->pscanned->next;
 
                dst_bssid = pnetwork->network.MacAddress;
 
@@ -1441,7 +1441,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist))
@@ -1458,7 +1458,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
                if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0)
                        ev = translate_scan(padapter, a, pnetwork, ev, stop);
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -1531,7 +1531,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
                RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_wx_set_essid: ssid =[%s]\n", src_ssid));
                spin_lock_bh(&queue->lock);
               phead = get_list_head(queue);
-             pmlmepriv->pscanned = get_next(phead);
+             pmlmepriv->pscanned = phead->next;
 
                while (1) {
                        if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == true) {
@@ -1543,7 +1543,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
 
                        pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
 
-                       pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
+                       pmlmepriv->pscanned = pmlmepriv->pscanned->next;
 
                        dst_ssid = pnetwork->network.Ssid.Ssid;
 
@@ -2608,7 +2608,7 @@ static int rtw_get_ap_info(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -2639,7 +2639,7 @@ static int rtw_get_ap_info(struct net_device *dev,
                        }
                }
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -3111,7 +3111,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -3135,7 +3135,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
                        }
                        break;
                }
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -3181,7 +3181,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -3216,7 +3216,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
                        }
             }
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -3265,7 +3265,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -3296,7 +3296,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
                        break;
             }
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -3344,7 +3344,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -3367,7 +3367,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
                        break;
                }
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -3415,7 +3415,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -3441,7 +3441,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
                                }
                        }
                }
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -3497,7 +3497,7 @@ static int rtw_p2p_connect(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -3509,7 +3509,7 @@ static int rtw_p2p_connect(struct net_device *dev,
                        break;
                }
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -3592,7 +3592,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -3623,7 +3623,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
                                }
                        }
                }
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -3742,7 +3742,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
        spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
 
        phead = get_list_head(queue);
-       plist = get_next(phead);
+       plist = phead->next;
 
        while (1) {
                if (rtw_end_of_queue_search(phead, plist) == true)
@@ -3782,7 +3782,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
                        }
                }
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
@@ -4437,12 +4437,12 @@ static int rtw_dbg_port(struct net_device *dev,
 
                                for (i = 0; i < NUM_STA; i++) {
                                        phead = &(pstapriv->sta_hash[i]);
-                                       plist = get_next(phead);
+                                       plist = phead->next;
 
                                        while ((rtw_end_of_queue_search(phead, plist)) == false) {
                                                psta = container_of(plist, struct sta_info, hash_list);
 
-                                               plist = get_next(plist);
+                                               plist = plist->next;
 
                                                if (extra_arg == psta->aid) {
                                                        DBG_88E("sta's macaddr:%pM\n", (psta->hwaddr));
index c1b7c9629edf8dba87bc9d3c8264bac1f0947d44..5ea00c35439b2477de3f702c91a8266cd7471920 100644 (file)
@@ -198,13 +198,13 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
 
        spin_lock_bh(&pstapriv->asoc_list_lock);
        phead = &pstapriv->asoc_list;
-       plist = get_next(phead);
+       plist = phead->next;
 
        /* free sta asoc_queue */
        while (!rtw_end_of_queue_search(phead, plist)) {
                psta = container_of(plist, struct sta_info, asoc_list);
 
-               plist = get_next(plist);
+               plist = plist->next;
 
                /* avoid   come from STA1 and send back STA1 */
                if (!memcmp(psta->hwaddr, &skb->data[6], 6))