mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-09 23:19:39 +00:00
rtlwifi: Remove list-handling macros
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
6d3d853360
commit
209e50ad60
14 changed files with 225 additions and 293 deletions
|
@ -284,17 +284,17 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
phead = &pstapriv->auth_list;
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
/* check auth_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, auth_list);
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (psta->expire_to > 0) {
|
||||
psta->expire_to--;
|
||||
if (psta->expire_to == 0) {
|
||||
rtw_list_delete(&psta->auth_list);
|
||||
list_del_init(&psta->auth_list);
|
||||
pstapriv->auth_list_cnt--;
|
||||
|
||||
DBG_88E("auth expire %6ph\n",
|
||||
|
@ -318,12 +318,12 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
/* check asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, asoc_list);
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (chk_sta_is_alive(psta) || !psta->expire_to) {
|
||||
psta->expire_to = pstapriv->expire_to;
|
||||
|
@ -364,7 +364,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
continue;
|
||||
}
|
||||
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state);
|
||||
|
@ -420,7 +420,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
|||
|
||||
DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state);
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
@ -1144,11 +1144,11 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
|||
spin_lock_bh(&pacl_node_q->lock);
|
||||
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(phead, plist)) {
|
||||
while (phead != plist) {
|
||||
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
|
||||
if (paclnode->valid) {
|
||||
|
@ -1205,17 +1205,17 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
|||
spin_lock_bh(&pacl_node_q->lock);
|
||||
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(phead, plist)) {
|
||||
while (phead != plist) {
|
||||
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
|
||||
if (paclnode->valid) {
|
||||
paclnode->valid = false;
|
||||
|
||||
rtw_list_delete(&paclnode->list);
|
||||
list_del_init(&paclnode->list);
|
||||
|
||||
pacl_list->num--;
|
||||
}
|
||||
|
@ -1504,13 +1504,13 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
|
|||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
/* check asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
VCS_update(padapter, psta);
|
||||
}
|
||||
|
@ -1777,12 +1777,12 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
|||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
/* for each sta in 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;
|
||||
|
||||
issue_action_spct_ch_switch(padapter, psta->hwaddr, new_ch, ch_offset);
|
||||
psta->expire_to = ((pstapriv->expire_to * 2) > 5) ? 5 : (pstapriv->expire_to * 2);
|
||||
|
@ -1811,15 +1811,15 @@ int rtw_sta_flush(struct adapter *padapter)
|
|||
|
||||
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)) == false) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||
|
@ -1941,15 +1941,15 @@ void stop_ap_mode(struct adapter *padapter)
|
|||
/* for ACL */
|
||||
spin_lock_bh(&pacl_node_q->lock);
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
plist = phead->next;
|
||||
while (phead != plist) {
|
||||
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (paclnode->valid) {
|
||||
paclnode->valid = false;
|
||||
|
||||
rtw_list_delete(&paclnode->list);
|
||||
list_del_init(&paclnode->list);
|
||||
|
||||
pacl_list->num--;
|
||||
}
|
||||
|
|
|
@ -159,10 +159,10 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
|
|||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&queue->lock, flags);
|
||||
if (rtw_is_list_empty(&(queue->queue))) {
|
||||
if (list_empty(&(queue->queue))) {
|
||||
obj = NULL;
|
||||
} else {
|
||||
obj = container_of(get_next(&(queue->queue)), struct cmd_obj, list);
|
||||
obj = container_of((&(queue->queue))->next, struct cmd_obj, list);
|
||||
rtw_list_delete(&obj->list);
|
||||
}
|
||||
|
||||
|
|
|
@ -847,12 +847,12 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
|
||||
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) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
len += snprintf(page + len, count - len, "sta's macaddr: %pM\n", psta->hwaddr);
|
||||
len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
|
||||
|
|
|
@ -71,7 +71,7 @@ u8 rtw_do_join(struct adapter *padapter)
|
|||
|
||||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("\n rtw_do_join: phead = %p; plist = %p\n\n\n", phead, plist));
|
||||
|
||||
|
@ -83,7 +83,7 @@ u8 rtw_do_join(struct adapter *padapter)
|
|||
|
||||
pmlmepriv->to_join = true;
|
||||
|
||||
if (_rtw_queue_empty(queue)) {
|
||||
if (list_empty(&queue->queue)) {
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
|
|
|
@ -175,12 +175,12 @@ struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
|
|||
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(queue)) {
|
||||
if (list_empty(&queue->queue)) {
|
||||
pnetwork = NULL;
|
||||
} else {
|
||||
pnetwork = container_of(get_next(&queue->queue), struct wlan_network, list);
|
||||
pnetwork = container_of((&queue->queue)->next, struct wlan_network, list);
|
||||
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
list_del_init(&(pnetwork->list));
|
||||
}
|
||||
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
@ -196,15 +196,15 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
|
|||
|
||||
spin_lock_bh(&free_queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(free_queue) == true) {
|
||||
if (list_empty(&free_queue->queue)) {
|
||||
pnetwork = NULL;
|
||||
goto exit;
|
||||
}
|
||||
plist = get_next(&(free_queue->queue));
|
||||
plist = (&(free_queue->queue))->next;
|
||||
|
||||
pnetwork = container_of(plist , struct wlan_network, list);
|
||||
|
||||
rtw_list_delete(&pnetwork->list);
|
||||
list_del_init(&pnetwork->list);
|
||||
|
||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("_rtw_alloc_network: ptr=%p\n", plist));
|
||||
pnetwork->network_type = 0;
|
||||
|
@ -242,7 +242,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv , struct wlan_network *pnetwo
|
|||
return;
|
||||
}
|
||||
spin_lock_bh(&free_queue->lock);
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
list_del_init(&(pnetwork->list));
|
||||
list_add_tail(&(pnetwork->list), &(free_queue->queue));
|
||||
pmlmepriv->num_of_scanned--;
|
||||
spin_unlock_bh(&free_queue->lock);
|
||||
|
@ -256,7 +256,7 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
|
|||
return;
|
||||
if (pnetwork->fixed)
|
||||
return;
|
||||
rtw_list_delete(&(pnetwork->list));
|
||||
list_del_init(&(pnetwork->list));
|
||||
list_add_tail(&(pnetwork->list), get_list_head(free_queue));
|
||||
pmlmepriv->num_of_scanned--;
|
||||
}
|
||||
|
@ -277,13 +277,13 @@ struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
|
|||
goto exit;
|
||||
}
|
||||
phead = get_list_head(scanned_queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (plist != phead) {
|
||||
pnetwork = container_of(plist, struct wlan_network , list);
|
||||
if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN))
|
||||
break;
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
if (plist == phead)
|
||||
pnetwork = NULL;
|
||||
|
@ -302,12 +302,12 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
|||
spin_lock_bh(&scanned_queue->lock);
|
||||
|
||||
phead = get_list_head(scanned_queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
_rtw_free_network(pmlmepriv, pnetwork, isfreeall);
|
||||
}
|
||||
|
@ -473,10 +473,10 @@ struct wlan_network *rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
|
|||
|
||||
phead = get_list_head(scanned_queue);
|
||||
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
if (phead == plist)
|
||||
break;
|
||||
|
||||
pwlan = container_of(plist, struct wlan_network, list);
|
||||
|
@ -486,7 +486,7 @@ struct wlan_network *rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
|
|||
oldest = pwlan;
|
||||
}
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
return oldest;
|
||||
|
@ -560,33 +560,25 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
|
|||
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
struct wlan_network *oldest = NULL;
|
||||
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
||||
struct wifidirect_info *pwdinfo= &(adapter->wdinfo);
|
||||
int target_find = 0;
|
||||
|
||||
spin_lock_bh(&queue->lock);
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
plist = phead->next;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
|
||||
if (is_same_network(&(pnetwork->network), target)) {
|
||||
target_find = 1;
|
||||
if (is_same_network(&(pnetwork->network), target))
|
||||
break;
|
||||
}
|
||||
if ((oldest == ((struct wlan_network *)0)) ||
|
||||
time_after(oldest->last_scanned, pnetwork->last_scanned))
|
||||
oldest = pnetwork;
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
/* If we didn't find a match, then get a new network slot to initialize
|
||||
* with this beacon's information */
|
||||
if (!target_find) {
|
||||
if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == true) {
|
||||
if (phead == plist) {
|
||||
if (list_empty(&(pmlmepriv->free_bss_pool.queue))) {
|
||||
/* If there are no more slots, expire the oldest */
|
||||
pnetwork = oldest;
|
||||
|
||||
|
@ -898,11 +890,11 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
|||
spin_lock_bh(&free_queue->lock);
|
||||
|
||||
phead = get_list_head(scan_queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (plist != phead) {
|
||||
ptemp = get_next(plist);
|
||||
rtw_list_delete(plist);
|
||||
ptemp = plist->next;
|
||||
list_del_init(plist);
|
||||
list_add_tail(plist, &free_queue->queue);
|
||||
plist = ptemp;
|
||||
pmlmepriv->num_of_scanned--;
|
||||
|
@ -910,7 +902,6 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
|||
|
||||
spin_unlock_bh(&free_queue->lock);
|
||||
spin_unlock_bh(&scan_queue->lock);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1716,15 +1707,15 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
phead = get_list_head(queue);
|
||||
adapter = (struct adapter *)pmlmepriv->nic_hdl;
|
||||
pmlmepriv->pscanned = get_next(phead);
|
||||
while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) {
|
||||
pmlmepriv->pscanned = phead->next;
|
||||
while (phead != pmlmepriv->pscanned) {
|
||||
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;
|
||||
goto exit;
|
||||
}
|
||||
pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
|
||||
pmlmepriv->pscanned = pmlmepriv->pscanned->next;
|
||||
rtw_check_join_candidate(pmlmepriv, &candidate, pnetwork);
|
||||
}
|
||||
if (candidate == NULL) {
|
||||
|
|
|
@ -811,8 +811,8 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
|
|||
pstat->auth_seq = 0;
|
||||
} else {
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if (!rtw_is_list_empty(&pstat->asoc_list)) {
|
||||
rtw_list_delete(&pstat->asoc_list);
|
||||
if (!list_empty(&pstat->asoc_list)) {
|
||||
list_del_init(&pstat->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
}
|
||||
spin_unlock_bh(&pstapriv->asoc_list_lock);
|
||||
|
@ -823,7 +823,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
|
|||
}
|
||||
|
||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
if (rtw_is_list_empty(&pstat->auth_list)) {
|
||||
if (list_empty(&pstat->auth_list)) {
|
||||
list_add_tail(&pstat->auth_list, &pstapriv->auth_list);
|
||||
pstapriv->auth_list_cnt++;
|
||||
}
|
||||
|
@ -1395,14 +1395,14 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
|
|||
pstat->state |= WIFI_FW_ASSOC_SUCCESS;
|
||||
|
||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
if (!rtw_is_list_empty(&pstat->auth_list)) {
|
||||
rtw_list_delete(&pstat->auth_list);
|
||||
if (!list_empty(&pstat->auth_list)) {
|
||||
list_del_init(&pstat->auth_list);
|
||||
pstapriv->auth_list_cnt--;
|
||||
}
|
||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
||||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if (rtw_is_list_empty(&pstat->asoc_list)) {
|
||||
if (list_empty(&pstat->asoc_list)) {
|
||||
pstat->expire_to = pstapriv->expire_to;
|
||||
list_add_tail(&pstat->asoc_list, &pstapriv->asoc_list);
|
||||
pstapriv->asoc_list_cnt++;
|
||||
|
@ -1585,8 +1585,8 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
|
|||
u8 updated = 0;
|
||||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if (!rtw_is_list_empty(&psta->asoc_list)) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (!list_empty(&psta->asoc_list)) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, false, reason);
|
||||
}
|
||||
|
@ -1665,8 +1665,8 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
|
|||
u8 updated = 0;
|
||||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if (!rtw_is_list_empty(&psta->asoc_list)) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (!list_empty(&psta->asoc_list)) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, false, reason);
|
||||
}
|
||||
|
@ -6188,19 +6188,16 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
|||
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
phead = get_list_head(queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
while (phead != plist) {
|
||||
int len;
|
||||
u8 *p;
|
||||
struct wlan_bssid_ex *pbss_network;
|
||||
|
||||
if (rtw_end_of_queue_search(phead, plist))
|
||||
break;
|
||||
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
pbss_network = (struct wlan_bssid_ex *)&pnetwork->network;
|
||||
|
||||
|
@ -8309,14 +8306,14 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
|
|||
spin_lock_bh(&psta_bmc->sleep_q.lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
xmitframe_plist = xmitframe_phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
xmitframe_plist = xmitframe_plist->next;
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta_bmc->sleepq_len--;
|
||||
if (psta_bmc->sleepq_len > 0)
|
||||
|
|
|
@ -57,13 +57,13 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
/* look up sta asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (psta->is_p2p_device) {
|
||||
tmplen = 0;
|
||||
|
@ -961,13 +961,13 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
phead = &pstapriv->asoc_list;
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
/* look up sta asoc_queue */
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, asoc_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (psta->is_p2p_device && (psta->dev_cap&P2P_DEVCAP_CLIENT_DISCOVERABILITY) &&
|
||||
!memcmp(psta->dev_addr, dev_addr, ETH_ALEN)) {
|
||||
|
|
|
@ -142,22 +142,22 @@ void _rtw_free_recv_priv (struct recv_priv *precvpriv)
|
|||
|
||||
struct recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
|
||||
{
|
||||
struct recv_frame *precvframe;
|
||||
struct recv_frame *hdr;
|
||||
struct list_head *plist, *phead;
|
||||
struct adapter *padapter;
|
||||
struct recv_priv *precvpriv;
|
||||
|
||||
if (_rtw_queue_empty(pfree_recv_queue)) {
|
||||
precvframe = NULL;
|
||||
if (list_empty(&pfree_recv_queue->queue)) {
|
||||
hdr = NULL;
|
||||
} else {
|
||||
phead = get_list_head(pfree_recv_queue);
|
||||
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
precvframe = container_of(plist, struct recv_frame, list);
|
||||
hdr = container_of(plist, struct recv_frame, list);
|
||||
|
||||
rtw_list_delete(&precvframe->list);
|
||||
padapter = precvframe->adapter;
|
||||
list_del_init(&hdr->list);
|
||||
padapter = hdr->adapter;
|
||||
if (padapter != NULL) {
|
||||
precvpriv = &padapter->recvpriv;
|
||||
if (pfree_recv_queue == &precvpriv->free_recv_queue)
|
||||
|
@ -165,7 +165,7 @@ struct recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
|
|||
}
|
||||
}
|
||||
|
||||
return precvframe;
|
||||
return (struct recv_frame *)hdr;
|
||||
}
|
||||
|
||||
struct recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
|
||||
|
@ -205,7 +205,7 @@ int rtw_free_recvframe(struct recv_frame *precvframe, struct __queue *pfree_recv
|
|||
|
||||
spin_lock_bh(&pfree_recv_queue->lock);
|
||||
|
||||
rtw_list_delete(&(precvframe->list));
|
||||
list_del_init(&(precvframe->list));
|
||||
|
||||
precvframe->len = 0;
|
||||
|
||||
|
@ -226,7 +226,7 @@ int _rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue)
|
|||
struct adapter *padapter = precvframe->adapter;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
|
||||
rtw_list_delete(&(precvframe->list));
|
||||
list_del_init(&(precvframe->list));
|
||||
list_add_tail(&(precvframe->list), get_list_head(queue));
|
||||
|
||||
if (padapter != NULL) {
|
||||
|
@ -258,20 +258,20 @@ using spinlock to protect
|
|||
|
||||
void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue)
|
||||
{
|
||||
struct recv_frame *precvframe;
|
||||
struct recv_frame *hdr;
|
||||
struct list_head *plist, *phead;
|
||||
|
||||
spin_lock(&pframequeue->lock);
|
||||
|
||||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
precvframe = container_of(plist, struct recv_frame, list);
|
||||
while (phead != plist) {
|
||||
hdr = container_of(plist, struct recv_frame, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
rtw_free_recvframe(precvframe, pfree_recv_queue);
|
||||
rtw_free_recvframe((struct recv_frame *)hdr, pfree_recv_queue);
|
||||
}
|
||||
|
||||
spin_unlock(&pframequeue->lock);
|
||||
|
@ -295,7 +295,7 @@ int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue
|
|||
{
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
list_del_init(&precvbuf->list);
|
||||
list_add(&precvbuf->list, get_list_head(queue));
|
||||
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
@ -309,7 +309,7 @@ int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
|
|||
|
||||
spin_lock_irqsave(&queue->lock, flags);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
list_del_init(&precvbuf->list);
|
||||
|
||||
list_add_tail(&precvbuf->list, get_list_head(queue));
|
||||
spin_unlock_irqrestore(&queue->lock, flags);
|
||||
|
@ -324,16 +324,16 @@ struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue)
|
|||
|
||||
spin_lock_irqsave(&queue->lock, flags);
|
||||
|
||||
if (_rtw_queue_empty(queue)) {
|
||||
if (list_empty(&queue->queue)) {
|
||||
precvbuf = NULL;
|
||||
} else {
|
||||
phead = get_list_head(queue);
|
||||
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
precvbuf = container_of(plist, struct recv_buf, list);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
list_del_init(&precvbuf->list);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&queue->lock, flags);
|
||||
|
@ -1071,14 +1071,14 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
|
|||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
xmitframe_plist = xmitframe_phead->next;
|
||||
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
|
||||
if (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
xmitframe_plist = xmitframe_plist->next;
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta->sleepq_len--;
|
||||
|
||||
|
@ -1475,7 +1475,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter, struct __que
|
|||
plist = phead->next;
|
||||
prframe = container_of(plist, struct recv_frame, list);
|
||||
prframe = (struct recv_frame *)pfhdr;
|
||||
rtw_list_delete(&(prframe->list));
|
||||
list_del_init(&(prframe->list));
|
||||
|
||||
if (curfragnum != pfhdr->attrib.frag_num) {
|
||||
/* the first fragment number must be 0 */
|
||||
|
@ -1585,7 +1585,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, struct recv_fr
|
|||
if (pdefrag_q != NULL) {
|
||||
if (fragnum == 0) {
|
||||
/* the first fragment */
|
||||
if (_rtw_queue_empty(pdefrag_q) == false) {
|
||||
if (!list_empty(&pdefrag_q->queue)) {
|
||||
/* free current defrag_q */
|
||||
rtw_free_recvframe_queue(pdefrag_q, pfree_recv_queue);
|
||||
}
|
||||
|
@ -1792,25 +1792,25 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, struct re
|
|||
struct rx_pkt_attrib *pattrib = &prframe->attrib;
|
||||
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||
struct list_head *phead, *plist;
|
||||
struct recv_frame *pnextrframe;
|
||||
struct recv_frame *hdr;
|
||||
struct rx_pkt_attrib *pnextattrib;
|
||||
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (rtw_end_of_queue_search(phead, plist) == false) {
|
||||
pnextrframe = container_of(plist, struct recv_frame, list);
|
||||
pnextattrib = &pnextrframe->attrib;
|
||||
while (phead != plist) {
|
||||
hdr = container_of(plist, struct recv_frame, list);
|
||||
pnextattrib = &hdr->attrib;
|
||||
|
||||
if (SN_LESS(pnextattrib->seq_num, pattrib->seq_num))
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
else if (SN_EQUAL(pnextattrib->seq_num, pattrib->seq_num))
|
||||
return false;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
rtw_list_delete(&(prframe->list));
|
||||
list_del_init(&(prframe->list));
|
||||
|
||||
list_add_tail(&(prframe->list), plist);
|
||||
return true;
|
||||
|
@ -1826,11 +1826,11 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
|
|||
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
/* Handling some condition for forced indicate case. */
|
||||
if (bforced) {
|
||||
if (rtw_is_list_empty(phead))
|
||||
if (list_empty(phead))
|
||||
return true;
|
||||
|
||||
prframe = container_of(plist, struct recv_frame, list);
|
||||
|
@ -1840,7 +1840,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
|
|||
|
||||
/* Prepare indication list and indication. */
|
||||
/* Check if there is any packet need indicate. */
|
||||
while (!rtw_is_list_empty(phead)) {
|
||||
while (!list_empty(phead)) {
|
||||
prframe = container_of(plist, struct recv_frame, list);
|
||||
pattrib = &prframe->attrib;
|
||||
|
||||
|
@ -1848,8 +1848,8 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
|
|||
RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_,
|
||||
("recv_indicatepkts_in_order: indicate=%d seq=%d amsdu=%d\n",
|
||||
preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
|
||||
plist = get_next(plist);
|
||||
rtw_list_delete(&(prframe->list));
|
||||
plist = plist->next;
|
||||
list_del_init(&(prframe->list));
|
||||
|
||||
if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
|
||||
preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
|
||||
|
|
|
@ -187,17 +187,14 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
|
|||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
phead = get_list_head(&pstapriv->free_sta_queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info , list);
|
||||
plist = get_next(plist);
|
||||
|
||||
rtw_mfree_stainfo(psta);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
}
|
||||
|
||||
static void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv)
|
||||
|
@ -233,12 +230,12 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
|||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
for (index = 0; index < NUM_STA; index++) {
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
while (phead != plist) {
|
||||
int i;
|
||||
psta = container_of(plist, struct sta_info , hash_list);
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
|
@ -272,12 +269,12 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
spin_lock_bh(&pfree_sta_queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(pfree_sta_queue) == true) {
|
||||
if (list_empty(&pfree_sta_queue->queue)) {
|
||||
spin_unlock_bh(&pfree_sta_queue->lock);
|
||||
psta = NULL;
|
||||
} else {
|
||||
psta = container_of(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
rtw_list_delete(&(psta->list));
|
||||
psta = container_of((&pfree_sta_queue->queue)->next, struct sta_info, list);
|
||||
list_del_init(&(psta->list));
|
||||
spin_unlock_bh(&pfree_sta_queue->lock);
|
||||
_rtw_init_stainfo(psta);
|
||||
memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
|
||||
|
@ -366,23 +363,23 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);
|
||||
|
||||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vi_q.sta_pending);
|
||||
|
||||
rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->bk_q.sta_pending);
|
||||
|
||||
rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->be_q.sta_pending);
|
||||
|
||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->be_q.tx_pending));
|
||||
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
|
||||
rtw_list_delete(&psta->hash_list);
|
||||
list_del_init(&psta->hash_list);
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("\n free number_%d stainfo with hwaddr=0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n", pstapriv->asoc_sta_count , psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2], psta->hwaddr[3], psta->hwaddr[4], psta->hwaddr[5]));
|
||||
pstapriv->asoc_sta_count--;
|
||||
|
||||
|
@ -408,14 +405,14 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
spin_lock_bh(&ppending_recvframe_queue->lock);
|
||||
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (!rtw_is_list_empty(phead)) {
|
||||
while (!list_empty(phead)) {
|
||||
prframe = container_of(plist, struct recv_frame, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
rtw_list_delete(&(prframe->list));
|
||||
list_del_init(&(prframe->list));
|
||||
|
||||
rtw_free_recvframe(prframe, pfree_recv_queue);
|
||||
}
|
||||
|
@ -429,8 +426,8 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
|||
#ifdef CONFIG_88EU_AP_MODE
|
||||
|
||||
spin_lock_bh(&pstapriv->auth_list_lock);
|
||||
if (!rtw_is_list_empty(&psta->auth_list)) {
|
||||
rtw_list_delete(&psta->auth_list);
|
||||
if (!list_empty(&psta->auth_list)) {
|
||||
list_del_init(&psta->auth_list);
|
||||
pstapriv->auth_list_cnt--;
|
||||
}
|
||||
spin_unlock_bh(&pstapriv->auth_list_lock);
|
||||
|
@ -484,12 +481,12 @@ void rtw_free_all_stainfo(struct adapter *padapter)
|
|||
|
||||
for (index = 0; index < NUM_STA; index++) {
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while ((!rtw_end_of_queue_search(phead, plist))) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info , hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (pbcmc_stainfo != psta)
|
||||
rtw_free_stainfo(padapter , psta);
|
||||
|
@ -520,9 +517,9 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while ((!rtw_end_of_queue_search(phead, plist))) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, hash_list);
|
||||
|
||||
if ((!memcmp(psta->hwaddr, addr, ETH_ALEN))) {
|
||||
|
@ -530,7 +527,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
break;
|
||||
}
|
||||
psta = NULL;
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
}
|
||||
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
|
@ -585,10 +582,10 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
|||
|
||||
spin_lock_bh(&pacl_node_q->lock);
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
while ((!rtw_end_of_queue_search(phead, plist))) {
|
||||
plist = phead->next;
|
||||
while (phead != plist) {
|
||||
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
if (!memcmp(paclnode->addr, mac_addr, ETH_ALEN)) {
|
||||
if (paclnode->valid) {
|
||||
|
|
102
core/rtw_xmit.c
102
core/rtw_xmit.c
|
@ -923,10 +923,10 @@ s32 rtw_txframes_pending(struct adapter *padapter)
|
|||
{
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
||||
return ((_rtw_queue_empty(&pxmitpriv->be_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->bk_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vi_pending) == false) ||
|
||||
(_rtw_queue_empty(&pxmitpriv->vo_pending) == false));
|
||||
return (!list_empty(&pxmitpriv->be_pending.queue) ||
|
||||
!list_empty(&pxmitpriv->bk_pending.queue) ||
|
||||
!list_empty(&pxmitpriv->vi_pending.queue) ||
|
||||
!list_empty(&pxmitpriv->vo_pending.queue));
|
||||
}
|
||||
|
||||
s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pattrib)
|
||||
|
@ -1238,16 +1238,16 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
|||
|
||||
spin_lock_irqsave(&pfree_queue->lock, flags);
|
||||
|
||||
if (_rtw_queue_empty(pfree_queue) == true) {
|
||||
if (list_empty(&pfree_queue->queue)) {
|
||||
pxmitbuf = NULL;
|
||||
} else {
|
||||
phead = get_list_head(pfree_queue);
|
||||
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
pxmitbuf = container_of(plist, struct xmit_buf, list);
|
||||
|
||||
rtw_list_delete(&(pxmitbuf->list));
|
||||
list_del_init(&(pxmitbuf->list));
|
||||
}
|
||||
|
||||
if (pxmitbuf != NULL) {
|
||||
|
@ -1277,7 +1277,7 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
|
||||
spin_lock_irqsave(&pfree_queue->lock, flags);
|
||||
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
list_del_init(&pxmitbuf->list);
|
||||
|
||||
list_add_tail(&(pxmitbuf->list), get_list_head(pfree_queue));
|
||||
pxmitpriv->free_xmit_extbuf_cnt++;
|
||||
|
@ -1298,16 +1298,16 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
|||
|
||||
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, flags);
|
||||
|
||||
if (_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
|
||||
if (list_empty(&pfree_xmitbuf_queue->queue)) {
|
||||
pxmitbuf = NULL;
|
||||
} else {
|
||||
phead = get_list_head(pfree_xmitbuf_queue);
|
||||
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
pxmitbuf = container_of(plist, struct xmit_buf, list);
|
||||
|
||||
rtw_list_delete(&(pxmitbuf->list));
|
||||
list_del_init(&(pxmitbuf->list));
|
||||
}
|
||||
|
||||
if (pxmitbuf != NULL) {
|
||||
|
@ -1341,7 +1341,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
} else {
|
||||
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, flags);
|
||||
|
||||
rtw_list_delete(&pxmitbuf->list);
|
||||
list_del_init(&pxmitbuf->list);
|
||||
|
||||
list_add_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
|
||||
|
||||
|
@ -1378,17 +1378,17 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
|
|||
|
||||
spin_lock_bh(&pfree_xmit_queue->lock);
|
||||
|
||||
if (_rtw_queue_empty(pfree_xmit_queue) == true) {
|
||||
if (list_empty(&pfree_xmit_queue->queue)) {
|
||||
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe:%d\n", pxmitpriv->free_xmitframe_cnt));
|
||||
pxframe = NULL;
|
||||
} else {
|
||||
phead = get_list_head(pfree_xmit_queue);
|
||||
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
pxframe = container_of(plist, struct xmit_frame, list);
|
||||
|
||||
rtw_list_delete(&(pxframe->list));
|
||||
list_del_init(&(pxframe->list));
|
||||
}
|
||||
|
||||
if (pxframe != NULL) { /* default value setting */
|
||||
|
@ -1429,7 +1429,7 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
|
|||
|
||||
spin_lock_bh(&pfree_xmit_queue->lock);
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
if (pxmitframe->pkt) {
|
||||
pndis_pkt = pxmitframe->pkt;
|
||||
|
@ -1459,12 +1459,12 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram
|
|||
spin_lock_bh(&pframequeue->lock);
|
||||
|
||||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(phead, plist)) {
|
||||
while (phead != plist) {
|
||||
pxmitframe = container_of(plist, struct xmit_frame, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
}
|
||||
|
@ -1490,14 +1490,14 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
|
|||
struct xmit_frame *pxmitframe = NULL;
|
||||
|
||||
xmitframe_phead = get_list_head(pframe_queue);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
xmitframe_plist = xmitframe_phead->next;
|
||||
|
||||
if (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
|
||||
if (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
xmitframe_plist = xmitframe_plist->next;
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
ptxservq->qcnt--;
|
||||
}
|
||||
|
@ -1530,9 +1530,9 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
phwxmit = phwxmit_i + inx[i];
|
||||
|
||||
sta_phead = get_list_head(phwxmit->sta_queue);
|
||||
sta_plist = get_next(sta_phead);
|
||||
sta_plist = sta_phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(sta_phead, sta_plist)) {
|
||||
while (sta_phead != sta_plist) {
|
||||
ptxservq = container_of(sta_plist, struct tx_servq, tx_pending);
|
||||
|
||||
pframe_queue = &ptxservq->sta_pending;
|
||||
|
@ -1543,12 +1543,12 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
|
|||
phwxmit->accnt--;
|
||||
|
||||
/* Remove sta node when there are no pending packets. */
|
||||
if (_rtw_queue_empty(pframe_queue)) /* must be done after get_next and before break */
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
if (list_empty(&pframe_queue->queue)) /* must be done after get_next and before break */
|
||||
list_del_init(&ptxservq->tx_pending);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
sta_plist = get_next(sta_plist);
|
||||
sta_plist = sta_plist->next;
|
||||
}
|
||||
}
|
||||
exit:
|
||||
|
@ -1621,7 +1621,7 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
|
||||
ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index));
|
||||
|
||||
if (rtw_is_list_empty(&ptxservq->tx_pending))
|
||||
if (list_empty(&ptxservq->tx_pending))
|
||||
list_add_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue));
|
||||
|
||||
list_add_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending));
|
||||
|
@ -1947,7 +1947,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
|
|||
spin_lock_bh(&psta->sleep_q.lock);
|
||||
|
||||
if (pstapriv->sta_dz_bitmap) {/* if any one sta is in ps mode */
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
list_add_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
|
||||
|
||||
|
@ -1972,7 +1972,7 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
|
|||
u8 wmmps_ac = 0;
|
||||
|
||||
if (pstapriv->sta_dz_bitmap&BIT(psta->aid)) {
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
list_add_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
|
||||
|
||||
|
@ -2029,12 +2029,12 @@ static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struc
|
|||
struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits;
|
||||
|
||||
phead = get_list_head(pframequeue);
|
||||
plist = get_next(phead);
|
||||
plist = phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(phead, plist)) {
|
||||
while (phead != plist) {
|
||||
pxmitframe = container_of(plist, struct xmit_frame, list);
|
||||
|
||||
plist = get_next(plist);
|
||||
plist = plist->next;
|
||||
|
||||
xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe);
|
||||
|
||||
|
@ -2066,21 +2066,21 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
pstapriv->sta_dz_bitmap |= BIT(psta->aid);
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vi_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->be_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->be_q.tx_pending));
|
||||
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->bk_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
|
||||
/* for BC/MC Frames */
|
||||
pstaxmitpriv = &psta_bmc->sta_xmitpriv;
|
||||
dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending);
|
||||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
list_del_init(&(pstaxmitpriv->be_q.tx_pending));
|
||||
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
}
|
||||
|
@ -2096,14 +2096,14 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
spin_lock_bh(&psta->sleep_q.lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
xmitframe_plist = xmitframe_phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
xmitframe_plist = xmitframe_plist->next;
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
switch (pxmitframe->attrib.priority) {
|
||||
case 1:
|
||||
|
@ -2177,14 +2177,14 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
|||
spin_lock_bh(&psta_bmc->sleep_q.lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
xmitframe_plist = xmitframe_phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
xmitframe_plist = xmitframe_plist->next;
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta_bmc->sleepq_len--;
|
||||
if (psta_bmc->sleepq_len > 0)
|
||||
|
@ -2224,12 +2224,12 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
spin_lock_bh(&psta->sleep_q.lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
xmitframe_plist = xmitframe_phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
xmitframe_plist = xmitframe_plist->next;
|
||||
|
||||
switch (pxmitframe->attrib.priority) {
|
||||
case 1:
|
||||
|
@ -2254,7 +2254,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
|
|||
if (!wmmps_ac)
|
||||
continue;
|
||||
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
|
||||
psta->sleepq_len--;
|
||||
psta->sleepq_ac_len--;
|
||||
|
|
|
@ -536,11 +536,11 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
|
|||
spin_lock_bh(&pxmitpriv->lock);
|
||||
|
||||
xmitframe_phead = get_list_head(&ptxservq->sta_pending);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
xmitframe_plist = xmitframe_phead->next;
|
||||
|
||||
while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
|
||||
while (xmitframe_phead != xmitframe_plist) {
|
||||
pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
xmitframe_plist = xmitframe_plist->next;
|
||||
|
||||
pxmitframe->agg_num = 0; /* not first frame of aggregation */
|
||||
pxmitframe->pkt_offset = 0; /* not first frame of aggregation, no need to reserve offset */
|
||||
|
@ -552,7 +552,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
|
|||
pxmitframe->pkt_offset = 1;
|
||||
break;
|
||||
}
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
list_del_init(&pxmitframe->list);
|
||||
ptxservq->qcnt--;
|
||||
phwxmit->accnt--;
|
||||
|
||||
|
@ -586,8 +586,8 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
|
|||
}
|
||||
} /* end while (aggregate same priority and same DA(AP or STA) frames) */
|
||||
|
||||
if (_rtw_queue_empty(&ptxservq->sta_pending) == true)
|
||||
rtw_list_delete(&ptxservq->tx_pending);
|
||||
if (list_empty(&ptxservq->sta_pending.queue))
|
||||
list_del_init(&ptxservq->tx_pending);
|
||||
|
||||
spin_unlock_bh(&pxmitpriv->lock);
|
||||
if ((pfirstframe->attrib.ether_type != 0x0806) &&
|
||||
|
|
|
@ -250,9 +250,6 @@ void _rtw_mfree(u8 *pbuf, u32 sz);
|
|||
void *rtw_malloc2d(int h, int w, int size);
|
||||
void rtw_mfree2d(void *pbuf, int h, int w, int size);
|
||||
|
||||
u32 rtw_is_list_empty(struct list_head *phead);
|
||||
void rtw_list_delete(struct list_head *plist);
|
||||
|
||||
void _rtw_init_sema(struct semaphore *sema, int init_val);
|
||||
void _rtw_free_sema(struct semaphore *sema);
|
||||
u32 _rtw_down_sema(struct semaphore *sema);
|
||||
|
@ -261,8 +258,6 @@ void _rtw_mutex_free(struct mutex *pmutex);
|
|||
void _rtw_spinlock_free(spinlock_t *plock);
|
||||
|
||||
void _rtw_init_queue(struct __queue *pqueue);
|
||||
u32 _rtw_queue_empty(struct __queue *pqueue);
|
||||
u32 rtw_end_of_queue_search(struct list_head *queue, struct list_head *pelement);
|
||||
|
||||
u32 rtw_get_current_time(void);
|
||||
u32 rtw_systime_to_ms(u32 systime);
|
||||
|
|
|
@ -2590,10 +2590,7 @@ static int rtw_get_ap_info(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
|
||||
if (hwaddr_aton_i(data, bssid)) {
|
||||
|
@ -3093,10 +3090,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
|
||||
u8 *wpsie;
|
||||
|
@ -3165,10 +3159,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
|
||||
/* Commented by Albert 2011/05/18 */
|
||||
|
@ -3249,10 +3240,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
|
||||
u8 *wpsie;
|
||||
|
@ -3328,10 +3316,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
|
||||
u8 *wpsie;
|
||||
|
@ -3399,10 +3384,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
|
||||
/* Commented by Albert 20121226 */
|
||||
|
@ -3481,10 +3463,7 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
|
@ -3576,10 +3555,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
pnetwork = container_of(plist, struct wlan_network, list);
|
||||
|
||||
/* Commented by Albert 2011/05/18 */
|
||||
|
@ -3726,10 +3702,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
phead = get_list_head(queue);
|
||||
plist = phead->next;
|
||||
|
||||
while (1) {
|
||||
if (rtw_end_of_queue_search(phead, plist) == true)
|
||||
break;
|
||||
|
||||
while (phead != plist) {
|
||||
if (uintPeerChannel != 0)
|
||||
break;
|
||||
|
||||
|
@ -4421,7 +4394,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = phead->next;
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false) {
|
||||
while (phead != plist) {
|
||||
psta = container_of(plist, struct sta_info, hash_list);
|
||||
|
||||
plist = plist->next;
|
||||
|
@ -5238,8 +5211,8 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
|
|||
psta = rtw_get_stainfo(pstapriv, param->sta_addr);
|
||||
if (psta) {
|
||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||
if (!rtw_is_list_empty(&psta->asoc_list)) {
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
if (!list_empty(&psta->asoc_list)) {
|
||||
list_del_init(&psta->asoc_list);
|
||||
pstapriv->asoc_list_cnt--;
|
||||
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||
}
|
||||
|
|
|
@ -118,14 +118,6 @@ For the following list_xxx operations,
|
|||
caller must guarantee the atomic context.
|
||||
Otherwise, there will be racing condition.
|
||||
*/
|
||||
u32 rtw_is_list_empty(struct list_head *phead)
|
||||
{
|
||||
if (list_empty(phead))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
Caller must check if the list is empty before calling rtw_list_delete
|
||||
*/
|
||||
|
@ -167,19 +159,6 @@ void _rtw_init_queue(struct __queue *pqueue)
|
|||
spin_lock_init(&(pqueue->lock));
|
||||
}
|
||||
|
||||
u32 _rtw_queue_empty(struct __queue *pqueue)
|
||||
{
|
||||
return rtw_is_list_empty(&(pqueue->queue));
|
||||
}
|
||||
|
||||
u32 rtw_end_of_queue_search(struct list_head *head, struct list_head *plist)
|
||||
{
|
||||
if (head == plist)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 rtw_get_current_time(void)
|
||||
{
|
||||
return jiffies;
|
||||
|
|
Loading…
Reference in a new issue