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);
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);
spin_lock_bh(&free_queue->lock);
- if (_rtw_queue_empty(free_queue) == true) {
+ if (list_empty(&free_queue->queue)) {
pnetwork = NULL;
goto exit;
}
/* 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;
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);
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);
}
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 {
{
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)
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);
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);
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 {
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;
}
}
} /* 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);
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);
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;