mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Replace LIST_CONTAINOR with container_of
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
7fd86158bf
commit
567257655f
13 changed files with 61 additions and 64 deletions
|
@ -190,7 +190,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
|
|||
plist = get_next(phead);
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , list);
|
||||
psta = container_of(plist, struct sta_info , list);
|
||||
plist = get_next(plist);
|
||||
|
||||
rtw_mfree_stainfo(psta);
|
||||
|
@ -237,7 +237,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
|||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
int i;
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
|
||||
psta = container_of(plist, struct sta_info , hash_list);
|
||||
plist = get_next(plist);
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
|
@ -276,7 +276,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
spin_unlock_bh(&pfree_sta_queue->lock);
|
||||
psta = NULL;
|
||||
} else {
|
||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
psta = container_of(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
rtw_list_delete(&(psta->list));
|
||||
spin_unlock_bh(&pfree_sta_queue->lock);
|
||||
_rtw_init_stainfo(psta);
|
||||
|
@ -411,7 +411,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
plist = get_next(phead);
|
||||
|
||||
while (!rtw_is_list_empty(phead)) {
|
||||
prframe = LIST_CONTAINOR(plist, struct recv_frame, list);
|
||||
prframe = container_of(plist, struct recv_frame, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
|
@ -487,7 +487,7 @@ void rtw_free_all_stainfo(struct adapter *padapter)
|
|||
plist = get_next(phead);
|
||||
|
||||
while ((!rtw_end_of_queue_search(phead, plist))) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info , hash_list);
|
||||
psta = container_of(plist, struct sta_info , hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
|
@ -523,7 +523,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
plist = get_next(phead);
|
||||
|
||||
while ((!rtw_end_of_queue_search(phead, plist))) {
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
psta = container_of(plist, struct sta_info, hash_list);
|
||||
|
||||
if ((!memcmp(psta->hwaddr, addr, ETH_ALEN))) {
|
||||
/* if found the matched address */
|
||||
|
@ -587,7 +587,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
|||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
while ((!rtw_end_of_queue_search(phead, plist))) {
|
||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
|
||||
if (!memcmp(paclnode->addr, mac_addr, ETH_ALEN)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue