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
|
@ -178,7 +178,7 @@ struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
|
|||
if (_rtw_queue_empty(queue)) {
|
||||
pnetwork = NULL;
|
||||
} else {
|
||||
pnetwork = LIST_CONTAINOR(get_next(&queue->queue), struct wlan_network, list);
|
||||
pnetwork = container_of(get_next(&queue->queue), struct wlan_network, list);
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
|
|||
}
|
||||
plist = get_next(&(free_queue->queue));
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist , struct wlan_network, list);
|
||||
pnetwork = container_of(plist , struct wlan_network, list);
|
||||
|
||||
rtw_list_delete(&pnetwork->list);
|
||||
|
||||
|
@ -280,7 +280,7 @@ struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
|
|||
plist = get_next(phead);
|
||||
|
||||
while (plist != phead) {
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network , list);
|
||||
pnetwork = container_of(plist, struct wlan_network , list);
|
||||
if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN))
|
||||
break;
|
||||
plist = get_next(plist);
|
||||
|
@ -305,7 +305,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
|||
plist = get_next(phead);
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
|
@ -479,7 +479,7 @@ struct wlan_network *rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
|
|||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
pwlan = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
pwlan = container_of(plist, struct wlan_network, list);
|
||||
|
||||
if (!pwlan->fixed) {
|
||||
if (oldest == NULL || time_after(oldest->last_scanned, pwlan->last_scanned))
|
||||
|
@ -572,7 +572,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
|
|||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
|
||||
if (is_same_network(&(pnetwork->network), target)) {
|
||||
target_find = 1;
|
||||
|
@ -1718,7 +1718,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
|
|||
adapter = (struct adapter *)pmlmepriv->nic_hdl;
|
||||
pmlmepriv->pscanned = get_next(phead);
|
||||
while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) {
|
||||
pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list);
|
||||
pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
|
||||
if (pnetwork == NULL) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork==NULL)\n", __func__));
|
||||
ret = _FAIL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue