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 = plist->next;
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 = plist->next;
phead = get_list_head(pacl_node_q);
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 = plist->next;
phead = get_list_head(pacl_node_q);
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 = plist->next;
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 = plist->next;
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 = plist->next;
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 = plist->next;
spin_lock_bh(&(pacl_node_q->lock));
phead = get_list_head(pacl_node_q);
plist = phead->next;
- while ((rtw_end_of_queue_search(phead, plist)) == false) {
+ while (phead != plist) {
paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
plist = plist->next;
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;
phead = get_list_head(scanned_queue);
plist = phead->next;
- while (rtw_end_of_queue_search(phead, plist) == false) {
+ while (phead != plist) {
pnetwork = container_of(plist, struct wlan_network, list);
plist = plist->next;
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);
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 (is_same_network(&(pnetwork->network), target))
}
/* If we didn't find a match, then get a new network slot to initialize
* with this beacon's information */
- if (rtw_end_of_queue_search(phead, plist) == true) {
+ if (phead == plist) {
if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == true) {
/* If there are no more slots, expire the oldest */
pnetwork = oldest;
phead = get_list_head(queue);
adapter = (struct adapter *)pmlmepriv->nic_hdl;
pmlmepriv->pscanned = phead->next;
- while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) {
+ 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__));
phead = get_list_head(queue);
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 = plist->next;
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
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 = xmitframe_plist->next;
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 = plist->next;
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 = plist->next;
phead = get_list_head(pframequeue);
plist = phead->next;
- while (rtw_end_of_queue_search(phead, plist) == false) {
+ while (phead != plist) {
hdr = container_of(plist, struct recv_frame, list);
plist = plist->next;
xmitframe_phead = get_list_head(&psta->sleep_q);
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 = xmitframe_plist->next;
plist = plist->next;
- while (rtw_end_of_queue_search(phead, plist) == false) {
+ while (phead != plist) {
pnfhdr = container_of(plist, struct recv_frame, list);
pnextrframe = (struct recv_frame *)pnfhdr;
phead = get_list_head(ppending_recvframe_queue);
plist = phead->next;
- while (rtw_end_of_queue_search(phead, plist) == false) {
+ while (phead != plist) {
hdr = container_of(plist, struct recv_frame, list);
pnextattrib = &hdr->attrib;
phead = get_list_head(&pstapriv->free_sta_queue);
plist = phead->next;
- while ((rtw_end_of_queue_search(phead, plist)) == false) {
+ while (phead != plist) {
psta = container_of(plist, struct sta_info , list);
plist = plist->next;
}
phead = &(pstapriv->sta_hash[index]);
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 = plist->next;
phead = &(pstapriv->sta_hash[index]);
plist = phead->next;
- while ((!rtw_end_of_queue_search(phead, plist))) {
+ while (phead != plist) {
psta = container_of(plist, struct sta_info , hash_list);
plist = plist->next;
phead = &(pstapriv->sta_hash[index]);
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)) == true) {
spin_lock_bh(&(pacl_node_q->lock));
phead = get_list_head(pacl_node_q);
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 = plist->next;
phead = get_list_head(pframequeue);
plist = phead->next;
- while (!rtw_end_of_queue_search(phead, plist)) {
+ while (phead != plist) {
pxmitframe = container_of(plist, struct xmit_frame, list);
plist = plist->next;
xmitframe_phead = get_list_head(pframe_queue);
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 = xmitframe_plist->next;
sta_phead = get_list_head(phwxmit->sta_queue);
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;
phead = get_list_head(pframequeue);
plist = phead->next;
- while (!rtw_end_of_queue_search(phead, plist)) {
+ while (phead != plist) {
pxmitframe = container_of(plist, struct xmit_frame, list);
plist = plist->next;
xmitframe_phead = get_list_head(&psta->sleep_q);
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 = xmitframe_plist->next;
xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
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 = xmitframe_plist->next;
xmitframe_phead = get_list_head(&psta->sleep_q);
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 = xmitframe_plist->next;
xmitframe_phead = get_list_head(&ptxservq->sta_pending);
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 = xmitframe_plist->next;
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_systime_to_ms(u32 systime);
u32 rtw_ms_to_systime(u32 ms);
phead = get_list_head(queue);
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 = pmlmepriv->pscanned->next;
phead = get_list_head(queue);
plist = phead->next;
- while (1) {
- if (rtw_end_of_queue_search(phead, plist))
- break;
-
+ while (phead != plist) {
if ((stop - ev) < SCAN_ITEM_SIZE) {
ret = -E2BIG;
break;
phead = get_list_head(queue);
pmlmepriv->pscanned = phead->next;
- 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;
- }
-
+ while (phead != pmlmepriv->pscanned) {
pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
pmlmepriv->pscanned = pmlmepriv->pscanned->next;
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)) {
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;
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 */
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;
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;
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 */
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;
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 */
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;
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;
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;
-}
-
inline u32 rtw_systime_to_ms(u32 systime)
{
return systime * 1000 / HZ;
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 = plist->next;