staging: rtl8188eu: Replace _rtw_queue_empty() with list_empty()

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
navin patidar 2014-06-22 14:06:29 +05:30 committed by Greg Kroah-Hartman
parent 5f223b9533
commit f7091bc63a
8 changed files with 16 additions and 22 deletions

View file

@ -85,7 +85,7 @@ u8 rtw_do_join(struct adapter *padapter)
pmlmepriv->to_join = true;
if (_rtw_queue_empty(queue)) {
if (list_empty(&queue->queue)) {
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);

View file

@ -149,7 +149,7 @@ struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
spin_lock_bh(&queue->lock);
if (_rtw_queue_empty(queue)) {
if (list_empty(&queue->queue)) {
pnetwork = NULL;
} else {
pnetwork = container_of((&queue->queue)->next, struct wlan_network, list);
@ -170,7 +170,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
spin_lock_bh(&free_queue->lock);
if (_rtw_queue_empty(free_queue) == true) {
if (list_empty(&free_queue->queue)) {
pnetwork = NULL;
goto exit;
}
@ -535,7 +535,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
/* If we didn't find a match, then get a new network slot to initialize
* with this beacon's information */
if (phead == plist) {
if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == true) {
if (list_empty(&(pmlmepriv->free_bss_pool.queue))) {
/* If there are no more slots, expire the oldest */
pnetwork = oldest;

View file

@ -131,7 +131,7 @@ struct recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
struct adapter *padapter;
struct recv_priv *precvpriv;
if (_rtw_queue_empty(pfree_recv_queue)) {
if (list_empty(&pfree_recv_queue->queue)) {
hdr = NULL;
} else {
phead = get_list_head(pfree_recv_queue);
@ -1563,7 +1563,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter,
if (pdefrag_q != NULL) {
if (fragnum == 0) {
/* the first fragment */
if (_rtw_queue_empty(pdefrag_q) == false) {
if (!list_empty(&pdefrag_q->queue)) {
/* free current defrag_q */
rtw_free_recvframe_queue(pdefrag_q, pfree_recv_queue);
}

View file

@ -223,7 +223,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
spin_lock_bh(&(pfree_sta_queue->lock));
if (_rtw_queue_empty(pfree_sta_queue) == true) {
if (list_empty(&pfree_sta_queue->queue)) {
spin_unlock_bh(&pfree_sta_queue->lock);
psta = NULL;
} else {

View file

@ -901,10 +901,10 @@ s32 rtw_txframes_pending(struct adapter *padapter)
{
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
return ((_rtw_queue_empty(&pxmitpriv->be_pending) == false) ||
(_rtw_queue_empty(&pxmitpriv->bk_pending) == false) ||
(_rtw_queue_empty(&pxmitpriv->vi_pending) == false) ||
(_rtw_queue_empty(&pxmitpriv->vo_pending) == false));
return (!list_empty(&pxmitpriv->be_pending.queue) ||
!list_empty(&pxmitpriv->bk_pending.queue) ||
!list_empty(&pxmitpriv->vi_pending.queue) ||
!list_empty(&pxmitpriv->vo_pending.queue));
}
s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pattrib)
@ -1222,7 +1222,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
spin_lock_irqsave(&pfree_queue->lock, irql);
if (_rtw_queue_empty(pfree_queue) == true) {
if (list_empty(&pfree_queue->queue)) {
pxmitbuf = NULL;
} else {
phead = get_list_head(pfree_queue);
@ -1286,7 +1286,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irql);
if (_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
if (list_empty(&pfree_xmitbuf_queue->queue)) {
pxmitbuf = NULL;
} else {
phead = get_list_head(pfree_xmitbuf_queue);
@ -1369,7 +1369,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
spin_lock_bh(&pfree_xmit_queue->lock);
if (_rtw_queue_empty(pfree_xmit_queue) == true) {
if (list_empty(&pfree_xmit_queue->queue)) {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe:%d\n", pxmitpriv->free_xmitframe_cnt));
pxframe = NULL;
} else {
@ -1539,7 +1539,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
phwxmit->accnt--;
/* Remove sta node when there are no pending packets. */
if (_rtw_queue_empty(pframe_queue)) /* must be done after get_next and before break */
if (list_empty(&pframe_queue->queue)) /* must be done after get_next and before break */
list_del_init(&ptxservq->tx_pending);
goto exit;
}

View file

@ -583,7 +583,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
}
} /* end while (aggregate same priority and same DA(AP or STA) frames) */
if (_rtw_queue_empty(&ptxservq->sta_pending) == true)
if (list_empty(&ptxservq->sta_pending.queue))
list_del_init(&ptxservq->tx_pending);
spin_unlock_bh(&pxmitpriv->lock);

View file

@ -171,7 +171,6 @@ void _rtw_memcpy(void *dec, void *sour, u32 sz);
u32 _rtw_down_sema(struct semaphore *sema);
void _rtw_init_queue(struct __queue *pqueue);
u32 _rtw_queue_empty(struct __queue *pqueue);
u32 rtw_systime_to_ms(u32 systime);
u32 rtw_ms_to_systime(u32 ms);

View file

@ -77,11 +77,6 @@ void _rtw_init_queue(struct __queue *pqueue)
spin_lock_init(&(pqueue->lock));
}
u32 _rtw_queue_empty(struct __queue *pqueue)
{
return list_empty(&(pqueue->queue));
}
inline u32 rtw_systime_to_ms(u32 systime)
{
return systime * 1000 / HZ;