mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-07 14:03:05 +00:00
rtl8188eu: Remove a number of 'list' wrappers
The wrappers for list_empty(), list_add(), list_add_tail(), INIT_LIST_HEAD(), and list_del_init() are removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
92b97f0a67
commit
cbfa6220ef
21 changed files with 203 additions and 243 deletions
|
@ -117,9 +117,9 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter)
|
|||
|
||||
|
||||
for (i = 0; i < NR_RECVFRAME ; i++) {
|
||||
_rtw_init_listhead(&(precvframe->u.list));
|
||||
INIT_LIST_HEAD(&(precvframe->u.list));
|
||||
|
||||
rtw_list_insert_tail(&(precvframe->u.list), &(precvpriv->free_recv_queue.queue));
|
||||
list_add_tail(&(precvframe->u.list), &(precvpriv->free_recv_queue.queue));
|
||||
|
||||
res = rtw_os_recv_resource_alloc(padapter, precvframe);
|
||||
|
||||
|
@ -223,7 +223,7 @@ union recv_frame *_rtw_alloc_recvframe(_queue *pfree_recv_queue)
|
|||
|
||||
precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
||||
rtw_list_delete(&precvframe->u.hdr.list);
|
||||
list_del_init(&precvframe->u.hdr.list);
|
||||
padapter = precvframe->u.hdr.adapter;
|
||||
if (padapter != NULL) {
|
||||
precvpriv = &padapter->recvpriv;
|
||||
|
@ -254,7 +254,7 @@ union recv_frame *rtw_alloc_recvframe(_queue *pfree_recv_queue)
|
|||
void rtw_init_recvframe(union recv_frame *precvframe, struct recv_priv *precvpriv)
|
||||
{
|
||||
/* Perry: This can be removed */
|
||||
_rtw_init_listhead(&precvframe->u.hdr.list);
|
||||
INIT_LIST_HEAD(&precvframe->u.hdr.list);
|
||||
|
||||
precvframe->u.hdr.len = 0;
|
||||
}
|
||||
|
@ -279,11 +279,11 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue)
|
|||
|
||||
_enter_critical_bh(&pfree_recv_queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&(precvframe->u.hdr.list));
|
||||
list_del_init(&(precvframe->u.hdr.list));
|
||||
|
||||
precvframe->u.hdr.len = 0;
|
||||
|
||||
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(pfree_recv_queue));
|
||||
list_add_tail(&(precvframe->u.hdr.list), get_list_head(pfree_recv_queue));
|
||||
|
||||
if (padapter != NULL) {
|
||||
if (pfree_recv_queue == &precvpriv->free_recv_queue)
|
||||
|
@ -307,11 +307,11 @@ sint _rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
|
|||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
|
||||
|
||||
/* _rtw_init_listhead(&(precvframe->u.hdr.list)); */
|
||||
rtw_list_delete(&(precvframe->u.hdr.list));
|
||||
/* INIT_LIST_HEAD(&(precvframe->u.hdr.list)); */
|
||||
list_del_init(&(precvframe->u.hdr.list));
|
||||
|
||||
|
||||
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(queue));
|
||||
list_add_tail(&(precvframe->u.hdr.list), get_list_head(queue));
|
||||
|
||||
if (padapter != NULL) {
|
||||
if (queue == &precvpriv->free_recv_queue)
|
||||
|
@ -369,7 +369,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue)
|
|||
|
||||
plist = get_next(plist);
|
||||
|
||||
/* rtw_list_delete(&precvframe->u.hdr.list); */ /* will do this in rtw_free_recvframe() */
|
||||
/* list_del_init(&precvframe->u.hdr.list); */ /* will do this in rtw_free_recvframe() */
|
||||
|
||||
rtw_free_recvframe(precvframe, pfree_recv_queue);
|
||||
}
|
||||
|
@ -401,8 +401,8 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue)
|
|||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
rtw_list_insert_head(&precvbuf->list, get_list_head(queue));
|
||||
list_del_init(&precvbuf->list);
|
||||
list_add(&precvbuf->list, get_list_head(queue));
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
return _SUCCESS;
|
||||
|
@ -414,9 +414,9 @@ sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue)
|
|||
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
list_del_init(&precvbuf->list);
|
||||
|
||||
rtw_list_insert_tail(&precvbuf->list, get_list_head(queue));
|
||||
list_add_tail(&precvbuf->list, get_list_head(queue));
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ struct recv_buf *rtw_dequeue_recvbuf(_queue *queue)
|
|||
|
||||
precvbuf = LIST_CONTAINOR(plist, struct recv_buf, list);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
list_del_init(&precvbuf->list);
|
||||
}
|
||||
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
|
@ -1607,7 +1607,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta->sleepq_len--;
|
||||
|
||||
|
@ -2341,7 +2341,7 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
|
|||
plist = get_next(phead);
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pfhdr = &prframe->u.hdr;
|
||||
rtw_list_delete(&(prframe->u.list));
|
||||
list_del_init(&(prframe->u.list));
|
||||
|
||||
if (curfragnum != pfhdr->attrib.frag_num) {
|
||||
/* the first fragment number must be 0 */
|
||||
|
@ -2459,7 +2459,7 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec
|
|||
|
||||
/* _rtw_spinlock(&pdefrag_q->lock); */
|
||||
phead = get_list_head(pdefrag_q);
|
||||
rtw_list_insert_tail(&pfhdr->list, phead);
|
||||
list_add_tail(&pfhdr->list, phead);
|
||||
/* _rtw_spinunlock(&pdefrag_q->lock); */
|
||||
|
||||
|
||||
|
@ -2479,7 +2479,7 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec
|
|||
if (pdefrag_q != NULL) {
|
||||
/* _rtw_spinlock(&pdefrag_q->lock); */
|
||||
phead = get_list_head(pdefrag_q);
|
||||
rtw_list_insert_tail(&pfhdr->list, phead);
|
||||
list_add_tail(&pfhdr->list, phead);
|
||||
/* _rtw_spinunlock(&pdefrag_q->lock); */
|
||||
|
||||
/* call recvframe_defrag to defrag */
|
||||
|
@ -2684,9 +2684,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
|
|||
/* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _rtw_spinlock_ex(&ppending_recvframe_queue->lock); */
|
||||
|
||||
rtw_list_delete(&(prframe->u.hdr.list));
|
||||
list_del_init(&(prframe->u.hdr.list));
|
||||
|
||||
rtw_list_insert_tail(&(prframe->u.hdr.list), plist);
|
||||
list_add_tail(&(prframe->u.hdr.list), plist);
|
||||
|
||||
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
|
@ -2733,7 +2733,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
/* Handling some condition for forced indicate case. */
|
||||
if (bforced) {
|
||||
pdbgpriv->dbg_rx_ampdu_forced_indicate_count++;
|
||||
if (rtw_is_list_empty(phead)) {
|
||||
if (list_empty(phead)) {
|
||||
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
|
||||
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */
|
||||
return true;
|
||||
|
@ -2753,14 +2753,14 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
|
||||
/* Prepare indication list and indication. */
|
||||
/* Check if there is any packet need indicate. */
|
||||
while (!rtw_is_list_empty(phead)) {
|
||||
while (!list_empty(phead)) {
|
||||
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pattrib = &prframe->u.hdr.attrib;
|
||||
|
||||
if (!SN_LESS(preorder_ctrl->indicate_seq, le16_to_cpu(pattrib->seq_num))) {
|
||||
plist = get_next(plist);
|
||||
rtw_list_delete(&(prframe->u.hdr.list));
|
||||
list_del_init(&(prframe->u.hdr.list));
|
||||
|
||||
if (SN_EQUAL(preorder_ctrl->indicate_seq, le16_to_cpu(pattrib->seq_num))) {
|
||||
preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue