diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 06f7968..0a2e917 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -1176,7 +1176,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) paclnode->valid = true; - rtw_list_insert_tail(&paclnode->list, get_list_head(pacl_node_q)); + list_add_tail(&paclnode->list, get_list_head(pacl_node_q)); pacl_list->num++; diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index fd5f9d3..19f6619 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -144,7 +144,7 @@ int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj) spin_lock_irqsave(&queue->lock, flags); - rtw_list_insert_tail(&obj->list, &queue->queue); + list_add_tail(&obj->list, &queue->queue); spin_unlock_irqrestore(&queue->lock, flags); @@ -2141,7 +2141,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) } pwlan->last_scanned = rtw_get_current_time(); } else { - rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); + list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); } pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork); diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 50bdbf4..ed780c8 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -85,7 +85,7 @@ int _rtw_init_mlme_priv (struct adapter *padapter) for (i = 0; i < MAX_BSS_CNT; i++) { INIT_LIST_HEAD(&(pnetwork->list)); - rtw_list_insert_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue)); + list_add_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue)); pnetwork++; } @@ -160,7 +160,7 @@ int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork) spin_lock_bh(&queue->lock); - rtw_list_insert_tail(&pnetwork->list, &queue->queue); + list_add_tail(&pnetwork->list, &queue->queue); spin_unlock_bh(&queue->lock); @@ -243,7 +243,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv , struct wlan_network *pnetwo } spin_lock_bh(&free_queue->lock); rtw_list_delete(&(pnetwork->list)); - rtw_list_insert_tail(&(pnetwork->list), &(free_queue->queue)); + list_add_tail(&(pnetwork->list), &(free_queue->queue)); pmlmepriv->num_of_scanned--; spin_unlock_bh(&free_queue->lock); } @@ -257,7 +257,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network * if (pnetwork->fixed) return; rtw_list_delete(&(pnetwork->list)); - rtw_list_insert_tail(&(pnetwork->list), get_list_head(free_queue)); + list_add_tail(&(pnetwork->list), get_list_head(free_queue)); pmlmepriv->num_of_scanned--; } @@ -623,7 +623,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t /* bss info not receiving from the right channel */ if (pnetwork->network.PhyInfo.SignalQuality == 101) pnetwork->network.PhyInfo.SignalQuality = 0; - rtw_list_insert_tail(&(pnetwork->list), &(queue->queue)); + list_add_tail(&(pnetwork->list), &(queue->queue)); } } else { /* we have an entry and we are going to update it. But this entry may @@ -903,7 +903,7 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv) while (plist != phead) { ptemp = get_next(plist); rtw_list_delete(plist); - rtw_list_insert_tail(plist, &free_queue->queue); + list_add_tail(plist, &free_queue->queue); plist = ptemp; pmlmepriv->num_of_scanned--; } diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index da67580..4f90ad6 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -824,7 +824,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame) spin_lock_bh(&pstapriv->auth_list_lock); if (rtw_is_list_empty(&pstat->auth_list)) { - rtw_list_insert_tail(&pstat->auth_list, &pstapriv->auth_list); + list_add_tail(&pstat->auth_list, &pstapriv->auth_list); pstapriv->auth_list_cnt++; } spin_unlock_bh(&pstapriv->auth_list_lock); @@ -1404,7 +1404,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame spin_lock_bh(&pstapriv->asoc_list_lock); if (rtw_is_list_empty(&pstat->asoc_list)) { pstat->expire_to = pstapriv->expire_to; - rtw_list_insert_tail(&pstat->asoc_list, &pstapriv->asoc_list); + list_add_tail(&pstat->asoc_list, &pstapriv->asoc_list); pstapriv->asoc_list_cnt++; } spin_unlock_bh(&pstapriv->asoc_list_lock); diff --git a/core/rtw_mp.c b/core/rtw_mp.c index 591a033..59c7af2 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -978,7 +978,7 @@ void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv) goto exit; } - rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue)); + list_add_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue)); pxmitbuf++; } diff --git a/core/rtw_recv.c b/core/rtw_recv.c index ba89235..6324966 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -88,7 +88,7 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) for (i = 0; i < NR_RECVFRAME; i++) { INIT_LIST_HEAD(&(precvframe->list)); - rtw_list_insert_tail(&(precvframe->list), &(precvpriv->free_recv_queue.queue)); + list_add_tail(&(precvframe->list), &(precvpriv->free_recv_queue.queue)); res = rtw_os_recv_resource_alloc(padapter, precvframe); @@ -209,7 +209,7 @@ int rtw_free_recvframe(struct recv_frame *precvframe, struct __queue *pfree_recv precvframe->len = 0; - rtw_list_insert_tail(&(precvframe->list), get_list_head(pfree_recv_queue)); + list_add_tail(&(precvframe->list), get_list_head(pfree_recv_queue)); if (padapter != NULL) { if (pfree_recv_queue == &precvpriv->free_recv_queue) @@ -227,7 +227,7 @@ int _rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue) struct recv_priv *precvpriv = &padapter->recvpriv; rtw_list_delete(&(precvframe->list)); - rtw_list_insert_tail(&(precvframe->list), get_list_head(queue)); + list_add_tail(&(precvframe->list), get_list_head(queue)); if (padapter != NULL) { if (queue == &precvpriv->free_recv_queue) @@ -296,7 +296,7 @@ int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue spin_lock_bh(&queue->lock); rtw_list_delete(&precvbuf->list); - rtw_list_insert_head(&precvbuf->list, get_list_head(queue)); + list_add(&precvbuf->list, get_list_head(queue)); spin_unlock_bh(&queue->lock); @@ -311,7 +311,7 @@ int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue) rtw_list_delete(&precvbuf->list); - rtw_list_insert_tail(&precvbuf->list, get_list_head(queue)); + list_add_tail(&precvbuf->list, get_list_head(queue)); spin_unlock_irqrestore(&queue->lock, flags); return _SUCCESS; } @@ -1594,7 +1594,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, struct recv_fr /* Then enqueue the 0~(n-1) fragment into the defrag_q */ phead = get_list_head(pdefrag_q); - rtw_list_insert_tail(&pfhdr->list, phead); + list_add_tail(&pfhdr->list, phead); RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("Enqueuq: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum)); @@ -1612,7 +1612,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, struct recv_fr /* enqueue the last fragment */ if (pdefrag_q != NULL) { phead = get_list_head(pdefrag_q); - rtw_list_insert_tail(&pfhdr->list, phead); + list_add_tail(&pfhdr->list, phead); /* call recvframe_defrag to defrag */ RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("defrag: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum)); @@ -1812,7 +1812,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, struct re rtw_list_delete(&(prframe->list)); - rtw_list_insert_tail(&(prframe->list), plist); + list_add_tail(&(prframe->list), plist); return true; } diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index c2d04ca..9f238c4 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -99,7 +99,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) INIT_LIST_HEAD(&(pstapriv->sta_hash[i])); - rtw_list_insert_tail(&psta->list, get_list_head(&pstapriv->free_sta_queue)); + list_add_tail(&psta->list, get_list_head(&pstapriv->free_sta_queue)); psta++; } @@ -292,7 +292,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) spin_lock_bh(&pstapriv->sta_hash_lock); - rtw_list_insert_tail(&psta->hash_list, phash_list); + list_add_tail(&psta->hash_list, phash_list); pstapriv->asoc_sta_count++ ; @@ -460,7 +460,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta) #endif /* CONFIG_88EU_AP_MODE */ spin_lock_bh(&pfree_sta_queue->lock); - rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue)); + list_add_tail(&psta->list, get_list_head(pfree_sta_queue)); spin_unlock_bh(&pfree_sta_queue->lock); exit: diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 08a3705..8e51fc4 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -113,7 +113,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxframe->buf_addr = NULL; pxframe->pxmitbuf = NULL; - rtw_list_insert_tail(&(pxframe->list), &(pxmitpriv->free_xmit_queue.queue)); + list_add_tail(&(pxframe->list), &(pxmitpriv->free_xmit_queue.queue)); pxframe++; } @@ -159,7 +159,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitbuf->flags = XMIT_VO_QUEUE; - rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmitbuf_queue.queue)); + list_add_tail(&pxmitbuf->list, &(pxmitpriv->free_xmitbuf_queue.queue)); pxmitbuf++; } @@ -193,7 +193,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) goto exit; } - rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue)); + list_add_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue)); pxmitbuf++; } @@ -1279,7 +1279,7 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf) rtw_list_delete(&pxmitbuf->list); - rtw_list_insert_tail(&(pxmitbuf->list), get_list_head(pfree_queue)); + list_add_tail(&(pxmitbuf->list), get_list_head(pfree_queue)); pxmitpriv->free_xmit_extbuf_cnt++; spin_unlock_irqrestore(&pfree_queue->lock, flags); @@ -1343,7 +1343,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf) rtw_list_delete(&pxmitbuf->list); - rtw_list_insert_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue)); + list_add_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue)); pxmitpriv->free_xmitbuf_cnt++; spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, flags); @@ -1436,7 +1436,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram pxmitframe->pkt = NULL; } - rtw_list_insert_tail(&pxmitframe->list, get_list_head(pfree_xmit_queue)); + list_add_tail(&pxmitframe->list, get_list_head(pfree_xmit_queue)); pxmitpriv->free_xmitframe_cnt++; RT_TRACE(_module_rtl871x_xmit_c_, _drv_debug_, ("rtw_free_xmitframe():free_xmitframe_cnt=%d\n", pxmitpriv->free_xmitframe_cnt)); @@ -1622,9 +1622,9 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index)); if (rtw_is_list_empty(&ptxservq->tx_pending)) - rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue)); + list_add_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue)); - rtw_list_insert_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending)); + list_add_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending)); ptxservq->qcnt++; phwxmits[ac_index].accnt++; exit: @@ -1949,7 +1949,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra if (pstapriv->sta_dz_bitmap) {/* if any one sta is in ps mode */ rtw_list_delete(&pxmitframe->list); - rtw_list_insert_tail(&pxmitframe->list, get_list_head(&psta->sleep_q)); + list_add_tail(&pxmitframe->list, get_list_head(&psta->sleep_q)); psta->sleepq_len++; @@ -1974,7 +1974,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra if (pstapriv->sta_dz_bitmap&BIT(psta->aid)) { rtw_list_delete(&pxmitframe->list); - rtw_list_insert_tail(&pxmitframe->list, get_list_head(&psta->sleep_q)); + list_add_tail(&pxmitframe->list, get_list_head(&psta->sleep_q)); psta->sleepq_len++; diff --git a/include/osdep_service.h b/include/osdep_service.h index 4355e90..4e7b313 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -65,11 +65,6 @@ struct __queue { #define thread_exit() complete_and_exit(NULL, 0) -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)); @@ -256,8 +251,6 @@ void *rtw_malloc2d(int h, int w, int size); void rtw_mfree2d(void *pbuf, int h, int w, int size); u32 rtw_is_list_empty(struct list_head *phead); -void rtw_list_insert_head(struct list_head *plist, struct list_head *phead); -void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead); void rtw_list_delete(struct list_head *plist); void _rtw_init_sema(struct semaphore *sema, int init_val); diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index e937dbb..b2d9a8d 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -1137,15 +1137,13 @@ 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) - break; + while (phead != pmlmepriv->pscanned) { 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; @@ -1158,7 +1156,7 @@ static int rtw_wx_set_wap(struct net_device *dev, goto exit; } - break; + break; } } spin_unlock_bh(&queue->lock); @@ -1437,12 +1435,9 @@ 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); - - while (1) { - if (rtw_end_of_queue_search(phead, plist)) - break; + plist = phead->next; + while (phead != plist) { if ((stop - ev) < SCAN_ITEM_SIZE) { ret = -E2BIG; break; @@ -1454,7 +1449,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); @@ -1527,19 +1522,12 @@ 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); - - while (1) { - if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == true) { - RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_warning_, - ("rtw_wx_set_essid: scan_q is empty, set ssid to check if scanning again!\n")); - - break; - } + pmlmepriv->pscanned = phead->next; + while (phead != pmlmepriv->pscanned) { 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; @@ -2600,7 +2588,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) @@ -2631,7 +2619,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); @@ -3103,7 +3091,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) @@ -3127,7 +3115,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); @@ -3175,7 +3163,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) @@ -3210,7 +3198,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); @@ -3259,7 +3247,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) @@ -3290,7 +3278,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); @@ -3338,7 +3326,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) @@ -3361,7 +3349,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); @@ -3409,7 +3397,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) @@ -3435,7 +3423,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); @@ -3491,7 +3479,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) @@ -3503,7 +3491,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); @@ -3586,7 +3574,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) @@ -3617,7 +3605,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); @@ -3736,7 +3724,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) @@ -3776,7 +3764,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); @@ -4431,12 +4419,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)); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index ff4746a..cece5ad 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -126,16 +126,6 @@ u32 rtw_is_list_empty(struct list_head *phead) return false; } -void rtw_list_insert_head(struct list_head *plist, struct list_head *phead) -{ - list_add(plist, phead); -} - -void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead) -{ - list_add_tail(plist, phead); -} - /* Caller must check if the list is empty before calling rtw_list_delete */ diff --git a/os_dep/xmit_linux.c b/os_dep/xmit_linux.c index d2602a8..3963099 100644 --- a/os_dep/xmit_linux.c +++ b/os_dep/xmit_linux.c @@ -191,13 +191,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)) { + while (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))