forked from Minki/linux
staging: rtl8723au: Eliminate _rtw_queue_empty23a()
This was just a silly wrapper around list_empty() Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c5779a0d1f
commit
794ff0530e
@ -45,7 +45,7 @@ u8 rtw_do_join23a(struct rtw_adapter *padapter)
|
|||||||
|
|
||||||
pmlmepriv->to_join = true;
|
pmlmepriv->to_join = true;
|
||||||
|
|
||||||
if (_rtw_queue_empty23a(queue) == true) {
|
if (list_empty(&queue->queue)) {
|
||||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ struct recv_frame *rtw_alloc_recvframe23a(struct rtw_queue *pfree_recv_queue)
|
|||||||
|
|
||||||
spin_lock_bh(&pfree_recv_queue->lock);
|
spin_lock_bh(&pfree_recv_queue->lock);
|
||||||
|
|
||||||
if (_rtw_queue_empty23a(pfree_recv_queue) == true)
|
if (list_empty(&pfree_recv_queue->queue))
|
||||||
pframe = NULL;
|
pframe = NULL;
|
||||||
else {
|
else {
|
||||||
phead = get_list_head(pfree_recv_queue);
|
phead = get_list_head(pfree_recv_queue);
|
||||||
@ -255,7 +255,7 @@ struct recv_buf *rtw_dequeue_recvbuf23a (struct rtw_queue *queue)
|
|||||||
|
|
||||||
spin_lock_irqsave(&queue->lock, irqL);
|
spin_lock_irqsave(&queue->lock, irqL);
|
||||||
|
|
||||||
if (_rtw_queue_empty23a(queue) == true) {
|
if (list_empty(&queue->queue)) {
|
||||||
precvbuf = NULL;
|
precvbuf = NULL;
|
||||||
} else {
|
} else {
|
||||||
phead = get_list_head(queue);
|
phead = get_list_head(queue);
|
||||||
@ -1756,7 +1756,7 @@ struct recv_frame* recvframe_chk_defrag23a(struct rtw_adapter *padapter,
|
|||||||
if (pdefrag_q != NULL) {
|
if (pdefrag_q != NULL) {
|
||||||
if (fragnum == 0) {
|
if (fragnum == 0) {
|
||||||
/* the first fragment */
|
/* the first fragment */
|
||||||
if (_rtw_queue_empty23a(pdefrag_q) == false) {
|
if (!list_empty(&pdefrag_q->queue)) {
|
||||||
/* free current defrag_q */
|
/* free current defrag_q */
|
||||||
rtw_free_recvframe23a_queue(pdefrag_q);
|
rtw_free_recvframe23a_queue(pdefrag_q);
|
||||||
}
|
}
|
||||||
|
@ -984,10 +984,10 @@ s32 rtw_txframes_pending23a(struct rtw_adapter *padapter)
|
|||||||
{
|
{
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
|
||||||
return (!_rtw_queue_empty23a(&pxmitpriv->be_pending)) ||
|
return (!list_empty(&pxmitpriv->be_pending.queue)) ||
|
||||||
(!_rtw_queue_empty23a(&pxmitpriv->bk_pending)) ||
|
(!list_empty(&pxmitpriv->bk_pending.queue)) ||
|
||||||
(!_rtw_queue_empty23a(&pxmitpriv->vi_pending)) ||
|
(!list_empty(&pxmitpriv->vi_pending.queue)) ||
|
||||||
(!_rtw_queue_empty23a(&pxmitpriv->vo_pending));
|
(!list_empty(&pxmitpriv->vo_pending.queue));
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 rtw_txframes_sta_ac_pending23a(struct rtw_adapter *padapter,
|
s32 rtw_txframes_sta_ac_pending23a(struct rtw_adapter *padapter,
|
||||||
@ -1480,7 +1480,7 @@ static struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)
|
|||||||
|
|
||||||
spin_lock_bh(&pfree_xmit_queue->lock);
|
spin_lock_bh(&pfree_xmit_queue->lock);
|
||||||
|
|
||||||
if (_rtw_queue_empty23a(pfree_xmit_queue) == true) {
|
if (list_empty(&pfree_xmit_queue->queue)) {
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_,
|
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_,
|
||||||
("rtw_alloc_xmitframe:%d\n",
|
("rtw_alloc_xmitframe:%d\n",
|
||||||
pxmitpriv->free_xmitframe_cnt));
|
pxmitpriv->free_xmitframe_cnt));
|
||||||
@ -1514,7 +1514,7 @@ struct xmit_frame *rtw_alloc_xmitframe23a_ext(struct xmit_priv *pxmitpriv)
|
|||||||
|
|
||||||
spin_lock_bh(&queue->lock);
|
spin_lock_bh(&queue->lock);
|
||||||
|
|
||||||
if (_rtw_queue_empty23a(queue) == true) {
|
if (list_empty(&queue->queue)) {
|
||||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe23a_ext:%d\n", pxmitpriv->free_xframe_ext_cnt));
|
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe23a_ext:%d\n", pxmitpriv->free_xframe_ext_cnt));
|
||||||
pxframe = NULL;
|
pxframe = NULL;
|
||||||
} else {
|
} else {
|
||||||
@ -1673,7 +1673,9 @@ rtw_dequeue_xframe23a(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i,
|
|||||||
phwxmit->accnt--;
|
phwxmit->accnt--;
|
||||||
|
|
||||||
/* Remove sta node when there is no pending packets. */
|
/* Remove sta node when there is no pending packets. */
|
||||||
if (_rtw_queue_empty23a(pframe_queue)) /* must be done after get_next and before break */
|
/* must be done after get_next and
|
||||||
|
before break */
|
||||||
|
if (list_empty(&pframe_queue->queue))
|
||||||
list_del_init(&ptxservq->tx_pending);
|
list_del_init(&ptxservq->tx_pending);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,6 @@ extern unsigned char MCS_rate_2R23A[16];
|
|||||||
extern unsigned char MCS_rate_1R23A[16];
|
extern unsigned char MCS_rate_1R23A[16];
|
||||||
|
|
||||||
void _rtw_init_queue23a(struct rtw_queue *pqueue);
|
void _rtw_init_queue23a(struct rtw_queue *pqueue);
|
||||||
u32 _rtw_queue_empty23a(struct rtw_queue *pqueue);
|
|
||||||
|
|
||||||
void rtw_suspend_lock_init(void);
|
void rtw_suspend_lock_init(void);
|
||||||
void rtw_suspend_lock_uninit(void);
|
void rtw_suspend_lock_uninit(void);
|
||||||
|
@ -36,11 +36,3 @@ void _rtw_init_queue23a(struct rtw_queue *pqueue)
|
|||||||
INIT_LIST_HEAD(&pqueue->queue);
|
INIT_LIST_HEAD(&pqueue->queue);
|
||||||
spin_lock_init(&pqueue->lock);
|
spin_lock_init(&pqueue->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 _rtw_queue_empty23a(struct rtw_queue *pqueue)
|
|
||||||
{
|
|
||||||
if (list_empty(&pqueue->queue))
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user