mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-28 15:13:39 +00:00
rtl8188eu: Remove wrapper get_next()
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
567257655f
commit
6d3d853360
12 changed files with 66 additions and 95 deletions
|
@ -1176,7 +1176,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
||||||
|
|
||||||
paclnode->valid = true;
|
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++;
|
pacl_list->num++;
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
|
||||||
|
|
||||||
spin_lock_irqsave(&queue->lock, flags);
|
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);
|
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();
|
pwlan->last_scanned = rtw_get_current_time();
|
||||||
} else {
|
} 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);
|
pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork);
|
||||||
|
|
|
@ -85,7 +85,7 @@ int _rtw_init_mlme_priv (struct adapter *padapter)
|
||||||
for (i = 0; i < MAX_BSS_CNT; i++) {
|
for (i = 0; i < MAX_BSS_CNT; i++) {
|
||||||
INIT_LIST_HEAD(&(pnetwork->list));
|
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++;
|
pnetwork++;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
|
||||||
|
|
||||||
spin_lock_bh(&queue->lock);
|
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);
|
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);
|
spin_lock_bh(&free_queue->lock);
|
||||||
rtw_list_delete(&(pnetwork->list));
|
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--;
|
pmlmepriv->num_of_scanned--;
|
||||||
spin_unlock_bh(&free_queue->lock);
|
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)
|
if (pnetwork->fixed)
|
||||||
return;
|
return;
|
||||||
rtw_list_delete(&(pnetwork->list));
|
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--;
|
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 */
|
/* bss info not receiving from the right channel */
|
||||||
if (pnetwork->network.PhyInfo.SignalQuality == 101)
|
if (pnetwork->network.PhyInfo.SignalQuality == 101)
|
||||||
pnetwork->network.PhyInfo.SignalQuality = 0;
|
pnetwork->network.PhyInfo.SignalQuality = 0;
|
||||||
rtw_list_insert_tail(&(pnetwork->list), &(queue->queue));
|
list_add_tail(&(pnetwork->list), &(queue->queue));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* we have an entry and we are going to update it. But this entry may
|
/* 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) {
|
while (plist != phead) {
|
||||||
ptemp = get_next(plist);
|
ptemp = get_next(plist);
|
||||||
rtw_list_delete(plist);
|
rtw_list_delete(plist);
|
||||||
rtw_list_insert_tail(plist, &free_queue->queue);
|
list_add_tail(plist, &free_queue->queue);
|
||||||
plist = ptemp;
|
plist = ptemp;
|
||||||
pmlmepriv->num_of_scanned--;
|
pmlmepriv->num_of_scanned--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -824,7 +824,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
|
||||||
|
|
||||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||||
if (rtw_is_list_empty(&pstat->auth_list)) {
|
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++;
|
pstapriv->auth_list_cnt++;
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
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);
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||||
if (rtw_is_list_empty(&pstat->asoc_list)) {
|
if (rtw_is_list_empty(&pstat->asoc_list)) {
|
||||||
pstat->expire_to = pstapriv->expire_to;
|
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++;
|
pstapriv->asoc_list_cnt++;
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||||
|
|
|
@ -978,7 +978,7 @@ void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv)
|
||||||
goto exit;
|
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++;
|
pxmitbuf++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
|
||||||
for (i = 0; i < NR_RECVFRAME; i++) {
|
for (i = 0; i < NR_RECVFRAME; i++) {
|
||||||
INIT_LIST_HEAD(&(precvframe->list));
|
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);
|
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;
|
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 (padapter != NULL) {
|
||||||
if (pfree_recv_queue == &precvpriv->free_recv_queue)
|
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;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
|
|
||||||
rtw_list_delete(&(precvframe->list));
|
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 (padapter != NULL) {
|
||||||
if (queue == &precvpriv->free_recv_queue)
|
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);
|
spin_lock_bh(&queue->lock);
|
||||||
|
|
||||||
rtw_list_delete(&precvbuf->list);
|
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);
|
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_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);
|
spin_unlock_irqrestore(&queue->lock, flags);
|
||||||
return _SUCCESS;
|
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 */
|
/* Then enqueue the 0~(n-1) fragment into the defrag_q */
|
||||||
|
|
||||||
phead = get_list_head(pdefrag_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));
|
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 */
|
/* enqueue the last fragment */
|
||||||
if (pdefrag_q != NULL) {
|
if (pdefrag_q != NULL) {
|
||||||
phead = get_list_head(pdefrag_q);
|
phead = get_list_head(pdefrag_q);
|
||||||
rtw_list_insert_tail(&pfhdr->list, phead);
|
list_add_tail(&pfhdr->list, phead);
|
||||||
|
|
||||||
/* call recvframe_defrag to defrag */
|
/* call recvframe_defrag to defrag */
|
||||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("defrag: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum));
|
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_delete(&(prframe->list));
|
||||||
|
|
||||||
rtw_list_insert_tail(&(prframe->list), plist);
|
list_add_tail(&(prframe->list), plist);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
||||||
|
|
||||||
INIT_LIST_HEAD(&(pstapriv->sta_hash[i]));
|
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++;
|
psta++;
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||||
|
|
||||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
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++ ;
|
pstapriv->asoc_sta_count++ ;
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
||||||
#endif /* CONFIG_88EU_AP_MODE */
|
#endif /* CONFIG_88EU_AP_MODE */
|
||||||
|
|
||||||
spin_lock_bh(&pfree_sta_queue->lock);
|
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);
|
spin_unlock_bh(&pfree_sta_queue->lock);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
|
@ -113,7 +113,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
||||||
pxframe->buf_addr = NULL;
|
pxframe->buf_addr = NULL;
|
||||||
pxframe->pxmitbuf = 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++;
|
pxframe++;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
||||||
|
|
||||||
pxmitbuf->flags = XMIT_VO_QUEUE;
|
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++;
|
pxmitbuf++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
||||||
goto exit;
|
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++;
|
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_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++;
|
pxmitpriv->free_xmit_extbuf_cnt++;
|
||||||
|
|
||||||
spin_unlock_irqrestore(&pfree_queue->lock, flags);
|
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_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++;
|
pxmitpriv->free_xmitbuf_cnt++;
|
||||||
spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, flags);
|
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;
|
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++;
|
pxmitpriv->free_xmitframe_cnt++;
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_debug_, ("rtw_free_xmitframe():free_xmitframe_cnt=%d\n", 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));
|
ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index));
|
||||||
|
|
||||||
if (rtw_is_list_empty(&ptxservq->tx_pending))
|
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++;
|
ptxservq->qcnt++;
|
||||||
phwxmits[ac_index].accnt++;
|
phwxmits[ac_index].accnt++;
|
||||||
exit:
|
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 */
|
if (pstapriv->sta_dz_bitmap) {/* if any one sta is in ps mode */
|
||||||
rtw_list_delete(&pxmitframe->list);
|
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++;
|
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)) {
|
if (pstapriv->sta_dz_bitmap&BIT(psta->aid)) {
|
||||||
rtw_list_delete(&pxmitframe->list);
|
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++;
|
psta->sleepq_len++;
|
||||||
|
|
||||||
|
|
|
@ -65,11 +65,6 @@ struct __queue {
|
||||||
|
|
||||||
#define thread_exit() complete_and_exit(NULL, 0)
|
#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)
|
static inline struct list_head *get_list_head(struct __queue *queue)
|
||||||
{
|
{
|
||||||
return (&(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);
|
void rtw_mfree2d(void *pbuf, int h, int w, int size);
|
||||||
|
|
||||||
u32 rtw_is_list_empty(struct list_head *phead);
|
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_list_delete(struct list_head *plist);
|
||||||
|
|
||||||
void _rtw_init_sema(struct semaphore *sema, int init_val);
|
void _rtw_init_sema(struct semaphore *sema, int init_val);
|
||||||
|
|
|
@ -1137,15 +1137,13 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
||||||
authmode = padapter->securitypriv.ndisauthtype;
|
authmode = padapter->securitypriv.ndisauthtype;
|
||||||
spin_lock_bh(&queue->lock);
|
spin_lock_bh(&queue->lock);
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
pmlmepriv->pscanned = get_next(phead);
|
pmlmepriv->pscanned = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (phead != pmlmepriv->pscanned) {
|
||||||
if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == true)
|
|
||||||
break;
|
|
||||||
|
|
||||||
pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
|
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;
|
dst_bssid = pnetwork->network.MacAddress;
|
||||||
|
|
||||||
|
@ -1158,7 +1156,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&queue->lock);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
|
||||||
if (rtw_end_of_queue_search(phead, plist))
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
while (phead != plist) {
|
||||||
if ((stop - ev) < SCAN_ITEM_SIZE) {
|
if ((stop - ev) < SCAN_ITEM_SIZE) {
|
||||||
ret = -E2BIG;
|
ret = -E2BIG;
|
||||||
break;
|
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)
|
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0)
|
||||||
ev = translate_scan(padapter, a, pnetwork, ev, stop);
|
ev = translate_scan(padapter, a, pnetwork, ev, stop);
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = plist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
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));
|
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_wx_set_essid: ssid =[%s]\n", src_ssid));
|
||||||
spin_lock_bh(&queue->lock);
|
spin_lock_bh(&queue->lock);
|
||||||
phead = get_list_head(queue);
|
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) {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
while (phead != pmlmepriv->pscanned) {
|
||||||
pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
|
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;
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
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);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
plist = get_next(plist);
|
plist = plist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
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);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = plist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = plist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
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);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||||
|
@ -3503,7 +3491,7 @@ static int rtw_p2p_connect(struct net_device *dev,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = plist->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
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);
|
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);
|
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
|
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
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);
|
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++) {
|
for (i = 0; i < NUM_STA; i++) {
|
||||||
phead = &(pstapriv->sta_hash[i]);
|
phead = &(pstapriv->sta_hash[i]);
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||||
psta = container_of(plist, struct sta_info, hash_list);
|
psta = container_of(plist, struct sta_info, hash_list);
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = plist->next;
|
||||||
|
|
||||||
if (extra_arg == psta->aid) {
|
if (extra_arg == psta->aid) {
|
||||||
DBG_88E("sta's macaddr:%pM\n", (psta->hwaddr));
|
DBG_88E("sta's macaddr:%pM\n", (psta->hwaddr));
|
||||||
|
|
|
@ -126,16 +126,6 @@ u32 rtw_is_list_empty(struct list_head *phead)
|
||||||
return false;
|
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
|
Caller must check if the list is empty before calling rtw_list_delete
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -191,13 +191,13 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
|
||||||
|
|
||||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||||
phead = &pstapriv->asoc_list;
|
phead = &pstapriv->asoc_list;
|
||||||
plist = get_next(phead);
|
plist = phead->next;
|
||||||
|
|
||||||
/* free sta asoc_queue */
|
/* free sta asoc_queue */
|
||||||
while (!rtw_end_of_queue_search(phead, plist)) {
|
while (phead != plist) {
|
||||||
psta = container_of(plist, struct sta_info, asoc_list);
|
psta = container_of(plist, struct sta_info, asoc_list);
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = plist->next;
|
||||||
|
|
||||||
/* avoid come from STA1 and send back STA1 */
|
/* avoid come from STA1 and send back STA1 */
|
||||||
if (!memcmp(psta->hwaddr, &skb->data[6], 6))
|
if (!memcmp(psta->hwaddr, &skb->data[6], 6))
|
||||||
|
|
Loading…
Reference in a new issue