mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-10 15:23:06 +00:00
rtl8188eu: Remove wrapper get_next()
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
567257655f
commit
6d3d853360
12 changed files with 66 additions and 95 deletions
|
@ -1137,15 +1137,13 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
|||
authmode = padapter->securitypriv.ndisauthtype;
|
||||
spin_lock_bh(&queue->lock);
|
||||
phead = get_list_head(queue);
|
||||
pmlmepriv->pscanned = get_next(phead);
|
||||
pmlmepriv->pscanned = phead->next;
|
||||
|
||||
while (1) {
|
||||
if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == true)
|
||||
break;
|
||||
while (phead != pmlmepriv->pscanned) {
|
||||
|
||||
pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
|
||||
|
||||
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
|
||||
pmlmepriv->pscanned = pmlmepriv->pscanned->next;
|
||||
|
||||
dst_bssid = pnetwork->network.MacAddress;
|
||||
|
||||
|
@ -1158,7 +1156,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
@ -1437,12 +1435,9 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist))
|
||||
break;
|
||||
plist = phead->next;
|
||||
|
||||
while (phead != plist) {
|
||||
if ((stop - ev) < SCAN_ITEM_SIZE) {
|
||||
ret = -E2BIG;
|
||||
break;
|
||||
|
@ -1454,7 +1449,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0)
|
||||
ev = translate_scan(padapter, a, pnetwork, ev, stop);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -1527,19 +1522,12 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
|||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_wx_set_essid: ssid =[%s]\n", src_ssid));
|
||||
spin_lock_bh(&queue->lock);
|
||||
phead = get_list_head(queue);
|
||||
pmlmepriv->pscanned = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == true) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_warning_,
|
||||
("rtw_wx_set_essid: scan_q is empty, set ssid to check if scanning again!\n"));
|
||||
|
||||
break;
|
||||
}
|
||||
pmlmepriv->pscanned = phead->next;
|
||||
|
||||
while (phead != pmlmepriv->pscanned) {
|
||||
pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
|
||||
|
||||
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
|
||||
pmlmepriv->pscanned = pmlmepriv->pscanned->next;
|
||||
|
||||
dst_ssid = pnetwork->network.Ssid.Ssid;
|
||||
|
||||
|
@ -2600,7 +2588,7 @@ static int rtw_get_ap_info(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -2631,7 +2619,7 @@ static int rtw_get_ap_info(struct net_device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -3103,7 +3091,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -3127,7 +3115,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
|||
}
|
||||
break;
|
||||
}
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -3175,7 +3163,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -3210,7 +3198,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -3259,7 +3247,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -3290,7 +3278,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -3338,7 +3326,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -3361,7 +3349,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -3409,7 +3397,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -3435,7 +3423,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
|
|||
}
|
||||
}
|
||||
}
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -3491,7 +3479,7 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -3503,7 +3491,7 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -3586,7 +3574,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -3617,7 +3605,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
}
|
||||
}
|
||||
}
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -3736,7 +3724,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
|
@ -3776,7 +3764,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
@ -4431,12 +4419,12 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
|
||||
for (i = 0; i < NUM_STA; i++) {
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
psta = container_of(plist, struct sta_info, hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (extra_arg == psta->aid) {
|
||||
DBG_88E("sta's macaddr:%pM\n", (psta->hwaddr));
|
||||
|
|
|
@ -126,16 +126,6 @@ u32 rtw_is_list_empty(struct list_head *phead)
|
|||
return false;
|
||||
}
|
||||
|
||||
void rtw_list_insert_head(struct list_head *plist, struct list_head *phead)
|
||||
{
|
||||
list_add(plist, phead);
|
||||
}
|
||||
|
||||
void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead)
|
||||
{
|
||||
list_add_tail(plist, phead);
|
||||
}
|
||||
|
||||
/*
|
||||
Caller must check if the list is empty before calling rtw_list_delete
|
||||
*/
|
||||
|
|
|
@ -191,13 +191,13 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
|
|||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
/* free sta asoc_queue */
|
||||
while (!rtw_end_of_queue_search(phead, plist)) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
/* avoid come from STA1 and send back STA1 */
|
||||
if (!memcmp(psta->hwaddr, &skb->data[6], 6))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue