]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: rtl8188eu: Replace _rtw_queue_empty() with list_empty()
authornavin patidar <navin.patidar@gmail.com>
Sun, 22 Jun 2014 08:36:29 +0000 (14:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:27:13 +0000 (20:27 -0400)
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
drivers/staging/rtl8188eu/core/rtw_mlme.c
drivers/staging/rtl8188eu/core/rtw_recv.c
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
drivers/staging/rtl8188eu/include/osdep_service.h
drivers/staging/rtl8188eu/os_dep/osdep_service.c

index 7426d007959d1b20c89ef5016f690e8a4e0354c0..a97da87f317cabe65fdd578325c83a2089021c9a 100644 (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);
 
index 20b180a9b60f67bde0a1967f98c85db531d63282..c03442d97673cb47c8fa03fc07cc22b8dcdee175 100644 (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;
 
index e2be938b04c94ecd1131642cc964f4f9ee32c703..56aa8861b90031191dfa3a077184c93694024c20 100644 (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);
                                }
index c6a249d65ceb46731837d395141171f056c5e25d..e1dc8fa82d38227d7b3d7d49cc9a235d773ec8be 100644 (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 {
index ddc712f7ad00af5ccfae191a5c6e299ddb773064..3a40b2a43b79aba3d6d46b46d920952a66a26709 100644 (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;
                        }
index c0f23aa96afba57d814759ca2dcb04d3658312c0..ba8beb88d53c407a70d6122f0ada2bff2e5dcce9 100644 (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);
index 9f42d21fd7b01ae81a767a5a0bd643d6429449f0..a55b78639879a0dd3023e46021d5200a661fa405 100644 (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);
index ff6ee5babe097055c2fafa7b242709f04bc1fec7..de0efe2759ff48c7eb49688af2edcb31d5881535 100644 (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;