Skip to content

Commit

Permalink
staging: rtl8188eu: Remove function rtw_end_of_queue_search()
Browse files Browse the repository at this point in the history
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
navin patidar authored and Greg Kroah-Hartman committed Jun 27, 2014
1 parent ae6787a commit 8466070
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 104 deletions.
16 changes: 8 additions & 8 deletions drivers/staging/rtl8188eu/core/rtw_ap.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void expire_timeout_chk(struct adapter *padapter)
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;

Expand Down Expand Up @@ -322,7 +322,7 @@ void expire_timeout_chk(struct adapter *padapter)
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;

Expand Down Expand Up @@ -1146,7 +1146,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
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;

Expand Down Expand Up @@ -1207,7 +1207,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
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;

Expand Down Expand Up @@ -1505,7 +1505,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
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;
Expand Down Expand Up @@ -1779,7 +1779,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
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;

Expand Down Expand Up @@ -1813,7 +1813,7 @@ int rtw_sta_flush(struct adapter *padapter)
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;
Expand Down Expand Up @@ -1942,7 +1942,7 @@ void stop_ap_mode(struct adapter *padapter)
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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8188eu/core/rtw_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ int proc_get_all_sta_info(char *page, char **start,
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;
Expand Down
13 changes: 5 additions & 8 deletions drivers/staging/rtl8188eu/core/rtw_mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
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;
Expand Down Expand Up @@ -438,7 +438,7 @@ struct wlan_network *rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
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);
Expand Down Expand Up @@ -522,10 +522,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
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))
Expand All @@ -537,7 +534,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
}
/* 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;
Expand Down Expand Up @@ -1615,7 +1612,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
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__));
Expand Down
7 changes: 2 additions & 5 deletions drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -6237,14 +6237,11 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
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;
Expand Down Expand Up @@ -8377,7 +8374,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/rtl8188eu/core/rtw_p2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
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;
Expand Down Expand Up @@ -983,7 +983,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
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;
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/rtl8188eu/core/rtw_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfre
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;
Expand Down Expand Up @@ -1039,7 +1039,7 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
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;
Expand Down Expand Up @@ -1471,7 +1471,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,

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;

Expand Down Expand Up @@ -1777,7 +1777,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
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;

Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
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;
}
Expand Down Expand Up @@ -185,7 +185,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
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;
Expand Down Expand Up @@ -441,7 +441,7 @@ void rtw_free_all_stainfo(struct adapter *padapter)
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;
Expand Down Expand Up @@ -478,7 +478,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
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) {
Expand Down Expand Up @@ -539,7 +539,7 @@ 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 = 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;

Expand Down
14 changes: 7 additions & 7 deletions drivers/staging/rtl8188eu/core/rtw_xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram
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;
Expand Down Expand Up @@ -1487,7 +1487,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
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;
Expand Down Expand Up @@ -1528,7 +1528,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
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;
Expand Down Expand Up @@ -1884,7 +1884,7 @@ static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struc
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;
Expand Down Expand Up @@ -1951,7 +1951,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
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;
Expand Down Expand Up @@ -2032,7 +2032,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
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;
Expand Down Expand Up @@ -2079,7 +2079,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
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;

Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/rtl8188eu/include/osdep_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ u32 _rtw_down_sema(struct semaphore *sema);

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);
Expand Down
Loading

0 comments on commit 8466070

Please sign in to comment.