rtl8188eu: Convert typedef for _list to struct list_head

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-25 09:49:25 -05:00
parent 6717ae7e4f
commit 3d755766c9
23 changed files with 103 additions and 154 deletions

View file

@ -281,7 +281,7 @@ static u8 chk_sta_is_alive(struct sta_info *psta)
void expire_timeout_chk(_adapter *padapter)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
u8 updated;
struct sta_info *psta=NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
@ -1206,7 +1206,7 @@ void rtw_set_macaddr_acl(_adapter *padapter, int mode)
int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
u8 added = false;
int i, ret=0;
struct rtw_wlan_acl_node *paclnode;
@ -1280,7 +1280,7 @@ int rtw_acl_add_sta(_adapter *padapter, u8 *addr)
int rtw_acl_remove_sta(_adapter *padapter, u8 *addr)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
int i, ret=0;
struct rtw_wlan_acl_node *paclnode;
struct sta_priv *pstapriv = &padapter->stapriv;
@ -1644,7 +1644,7 @@ void associated_clients_update(_adapter *padapter, u8 updated)
if (updated == true)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
struct sta_info *psta=NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
@ -1965,7 +1965,7 @@ u8 ap_free_sta(_adapter *padapter, struct sta_info *psta, bool active, u16 reaso
int rtw_ap_inform_ch_switch (_adapter *padapter, u8 new_ch, u8 ch_offset)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
int ret=0;
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
@ -2002,7 +2002,7 @@ int rtw_ap_inform_ch_switch (_adapter *padapter, u8 new_ch, u8 ch_offset)
int rtw_sta_flush(_adapter *padapter)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
int ret=0;
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
@ -2150,7 +2150,7 @@ void start_ap_mode(_adapter *padapter)
void stop_ap_mode(_adapter *padapter)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
struct rtw_wlan_acl_node *paclnode;
struct sta_info *psta=NULL;
struct sta_priv *pstapriv = &padapter->stapriv;

View file

@ -911,7 +911,7 @@ int proc_get_all_sta_info(char *page, char **start,
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
struct sta_priv *pstapriv = &padapter->stapriv;
int i, j;
_list *plist, *phead;
struct list_head *plist, *phead;
struct recv_reorder_ctrl *preorder_ctrl;
int len = 0;

View file

@ -71,7 +71,7 @@ u8 rtw_do_join(_adapter * padapter);
u8 rtw_do_join(_adapter * padapter)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
u8* pibss = NULL;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct __queue *queue = &(pmlmepriv->scanned_queue);

View file

@ -203,7 +203,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue *
unsigned long irqL;
struct wlan_network *pnetwork;
struct __queue *free_queue = &pmlmepriv->free_bss_pool;
_list* plist = NULL;
struct list_head *plist = NULL;
_func_enter_;
@ -317,7 +317,7 @@ _func_exit_;
struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
{
_list *phead, *plist;
struct list_head *phead, *plist;
struct wlan_network *pnetwork = NULL;
u8 zero_addr[ETH_ALEN] = {0,0,0,0,0,0};
@ -356,7 +356,7 @@ _func_exit_;
void _rtw_free_network_queue(_adapter *padapter, u8 isfreeall)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
struct wlan_network *pnetwork;
struct mlme_priv* pmlmepriv = &padapter->mlmepriv;
struct __queue *scanned_queue = &pmlmepriv->scanned_queue;
@ -592,11 +592,10 @@ _func_exit_;
struct wlan_network * rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
{
_list *plist, *phead;
struct list_head *plist, *phead;
struct wlan_network *pwlan = NULL;
struct wlan_network *oldest = NULL;
_func_enter_;
phead = get_list_head(scanned_queue);
@ -718,7 +717,7 @@ Caller must hold pmlmepriv->lock first.
void rtw_update_scanned_network(_adapter *adapter, struct wlan_bssid_ex *target)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
ULONG bssid_ex_sz;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct __queue *queue = &(pmlmepriv->scanned_queue);
@ -1105,7 +1104,7 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
unsigned long irqL, irqL0;
struct __queue *free_queue = &pmlmepriv->free_bss_pool;
struct __queue *scan_queue = &pmlmepriv->scanned_queue;
_list *plist, *phead, *ptemp;
struct list_head *plist, *phead, *ptemp;
_func_enter_;
@ -2105,7 +2104,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
{
unsigned long irqL;
int ret;
_list *phead;
struct list_head *phead;
_adapter *adapter;
struct __queue *queue = &(pmlmepriv->scanned_queue);
struct wlan_network *pnetwork = NULL;

View file

@ -6761,7 +6761,7 @@ exit:
void issue_action_spct_ch_switch (_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
unsigned char *pframe;
@ -6985,7 +6985,7 @@ void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char act
static void issue_action_BSSCoexistPacket(_adapter *padapter)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
unsigned char category, action;
struct xmit_frame *pmgntframe;
struct pkt_attrib *pattrib;
@ -9578,7 +9578,7 @@ u8 tx_beacon_hdl(_adapter *padapter, unsigned char *pbuf)
{
unsigned long irqL;
struct sta_info *psta_bmc;
_list *xmitframe_plist, *xmitframe_phead;
struct list_head *xmitframe_plist, *xmitframe_phead;
struct xmit_frame *pxmitframe=NULL;
struct sta_priv *pstapriv = &padapter->stapriv;

View file

@ -43,7 +43,7 @@ static int rtw_p2p_is_channel_list_ok( u8 desired_ch, u8* ch_list, u8 ch_cnt )
static int is_any_client_associated( _adapter *padapter)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
int intFound = false;
struct sta_priv *pstapriv = &padapter->stapriv;
@ -76,7 +76,7 @@ static int is_any_client_associated( _adapter *padapter)
static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
u32 len=0;
u16 attr_len = 0;
u8 tmplen, *pdata_attr, *pstart, *pcur;
@ -1074,7 +1074,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_ID, dev_addr, &attr_contentlen))
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
phead = &pstapriv->asoc_list;
@ -1091,13 +1091,9 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
_rtw_memcmp(psta->dev_addr, dev_addr, ETH_ALEN))
{
/* _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); */
/* issue GO Discoverability Request */
issue_group_disc_req(pwdinfo, psta->hwaddr);
/* _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); */
status = P2P_STATUS_SUCCESS;
break;
}
else
@ -1192,9 +1188,7 @@ static u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_conte
ch_cnt -= 1;
temp = *ch_content;
for ( i = 0 ; i < temp ; i++, j++ )
{
peer_ch_list[j] = *( ch_content + 1 + i );
}
ch_content += (temp + 1);
ch_cnt -= (temp + 1);
ch_no += temp ;

View file

@ -148,7 +148,7 @@ union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
{
union recv_frame *precvframe;
_list *plist, *phead;
struct list_head *plist, *phead;
_adapter *padapter;
struct recv_priv *precvpriv;
_func_enter_;
@ -247,10 +247,7 @@ sint _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
_func_enter_;
/* _rtw_init_listhead(&(precvframe->u.hdr.list)); */
rtw_list_delete(&(precvframe->u.hdr.list));
rtw_list_insert_tail(&(precvframe->u.hdr.list), get_list_head(queue));
if (padapter != NULL) {
@ -286,7 +283,7 @@ using spinlock to protect
void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue)
{
union recv_frame *precvframe;
_list *plist, *phead;
struct list_head *plist, *phead;
_func_enter_;
spin_lock(&pframequeue->lock);
@ -353,7 +350,7 @@ struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue)
{
unsigned long irqL;
struct recv_buf *precvbuf;
_list *plist, *phead;
struct list_head *plist, *phead;
_enter_critical_ex(&queue->lock, &irqL);
@ -1256,7 +1253,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
if ((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid)))
{
unsigned long irqL;
_list *xmitframe_plist, *xmitframe_phead;
struct list_head *xmitframe_plist, *xmitframe_phead;
struct xmit_frame *pxmitframe=NULL;
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
@ -1838,7 +1835,7 @@ _func_exit_;
/* perform defrag */
union recv_frame *recvframe_defrag(_adapter *adapter, struct __queue *defrag_q)
{
_list *plist, *phead;
struct list_head *plist, *phead;
u8 wlanhdr_offset;
u8 curfragnum;
struct recv_frame_hdr *pfhdr,*pnfhdr;
@ -1931,7 +1928,7 @@ union recv_frame* recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec
struct recv_frame_hdr *pfhdr;
struct sta_info *psta;
struct sta_priv *pstapriv;
_list *phead;
struct list_head *phead;
union recv_frame *prtnframe = NULL;
struct __queue *pfree_recv_queue, *pdefrag_q;
@ -2213,7 +2210,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
{
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
_list *phead, *plist;
struct list_head *phead, *plist;
union recv_frame *pnextrframe;
struct rx_pkt_attrib *pnextattrib;
@ -2240,7 +2237,7 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
static int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced)
{
_list *phead, *plist;
struct list_head *phead, *plist;
union recv_frame *prframe;
struct rx_pkt_attrib *pattrib;
int bPktInBuf = false;

View file

@ -202,7 +202,7 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv );
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv )
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
struct sta_info *psta = NULL;
_func_enter_;
@ -252,7 +252,7 @@ void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv)
u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
struct sta_info *psta = NULL;
struct recv_reorder_ctrl *preorder_ctrl;
int index;
@ -296,7 +296,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
{
unsigned long irqL, irqL2;
s32 index;
_list *phash_list;
struct list_head *phash_list;
struct sta_info *psta;
struct __queue *pfree_sta_queue;
struct recv_reorder_ctrl *preorder_ctrl;
@ -446,7 +446,7 @@ _func_enter_;
for (i=0; i < 16 ; i++)
{
unsigned long irqL;
_list *phead, *plist;
struct list_head *phead, *plist;
union recv_frame *prframe;
struct __queue *ppending_recvframe_queue;
struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
@ -533,7 +533,7 @@ _func_exit_;
void rtw_free_all_stainfo(_adapter *padapter)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
s32 index;
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
@ -574,17 +574,11 @@ _func_exit_;
/* any station allocated can be searched by hash list */
struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
struct sta_info *psta = NULL;
u32 index;
u8 *addr;
u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
_func_enter_;
@ -593,13 +587,9 @@ _func_enter_;
return NULL;
if (IS_MCAST(hwaddr))
{
addr = bc_addr;
}
else
{
addr = hwaddr;
}
index = wifi_mac_hash(addr);
@ -670,7 +660,7 @@ u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
u8 res = true;
#ifdef CONFIG_AP_MODE
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
struct rtw_wlan_acl_node *paclnode;
u8 match = false;
struct sta_priv *pstapriv = &padapter->stapriv;

View file

@ -1438,7 +1438,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
{
unsigned long irqL;
struct xmit_buf *pxmitbuf = NULL;
_list *plist, *phead;
struct list_head *plist, *phead;
struct __queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
_func_enter_;
@ -1509,7 +1509,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
{
unsigned long irqL;
struct xmit_buf *pxmitbuf = NULL;
_list *plist, *phead;
struct list_head *plist, *phead;
struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
_func_enter_;
@ -1610,7 +1610,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
unsigned long irqL;
struct xmit_frame *pxframe = NULL;
_list *plist, *phead;
struct list_head *plist, *phead;
struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;
_adapter *padapter = pxmitpriv->adapter;
@ -1703,7 +1703,7 @@ _func_exit_;
void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframequeue)
{
unsigned long irqL;
_list *plist, *phead;
struct list_head *plist, *phead;
struct xmit_frame *pxmitframe;
_func_enter_;
@ -1743,7 +1743,7 @@ s32 rtw_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe)
static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit, struct tx_servq *ptxservq, struct __queue *pframe_queue)
{
_list *xmitframe_plist, *xmitframe_phead;
struct list_head *xmitframe_plist, *xmitframe_phead;
struct xmit_frame *pxmitframe=NULL;
xmitframe_phead = get_list_head(pframe_queue);
@ -1771,7 +1771,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry)
{
unsigned long irqL0;
_list *sta_plist, *sta_phead;
struct list_head *sta_plist, *sta_phead;
struct hw_xmit *phwxmit;
struct tx_servq *ptxservq = NULL;
struct __queue *pframe_queue = NULL;
@ -1954,22 +1954,12 @@ _func_enter_;
ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index));
/* _enter_critical(&pstapending->lock, &irqL0); */
if (rtw_is_list_empty(&ptxservq->tx_pending)) {
if (rtw_is_list_empty(&ptxservq->tx_pending))
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue));
}
/* _enter_critical(&ptxservq->sta_pending.lock, &irqL1); */
rtw_list_insert_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending));
ptxservq->qcnt++;
phwxmits[ac_index].accnt++;
/* _exit_critical(&ptxservq->sta_pending.lock, &irqL1); */
/* _exit_critical(&pstapending->lock, &irqL0); */
exit:
_func_exit_;
@ -2054,12 +2044,7 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry)
sint i;
_func_enter_;
for (i = 0; i < entry; i++, phwxmit++)
{
/* _rtw_spinlock_init(&phwxmit->xmit_lock); */
/* _rtw_init_listhead(&phwxmit->pending); */
/* phwxmit->txcmdcnt = 0; */
phwxmit->accnt = 0;
}
_func_exit_;
}
@ -2068,13 +2053,11 @@ static int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb)
struct sk_buff *skb = *pskb;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
unsigned long irqL;
/* if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) */
{
int res, is_vlan_tag=0, i, do_nat25=1;
unsigned short vlan_hdr=0;
void *br_port = NULL;
/* mac_clone_handle_frame(priv, skb); */
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
br_port = padapter->pnetdev->br_port;
@ -2403,8 +2386,6 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
{
rtw_list_delete(&pxmitframe->list);
/* _enter_critical_bh(&psta->sleep_q.lock, &irqL); */
rtw_list_insert_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
psta->sleepq_len++;
@ -2468,7 +2449,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p
static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_info *psta, struct __queue *pframequeue)
{
_list *plist, *phead;
struct list_head *plist, *phead;
u8 ac_index;
struct tx_servq *ptxservq;
struct pkt_attrib *pattrib;
@ -2544,7 +2525,7 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta)
unsigned long irqL;
u8 update_mask=0, wmmps_ac=0;
struct sta_info *psta_bmc;
_list *xmitframe_plist, *xmitframe_phead;
struct list_head *xmitframe_plist, *xmitframe_phead;
struct xmit_frame *pxmitframe=NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
@ -2702,7 +2683,7 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta)
{
unsigned long irqL;
u8 wmmps_ac=0;
_list *xmitframe_plist, *xmitframe_phead;
struct list_head *xmitframe_plist, *xmitframe_phead;
struct xmit_frame *pxmitframe=NULL;
struct sta_priv *pstapriv = &padapter->stapriv;