mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 22:43:04 +00:00
rtl8188eu: Remove a number of 'list' wrappers
The wrappers for list_empty(), list_add(), list_add_tail(), INIT_LIST_HEAD(), and list_del_init() are removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
92b97f0a67
commit
cbfa6220ef
21 changed files with 203 additions and 243 deletions
|
@ -4232,7 +4232,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
|||
else {
|
||||
RTW_INFO("free psta=%p, aid=%d\n", psta, psta->aid);
|
||||
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
/* _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); */
|
||||
|
|
|
@ -7229,8 +7229,8 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
|
|||
/* RTW_INFO("free psta=%p, aid=%d\n", psta, psta->aid); */
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
if (rtw_is_list_empty(&psta->asoc_list) == false) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (list_empty(&psta->asoc_list) == false) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING, true);
|
||||
|
||||
|
|
|
@ -1909,7 +1909,7 @@ u8 rtw_init_drv_sw(_adapter *padapter)
|
|||
{
|
||||
u8 ret8 = _SUCCESS;
|
||||
|
||||
_rtw_init_listhead(&padapter->list);
|
||||
INIT_LIST_HEAD(&padapter->list);
|
||||
ret8 = rtw_init_default_value(padapter);
|
||||
|
||||
if ((rtw_init_cmd_priv(&padapter->cmdpriv)) == _FAIL) {
|
||||
|
|
|
@ -693,37 +693,6 @@ void rtw_mfree2d(void *pbuf, int h, int w, int size)
|
|||
rtw_mfree((u8 *)pbuf, h * sizeof(void *) + w * h * size);
|
||||
}
|
||||
|
||||
void _rtw_init_listhead(_list *list)
|
||||
{
|
||||
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(_list *phead)
|
||||
{
|
||||
if (list_empty(phead))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
void rtw_list_insert_head(_list *plist, _list *phead)
|
||||
{
|
||||
list_add(plist, phead);
|
||||
}
|
||||
|
||||
void rtw_list_insert_tail(_list *plist, _list *phead)
|
||||
{
|
||||
list_add_tail(plist, phead);
|
||||
}
|
||||
|
||||
/* Caller must check if the list is empty before calling rtw_list_delete */
|
||||
|
||||
void _rtw_init_sema(_sema *sema, int init_val)
|
||||
{
|
||||
sema_init(sema, init_val);
|
||||
|
@ -789,7 +758,7 @@ void _rtw_spinunlock_ex(_lock *plock)
|
|||
|
||||
void _rtw_init_queue(_queue *pqueue)
|
||||
{
|
||||
_rtw_init_listhead(&(pqueue->queue));
|
||||
INIT_LIST_HEAD(&(pqueue->queue));
|
||||
spin_lock_init(&(pqueue->lock));
|
||||
}
|
||||
|
||||
|
@ -800,7 +769,7 @@ void _rtw_deinit_queue(_queue *pqueue)
|
|||
|
||||
u32 _rtw_queue_empty(_queue *pqueue)
|
||||
{
|
||||
return rtw_is_list_empty(&(pqueue->queue));
|
||||
return list_empty(&(pqueue->queue));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue