From 9ad78a5b0dccf455290dcd7d3935119932f77527 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 12 Dec 2014 23:13:40 -0600 Subject: [PATCH] rtl8188eu: Remove wrapper around INIT_LIST_HEAD() Signed-off-by: Larry Finger --- core/rtw_ap.c | 6 +++--- core/rtw_cmd.c | 12 ++++++------ core/rtw_mlme.c | 6 +++--- core/rtw_mlme_ext.c | 10 +++++----- core/rtw_mp.c | 2 +- core/rtw_recv.c | 4 ++-- core/rtw_sta_mgt.c | 14 +++++++------- core/rtw_xmit.c | 12 ++++++------ hal/rtl8188eu_recv.c | 2 +- hal/usb_ops_linux.c | 2 +- include/osdep_service.h | 1 - include/rtw_cmd.h | 2 +- os_dep/ioctl_linux.c | 2 +- os_dep/osdep_service.c | 7 +------ 14 files changed, 38 insertions(+), 44 deletions(-) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index b030619..3baaf16 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -1170,7 +1170,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) paclnode = &pacl_list->aclnode[i]; if (!paclnode->valid) { - _rtw_init_listhead(&paclnode->list); + INIT_LIST_HEAD(&paclnode->list); memcpy(paclnode->addr, addr, ETH_ALEN); @@ -1910,11 +1910,11 @@ void start_ap_mode(struct adapter *padapter) pmlmepriv->p2p_probe_resp_ie = NULL; /* for ACL */ - _rtw_init_listhead(&(pacl_list->acl_node_q.queue)); + INIT_LIST_HEAD(&(pacl_list->acl_node_q.queue)); pacl_list->num = 0; pacl_list->mode = 0; for (i = 0; i < NUM_ACL; i++) { - _rtw_init_listhead(&pacl_list->aclnode[i].list); + INIT_LIST_HEAD(&pacl_list->aclnode[i].list); pacl_list->aclnode[i].valid = false; } } diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 106b90a..25be3be 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -657,7 +657,7 @@ u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) return _FAIL; } - _rtw_init_listhead(&ph2c->list); + INIT_LIST_HEAD(&ph2c->list); ph2c->cmdcode = GEN_CMD_CODE(_GetBBReg); ph2c->parmbuf = (unsigned char *)prdbbparm; ph2c->cmdsz = sizeof(struct readBB_parm); @@ -723,7 +723,7 @@ u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) goto exit; } - _rtw_init_listhead(&ph2c->list); + INIT_LIST_HEAD(&ph2c->list); ph2c->cmdcode = GEN_CMD_CODE(_GetRFReg); ph2c->parmbuf = (unsigned char *)prdrfparm; ph2c->cmdsz = sizeof(struct readRF_parm); @@ -784,7 +784,7 @@ u8 rtw_createbss_cmd(struct adapter *padapter) goto exit; } - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); pcmd->cmdcode = _CreateBss_CMD_; pcmd->parmbuf = (unsigned char *)pdev_network; pcmd->cmdsz = get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pdev_network); @@ -809,7 +809,7 @@ u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, unsigned goto exit; } - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); pcmd->cmdcode = GEN_CMD_CODE(_CreateBss); pcmd->parmbuf = pbss; pcmd->cmdsz = sz; @@ -947,7 +947,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork) pcmd->cmdsz = get_wlan_bssid_ex_sz(psecnetwork);/* get cmdsz before endian conversion */ - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */ pcmd->parmbuf = (unsigned char *)psecnetwork; pcmd->rsp = NULL; @@ -1191,7 +1191,7 @@ u8 rtw_getrttbl_cmd(struct adapter *padapter, struct getratable_rsp *pval) /* init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable)); */ - _rtw_init_listhead(&ph2c->list); + INIT_LIST_HEAD(&ph2c->list); ph2c->cmdcode = GEN_CMD_CODE(_GetRaTable); ph2c->parmbuf = (unsigned char *)pgetrttblparm; ph2c->cmdsz = sizeof(struct getratable_parm); diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index a763dc7..5ddf16f 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -83,7 +83,7 @@ int _rtw_init_mlme_priv (struct adapter *padapter) pnetwork = (struct wlan_network *)pbuf; for (i = 0; i < MAX_BSS_CNT; i++) { - _rtw_init_listhead(&(pnetwork->list)); + INIT_LIST_HEAD(&(pnetwork->list)); rtw_list_insert_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue)); @@ -1790,7 +1790,7 @@ int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv) pcmd->cmdsz = (sizeof(struct setauth_parm)); pcmd->rsp = NULL; pcmd->rspsz = 0; - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("after enqueue set_auth_cmd, auth_mode=%x\n", psecuritypriv->dot11AuthAlgrthm)); @@ -1874,7 +1874,7 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in pcmd->cmdsz = (sizeof(struct setkey_parm)); pcmd->rsp = NULL; pcmd->rspsz = 0; - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); res = rtw_enqueue_cmd(pcmdpriv, pcmd); exit: diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 5005361..d1c346c 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -7015,7 +7015,7 @@ void report_survey_event(struct adapter *padapter, union recv_frame *precv_frame return; } - _rtw_init_listhead(&pcmd_obj->list); + INIT_LIST_HEAD(&pcmd_obj->list); pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); pcmd_obj->cmdsz = cmdsz; @@ -7067,7 +7067,7 @@ void report_surveydone_event(struct adapter *padapter) return; } - _rtw_init_listhead(&pcmd_obj->list); + INIT_LIST_HEAD(&pcmd_obj->list); pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); pcmd_obj->cmdsz = cmdsz; @@ -7113,7 +7113,7 @@ void report_join_res(struct adapter *padapter, int res) return; } - _rtw_init_listhead(&pcmd_obj->list); + INIT_LIST_HEAD(&pcmd_obj->list); pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); pcmd_obj->cmdsz = cmdsz; @@ -7164,7 +7164,7 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi return; } - _rtw_init_listhead(&pcmd_obj->list); + INIT_LIST_HEAD(&pcmd_obj->list); pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); pcmd_obj->cmdsz = cmdsz; @@ -7218,7 +7218,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int return; } - _rtw_init_listhead(&pcmd_obj->list); + INIT_LIST_HEAD(&pcmd_obj->list); pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); pcmd_obj->cmdsz = cmdsz; diff --git a/core/rtw_mp.c b/core/rtw_mp.c index cd76ae2..591a033 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -966,7 +966,7 @@ void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv) pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf; for (i = 0; i < num_xmit_extbuf; i++) { - _rtw_init_listhead(&pxmitbuf->list); + INIT_LIST_HEAD(&pxmitbuf->list); pxmitbuf->priv_data = NULL; pxmitbuf->padapter = padapter; diff --git a/core/rtw_recv.c b/core/rtw_recv.c index e856dc7..384c6e9 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -86,7 +86,7 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) precvframe = (union recv_frame *)precvpriv->precv_frame_buf; for (i = 0; i < NR_RECVFRAME; i++) { - _rtw_init_listhead(&(precvframe->u.list)); + INIT_LIST_HEAD(&(precvframe->u.list)); rtw_list_insert_tail(&(precvframe->u.list), &(precvpriv->free_recv_queue.queue)); @@ -184,7 +184,7 @@ union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue) void rtw_init_recvframe(union recv_frame *precvframe, struct recv_priv *precvpriv) { /* Perry: This can be removed */ - _rtw_init_listhead(&precvframe->u.hdr.list); + INIT_LIST_HEAD(&precvframe->u.hdr.list); precvframe->u.hdr.len = 0; } diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 761409b..59e6b1c 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -32,8 +32,8 @@ static void _rtw_init_stainfo(struct sta_info *psta) memset((u8 *)psta, 0, sizeof (struct sta_info)); spin_lock_init(&psta->lock); - _rtw_init_listhead(&psta->list); - _rtw_init_listhead(&psta->hash_list); + INIT_LIST_HEAD(&psta->list); + INIT_LIST_HEAD(&psta->hash_list); _rtw_init_queue(&psta->sleep_q); psta->sleepq_len = 0; @@ -42,9 +42,9 @@ static void _rtw_init_stainfo(struct sta_info *psta) #ifdef CONFIG_88EU_AP_MODE - _rtw_init_listhead(&psta->asoc_list); + INIT_LIST_HEAD(&psta->asoc_list); - _rtw_init_listhead(&psta->auth_list); + INIT_LIST_HEAD(&psta->auth_list); psta->expire_to = 0; @@ -97,7 +97,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) for (i = 0; i < NUM_STA; i++) { _rtw_init_stainfo(psta); - _rtw_init_listhead(&(pstapriv->sta_hash[i])); + INIT_LIST_HEAD(&(pstapriv->sta_hash[i])); rtw_list_insert_tail(&psta->list, get_list_head(&pstapriv->free_sta_queue)); @@ -109,8 +109,8 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) pstapriv->sta_dz_bitmap = 0; pstapriv->tim_bitmap = 0; - _rtw_init_listhead(&pstapriv->asoc_list); - _rtw_init_listhead(&pstapriv->auth_list); + INIT_LIST_HEAD(&pstapriv->asoc_list); + INIT_LIST_HEAD(&pstapriv->auth_list); spin_lock_init(&pstapriv->asoc_list_lock); spin_lock_init(&pstapriv->auth_list_lock); pstapriv->asoc_list_cnt = 0; diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 0fdce54..4cb401b 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -33,7 +33,7 @@ static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 }; static void _init_txservq(struct tx_servq *ptxservq) { - _rtw_init_listhead(&ptxservq->tx_pending); + INIT_LIST_HEAD(&ptxservq->tx_pending); _rtw_init_queue(&ptxservq->sta_pending); ptxservq->qcnt = 0; @@ -48,8 +48,8 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv) _init_txservq(&psta_xmitpriv->bk_q); _init_txservq(&psta_xmitpriv->vi_q); _init_txservq(&psta_xmitpriv->vo_q); - _rtw_init_listhead(&psta_xmitpriv->legacy_dz); - _rtw_init_listhead(&psta_xmitpriv->apsd); + INIT_LIST_HEAD(&psta_xmitpriv->legacy_dz); + INIT_LIST_HEAD(&psta_xmitpriv->apsd); } @@ -103,7 +103,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxframe = (struct xmit_frame *)pxmitpriv->pxmit_frame_buf; for (i = 0; i < NR_XMITFRAME; i++) { - _rtw_init_listhead(&(pxframe->list)); + INIT_LIST_HEAD(&(pxframe->list)); pxframe->padapter = padapter; pxframe->frame_tag = NULL_FRAMETAG; @@ -141,7 +141,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf; for (i = 0; i < NR_XMITBUFF; i++) { - _rtw_init_listhead(&pxmitbuf->list); + INIT_LIST_HEAD(&pxmitbuf->list); pxmitbuf->priv_data = NULL; pxmitbuf->padapter = padapter; @@ -181,7 +181,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf; for (i = 0; i < num_xmit_extbuf; i++) { - _rtw_init_listhead(&pxmitbuf->list); + INIT_LIST_HEAD(&pxmitbuf->list); pxmitbuf->priv_data = NULL; pxmitbuf->padapter = padapter; diff --git a/hal/rtl8188eu_recv.c b/hal/rtl8188eu_recv.c index c3472e9..ab0853c 100644 --- a/hal/rtl8188eu_recv.c +++ b/hal/rtl8188eu_recv.c @@ -73,7 +73,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) precvbuf = (struct recv_buf *)precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { - _rtw_init_listhead(&precvbuf->list); + INIT_LIST_HEAD(&precvbuf->list); spin_lock_init(&precvbuf->recvbuf_lock); precvbuf->alloc_sz = MAX_RECVBUF_SZ; res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf); diff --git a/hal/usb_ops_linux.c b/hal/usb_ops_linux.c index 6fa00a9..b606399 100644 --- a/hal/usb_ops_linux.c +++ b/hal/usb_ops_linux.c @@ -340,7 +340,7 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) goto _exit_recvbuf2recvframe; } - _rtw_init_listhead(&precvframe->u.hdr.list); + INIT_LIST_HEAD(&precvframe->u.hdr.list); precvframe->u.hdr.precvbuf = NULL; /* can't access the precvbuf for new arch. */ precvframe->u.hdr.len = 0; diff --git a/include/osdep_service.h b/include/osdep_service.h index d605ae0..66d5099 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -260,7 +260,6 @@ void rtw_mfree2d(void *pbuf, int h, int w, int size); int _rtw_memcmp(void *dst, void *src, u32 sz); -void _rtw_init_listhead(struct list_head *list); u32 rtw_is_list_empty(struct list_head *phead); void rtw_list_insert_head(struct list_head *plist, struct list_head *phead); void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead); diff --git a/include/rtw_cmd.h b/include/rtw_cmd.h index 8cafd7a..357e732 100644 --- a/include/rtw_cmd.h +++ b/include/rtw_cmd.h @@ -77,7 +77,7 @@ struct evt_priv { #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \ do {\ - _rtw_init_listhead(&pcmd->list);\ + INIT_LIST_HEAD(&pcmd->list);\ pcmd->cmdcode = code;\ pcmd->parmbuf = (u8 *)(pparm);\ pcmd->cmdsz = sizeof(*pparm);\ diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index 16547f4..7b87a98 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -4875,7 +4875,7 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid) pcmd->rsp = NULL; pcmd->rspsz = 0; - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); res = rtw_enqueue_cmd(pcmdpriv, pcmd); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index f5438a9..a2dca7b 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -123,11 +123,6 @@ int _rtw_memcmp(void *dst, void *src, u32 sz) return false; } -void _rtw_init_listhead(struct list_head *list) -{ - INIT_LIST_HEAD(list); -} - /* For the following list_xxx operations, caller must guarantee the atomic context. @@ -188,7 +183,7 @@ void _rtw_spinlock_free(spinlock_t *plock) void _rtw_init_queue(struct __queue *pqueue) { - _rtw_init_listhead(&(pqueue->queue)); + INIT_LIST_HEAD(&(pqueue->queue)); spin_lock_init(&(pqueue->lock)); }