}
#endif
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, auth_list);
+ psta = container_of(plist, struct sta_info, auth_list);
plist = get_next(plist);
}
#endif
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
+ psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
#ifdef CONFIG_AUTO_AP_MODE
if (psta->isrc)
plist = get_next(phead);
while (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, addr, ETH_ALEN)) {
plist = get_next(phead);
while (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 (
/* check asoc_queue */
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
+ psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
/* free sta asoc_queue */
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
+ psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
while (phead != plist) {
int stainfo_offset;
- psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
+ psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
phead = get_list_head(pacl_node_q);
plist = get_next(phead);
while (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 (paclnode->valid) {
if (list_empty(&(queue->queue)))
obj = NULL;
else {
- obj = LIST_CONTAINOR(get_next(&(queue->queue)), struct cmd_obj, list);
+ obj = container_of(get_next(&(queue->queue)), struct cmd_obj, list);
list_del_init(&obj->list);
}
else
{
- pnetwork = LIST_CONTAINOR(get_next(&queue->queue), struct wlan_network, list);
+ pnetwork = container_of(get_next(&queue->queue), struct wlan_network, list);
list_del_init(&(pnetwork->list));
}
}
plist = get_next(&(free_queue->queue));
- pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
+ pnetwork = container_of(plist, struct wlan_network, list);
list_del_init(&pnetwork->list);
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;
while (phead != plist) {
- pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
+ pnetwork = container_of(plist, struct wlan_network, list);
plist = get_next(plist);
plist = get_next(phead);
while (plist != phead) {
- found = LIST_CONTAINOR(plist, struct wlan_network, list);
+ found = container_of(plist, struct wlan_network, list);
if (is_same_network(&network->network, &found->network, 0))
break;
if (phead == plist)
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))
if (phead == plist)
break;
- pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
+ pnetwork = container_of(plist, struct wlan_network, list);
rtw_bug_check(pnetwork, pnetwork, pnetwork, pnetwork);
while (phead != mlme->pscanned) {
- pnetwork = LIST_CONTAINOR(mlme->pscanned, struct wlan_network, list);
+ pnetwork = container_of(mlme->pscanned, struct wlan_network, list);
if (!pnetwork) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork == NULL)\n", __func__));
ret = _FAIL;
while (phead != pmlmepriv->pscanned) {
- pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list);
+ pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
if (!pnetwork) {
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork == NULL)\n", __func__));
ret = _FAIL;
if (phead == plist)
break;
- pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
+ pnetwork = container_of(plist, struct wlan_network, list);
plist = get_next(plist);
phead = &pstapriv->asoc_list;
plist = get_next(phead);
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
+ psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
DBG_871X("STA[%pM]:UndecoratedSmoothedPWDB:%d\n",
xmitframe_plist = get_next(xmitframe_phead);
while (xmitframe_phead != xmitframe_plist) {
- pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
+ pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist);
plist = get_next(phead);
- precvbuf = LIST_CONTAINOR(plist, struct recv_buf, list);
+ precvbuf = container_of(plist, struct recv_buf, list);
list_del_init(&precvbuf->list);
xmitframe_plist = get_next(xmitframe_phead);
if (xmitframe_phead != xmitframe_plist) {
- pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
+ pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist);
plist = get_next(phead);
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, list);
+ psta = container_of(plist, struct sta_info, list);
plist = get_next(plist);
}
while (phead != plist) {
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++) {
spin_unlock_bh(&(pstapriv->sta_hash_lock));
return 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);
list_del_init(&(psta->list));
plist = get_next(phead);
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
+ psta = container_of(plist, struct sta_info, hash_list);
plist = get_next(plist);
plist = get_next(phead);
while (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 */
phead = get_list_head(pacl_node_q);
plist = get_next(phead);
while (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))
plist = get_next(phead);
- pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
+ pxmitbuf = container_of(plist, struct xmit_buf, list);
list_del_init(&pxmitbuf->list);
}
plist = get_next(phead);
- pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
+ pxmitbuf = container_of(plist, struct xmit_buf, list);
list_del_init(&pxmitbuf->list);
}
plist = get_next(phead);
- pxframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
+ pxframe = container_of(plist, struct xmit_frame, list);
list_del_init(&pxframe->list);
pxmitpriv->free_xmitframe_cnt--;
} else {
phead = get_list_head(queue);
plist = get_next(phead);
- pxframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
+ pxframe = container_of(plist, struct xmit_frame, list);
list_del_init(&pxframe->list);
pxmitpriv->free_xframe_ext_cnt--;
plist = get_next(phead);
while (phead != plist) {
- pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
+ pxmitframe = container_of(plist, struct xmit_frame, list);
plist = get_next(plist);
plist = get_next(phead);
while (phead != plist) {
- pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
+ pxmitframe = container_of(plist, struct xmit_frame, list);
plist = get_next(plist);
xmitframe_plist = get_next(xmitframe_phead);
while (xmitframe_phead != xmitframe_plist) {
- pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
+ pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist);
xmitframe_plist = get_next(xmitframe_phead);
while (xmitframe_phead != xmitframe_plist) {
- pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
+ pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist);
xmitframe_plist = get_next(xmitframe_phead);
while (xmitframe_phead != xmitframe_plist) {
- pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
+ pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
xmitframe_plist = get_next(xmitframe_plist);
phead = get_list_head(pqueue);
plist = get_next(phead);
- pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
+ pxmitbuf = container_of(plist, struct xmit_buf, list);
list_del_init(&pxmitbuf->list);
}
if (plist == phead)
break;
- pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
+ pxmitbuf = container_of(plist, struct xmit_buf, list);
type = GetFrameSubType(pxmitbuf->pbuf + TXDESC_OFFSET);
/* because stop_sta_xmit may delete sta_plist at any time */
/* so we should add lock here, or while loop can not exit */
while (sta_phead != sta_plist) {
- ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq, tx_pending);
+ ptxservq = container_of(sta_plist, struct tx_servq, tx_pending);
sta_plist = get_next(sta_plist);
#ifdef DBG_XMIT_BUF
while (list_empty(frame_phead) == false) {
frame_plist = get_next(frame_phead);
- pxmitframe = LIST_CONTAINOR(frame_plist, struct xmit_frame, list);
+ pxmitframe = container_of(frame_plist, struct xmit_frame, list);
/* check xmit_buf size enough or not */
txlen = txdesc_size + rtw_wlan_pkt_size(pxmitframe);
plist = get_next(phead);
list_del_init(plist);
- pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
+ pxmitbuf = container_of(plist, struct xmit_buf, list);
rtw_free_xmitframe(pxmitpriv, (struct xmit_frame *)pxmitbuf->priv_data);
pxmitbuf->priv_data = NULL;
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
return (&(queue->queue));
}
-
-#define LIST_CONTAINOR(ptr, type, member) \
- container_of(ptr, type, member)
-
static inline void _set_timer(_timer *ptimer, u32 delay_time)
{
mod_timer(ptimer, (jiffies + (delay_time * HZ / 1000)));
if (phead == plist)
break;
- pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
+ pnetwork = container_of(plist, struct wlan_network, list);
/* report network only if the current channel set contains the channel to which this network belongs */
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0
/* check asoc_queue */
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
+ psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
/* check asoc_queue */
while (phead != plist) {
if (idx == i)
- psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
+ psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
i++;
}
if (phead == pmlmepriv->pscanned)
break;
- pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list);
+ pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
break;
}
- pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
+ pnetwork = container_of(plist, struct wlan_network, list);
/* report network only if the current channel set contains the channel to which this network belongs */
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0
break;
}
- pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned, struct wlan_network, list);
+ pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
break;
- pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
+ pnetwork = container_of(plist, struct wlan_network, list);
if (!mac_pton(data, bssid)) {
DBG_871X("Invalid BSSID '%s'.\n", (u8 *)data);
plist = get_next(phead);
while (phead != plist) {
- psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
+ psta = container_of(plist, struct sta_info, hash_list);
plist = get_next(plist);
/* free sta asoc_queue */
while (phead != plist) {
int stainfo_offset;
- psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
+ psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);
stainfo_offset = rtw_stainfo_offset(pstapriv, psta);