spin_lock_irqsave(&queue->lock, irqL);
- if (rtw_is_list_empty(&(queue->queue))) {
+ if (list_empty(&(queue->queue))) {
obj = NULL;
} else {
obj = container_of((&queue->queue)->next, struct cmd_obj, list);
pstat->auth_seq = 0;
} else {
spin_lock_bh(&pstapriv->asoc_list_lock);
- if (!rtw_is_list_empty(&pstat->asoc_list)) {
+ if (!list_empty(&pstat->asoc_list)) {
rtw_list_delete(&pstat->asoc_list);
pstapriv->asoc_list_cnt--;
}
}
spin_lock_bh(&pstapriv->auth_list_lock);
- if (rtw_is_list_empty(&pstat->auth_list)) {
+ if (list_empty(&pstat->auth_list)) {
list_add_tail(&pstat->auth_list, &pstapriv->auth_list);
pstapriv->auth_list_cnt++;
}
pstat->state |= WIFI_FW_ASSOC_SUCCESS;
spin_lock_bh(&pstapriv->auth_list_lock);
- if (!rtw_is_list_empty(&pstat->auth_list)) {
+ if (!list_empty(&pstat->auth_list)) {
rtw_list_delete(&pstat->auth_list);
pstapriv->auth_list_cnt--;
}
spin_unlock_bh(&pstapriv->auth_list_lock);
spin_lock_bh(&pstapriv->asoc_list_lock);
- if (rtw_is_list_empty(&pstat->asoc_list)) {
+ if (list_empty(&pstat->asoc_list)) {
pstat->expire_to = pstapriv->expire_to;
list_add_tail(&pstat->asoc_list, &pstapriv->asoc_list);
pstapriv->asoc_list_cnt++;
u8 updated = 0;
spin_lock_bh(&pstapriv->asoc_list_lock);
- if (!rtw_is_list_empty(&psta->asoc_list)) {
+ if (!list_empty(&psta->asoc_list)) {
rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, false, reason);
u8 updated = 0;
spin_lock_bh(&pstapriv->asoc_list_lock);
- if (!rtw_is_list_empty(&psta->asoc_list)) {
+ if (!list_empty(&psta->asoc_list)) {
rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, false, reason);
/* Handling some condition for forced indicate case. */
if (bforced) {
- if (rtw_is_list_empty(phead))
+ if (list_empty(phead))
return true;
prhdr = container_of(plist, struct recv_frame, list);
/* Prepare indication list and indication. */
/* Check if there is any packet need indicate. */
- while (!rtw_is_list_empty(phead)) {
+ while (!list_empty(phead)) {
prhdr = container_of(plist, struct recv_frame, list);
prframe = (struct recv_frame *)prhdr;
pattrib = &prframe->attrib;
phead = get_list_head(ppending_recvframe_queue);
plist = phead->next;
- while (!rtw_is_list_empty(phead)) {
+ while (!list_empty(phead)) {
prhdr = container_of(plist, struct recv_frame, list);
prframe = (struct recv_frame *)prhdr;
#ifdef CONFIG_88EU_AP_MODE
spin_lock_bh(&pstapriv->auth_list_lock);
- if (!rtw_is_list_empty(&psta->auth_list)) {
+ if (!list_empty(&psta->auth_list)) {
rtw_list_delete(&psta->auth_list);
pstapriv->auth_list_cnt--;
}
ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index));
- if (rtw_is_list_empty(&ptxservq->tx_pending))
+ if (list_empty(&ptxservq->tx_pending))
list_add_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue));
list_add_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending));
void _rtw_memcpy(void *dec, void *sour, u32 sz);
void _rtw_init_listhead(struct list_head *list);
-u32 rtw_is_list_empty(struct list_head *phead);
void rtw_list_delete(struct list_head *plist);
u32 _rtw_down_sema(struct semaphore *sema);
psta = rtw_get_stainfo(pstapriv, param->sta_addr);
if (psta) {
spin_lock_bh(&pstapriv->asoc_list_lock);
- if (!rtw_is_list_empty(&psta->asoc_list)) {
+ if (!list_empty(&psta->asoc_list)) {
rtw_list_delete(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
INIT_LIST_HEAD(list);
}
-/*
-For the following list_xxx operations,
-caller must guarantee the atomic context.
-Otherwise, there will be racing condition.
-*/
-u32 rtw_is_list_empty(struct list_head *phead)
-{
- if (list_empty(phead))
- return true;
- else
- return false;
-}
-
-/*
-Caller must check if the list is empty before calling rtw_list_delete
-*/
-
u32 _rtw_down_sema(struct semaphore *sema)
{
if (down_interruptible(sema))
u32 _rtw_queue_empty(struct __queue *pqueue)
{
- return rtw_is_list_empty(&(pqueue->queue));
+ return list_empty(&(pqueue->queue));
}
inline u32 rtw_systime_to_ms(u32 systime)