rtl8188eu: Replace LIST_CONTAINOR with container_of

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2014-12-13 10:40:44 -06:00
parent 7fd86158bf
commit 567257655f
13 changed files with 61 additions and 64 deletions

View file

@ -1143,7 +1143,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == true)
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);
@ -1448,7 +1448,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
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)
@ -1537,7 +1537,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
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);
@ -2606,7 +2606,7 @@ static int rtw_get_ap_info(struct net_device *dev,
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 (hwaddr_aton_i(data, bssid)) {
DBG_88E("Invalid BSSID '%s'.\n", (u8 *)data);
@ -3109,7 +3109,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
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 (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
u8 *wpsie;
uint wpsie_len = 0;
@ -3181,7 +3181,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
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 (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
/* Commented by Albert 2011/05/18 */
/* Match the device address located in the P2P IE */
@ -3265,7 +3265,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
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 (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
u8 *wpsie;
uint wpsie_len = 0;
@ -3344,7 +3344,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
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 (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
u8 *wpsie;
uint wpsie_len = 0;
@ -3415,7 +3415,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
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 (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
/* Commented by Albert 20121226 */
/* Match the device address located in the P2P IE */
@ -3497,7 +3497,7 @@ static int rtw_p2p_connect(struct net_device *dev,
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 (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
break;
@ -3592,7 +3592,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
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);
/* Commented by Albert 2011/05/18 */
/* Match the device address located in the P2P IE */
@ -3745,7 +3745,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
if (uintPeerChannel != 0)
break;
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
pnetwork = container_of(plist, struct wlan_network, list);
/* Commented by Albert 2011/05/18 */
/* Match the device address located in the P2P IE */
@ -4434,7 +4434,7 @@ static int rtw_dbg_port(struct net_device *dev,
plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == false) {
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
psta = container_of(plist, struct sta_info, hash_list);
plist = get_next(plist);

View file

@ -195,7 +195,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
/* free sta asoc_queue */
while (!rtw_end_of_queue_search(phead, plist)) {
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
psta = container_of(plist, struct sta_info, asoc_list);
plist = get_next(plist);