mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-29 15:43:38 +00:00
rtl8188eu: Remove _rtw_spinlock_init
This function is the same as spin_lock_init() Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
9d1d96c95d
commit
d8ced1a187
14 changed files with 26 additions and 48 deletions
|
@ -35,7 +35,7 @@ void init_mlme_ap_info(_adapter *padapter)
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
_rtw_spinlock_init(&pmlmepriv->bcn_update_lock);
|
||||
spin_lock_init(&pmlmepriv->bcn_update_lock);
|
||||
|
||||
/* pmlmeext->bstart_bss = _FALSE; */
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ sint _rtw_init_mlme_priv(_adapter *padapter)
|
|||
pmlmepriv->cur_network.network.InfrastructureMode = Ndis802_11AutoUnknown;
|
||||
pmlmepriv->scan_mode = SCAN_ACTIVE; /* 1: active, 0: pasive. Maybe someday we should rename this varable to "active_mode" (Jeff) */
|
||||
|
||||
_rtw_spinlock_init(&(pmlmepriv->lock));
|
||||
spin_lock_init(&(pmlmepriv->lock));
|
||||
_rtw_init_queue(&(pmlmepriv->free_bss_pool));
|
||||
_rtw_init_queue(&(pmlmepriv->scanned_queue));
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
|
|||
|
||||
_rtw_memset((u8 *)psta_recvpriv, 0, sizeof(struct sta_recv_priv));
|
||||
|
||||
_rtw_spinlock_init(&psta_recvpriv->lock);
|
||||
spin_lock_init(&psta_recvpriv->lock);
|
||||
|
||||
/* for(i=0; i<MAX_RX_NUMBLKS; i++) */
|
||||
/* _rtw_init_queue(&psta_recvpriv->blk_strms[i]); */
|
||||
|
@ -81,7 +81,7 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter)
|
|||
/* We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc(). */
|
||||
/* _rtw_memset((unsigned char *)precvpriv, 0, sizeof (struct recv_priv)); */
|
||||
|
||||
_rtw_spinlock_init(&precvpriv->lock);
|
||||
spin_lock_init(&precvpriv->lock);
|
||||
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
_rtw_init_sema(&precvpriv->recv_sema, 0);
|
||||
|
|
|
@ -169,7 +169,7 @@ void _rtw_init_stainfo(struct sta_info *psta)
|
|||
|
||||
_rtw_memset((u8 *)psta, 0, sizeof(struct sta_info));
|
||||
|
||||
_rtw_spinlock_init(&psta->lock);
|
||||
spin_lock_init(&psta->lock);
|
||||
_rtw_init_listhead(&psta->list);
|
||||
_rtw_init_listhead(&psta->hash_list);
|
||||
/* _rtw_init_listhead(&psta->asoc_list); */
|
||||
|
@ -239,7 +239,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
|||
|
||||
_rtw_init_queue(&pstapriv->free_sta_queue);
|
||||
|
||||
_rtw_spinlock_init(&pstapriv->sta_hash_lock);
|
||||
spin_lock_init(&pstapriv->sta_hash_lock);
|
||||
|
||||
/* _rtw_init_queue(&pstapriv->asoc_q); */
|
||||
pstapriv->asoc_sta_count = 0;
|
||||
|
@ -268,8 +268,8 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
|||
|
||||
_rtw_init_listhead(&pstapriv->asoc_list);
|
||||
_rtw_init_listhead(&pstapriv->auth_list);
|
||||
_rtw_spinlock_init(&pstapriv->asoc_list_lock);
|
||||
_rtw_spinlock_init(&pstapriv->auth_list_lock);
|
||||
spin_lock_init(&pstapriv->asoc_list_lock);
|
||||
spin_lock_init(&pstapriv->auth_list_lock);
|
||||
pstapriv->asoc_list_cnt = 0;
|
||||
pstapriv->auth_list_cnt = 0;
|
||||
|
||||
|
@ -1154,7 +1154,7 @@ void rtw_pre_link_sta_ctl_init(struct sta_priv *stapriv)
|
|||
struct pre_link_sta_ctl_t *pre_link_sta_ctl = &stapriv->pre_link_sta_ctl;
|
||||
int i;
|
||||
|
||||
_rtw_spinlock_init(&pre_link_sta_ctl->lock);
|
||||
spin_lock_init(&pre_link_sta_ctl->lock);
|
||||
pre_link_sta_ctl->num = 0;
|
||||
for (i = 0; i < RTW_PRE_LINK_STA_NUM; i++)
|
||||
pre_link_sta_ctl->node[i].valid = _FALSE;
|
||||
|
|
|
@ -78,8 +78,8 @@ int rtw_init_tdls_info(_adapter *padapter)
|
|||
ptdlsinfo->driver_setup = _FALSE;
|
||||
#endif /* CONFIG_TDLS_DRIVER_SETUP */
|
||||
|
||||
_rtw_spinlock_init(&ptdlsinfo->cmd_lock);
|
||||
_rtw_spinlock_init(&ptdlsinfo->hdl_lock);
|
||||
spin_lock_init(&ptdlsinfo->cmd_lock);
|
||||
spin_lock_init(&ptdlsinfo->hdl_lock);
|
||||
|
||||
return res;
|
||||
|
||||
|
|
|
@ -3891,7 +3891,7 @@ inline void rtw_macid_ctl_set_rate_bmp1(struct macid_ctl_t *macid_ctl, u8 id, u3
|
|||
|
||||
inline void rtw_macid_ctl_init(struct macid_ctl_t *macid_ctl)
|
||||
{
|
||||
_rtw_spinlock_init(&macid_ctl->lock);
|
||||
spin_lock_init(&macid_ctl->lock);
|
||||
}
|
||||
|
||||
inline void rtw_macid_ctl_deinit(struct macid_ctl_t *macid_ctl)
|
||||
|
|
|
@ -44,7 +44,7 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
|
|||
|
||||
_rtw_memset((unsigned char *)psta_xmitpriv, 0, sizeof(struct sta_xmit_priv));
|
||||
|
||||
_rtw_spinlock_init(&psta_xmitpriv->lock);
|
||||
spin_lock_init(&psta_xmitpriv->lock);
|
||||
|
||||
/* for(i = 0 ; i < MAX_NUMBLKS; i++) */
|
||||
/* _init_txservq(&(psta_xmitpriv->blk_q[i])); */
|
||||
|
@ -70,8 +70,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
/* We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc(). */
|
||||
/* _rtw_memset((unsigned char *)pxmitpriv, 0, sizeof(struct xmit_priv)); */
|
||||
|
||||
_rtw_spinlock_init(&pxmitpriv->lock);
|
||||
_rtw_spinlock_init(&pxmitpriv->lock_sctx);
|
||||
spin_lock_init(&pxmitpriv->lock);
|
||||
spin_lock_init(&pxmitpriv->lock_sctx);
|
||||
_rtw_init_sema(&pxmitpriv->xmit_sema, 0);
|
||||
_rtw_init_sema(&pxmitpriv->terminate_xmitthread_sema, 0);
|
||||
|
||||
|
@ -3888,7 +3888,7 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry)
|
|||
{
|
||||
sint i;
|
||||
for (i = 0; i < entry; i++, phwxmit++) {
|
||||
/* _rtw_spinlock_init(&phwxmit->xmit_lock); */
|
||||
/* spin_lock_init(&phwxmit->xmit_lock); */
|
||||
/* _rtw_init_listhead(&phwxmit->pending); */
|
||||
/* phwxmit->txcmdcnt = 0; */
|
||||
phwxmit->accnt = 0;
|
||||
|
|
|
@ -2073,7 +2073,7 @@ void rtw_mbid_cam_init(struct dvobj_priv *dvobj)
|
|||
{
|
||||
struct mbid_cam_ctl_t *mbid_cam_ctl = &dvobj->mbid_cam_ctl;
|
||||
|
||||
_rtw_spinlock_init(&mbid_cam_ctl->lock);
|
||||
spin_lock_init(&mbid_cam_ctl->lock);
|
||||
mbid_cam_ctl->bitmap = 0;
|
||||
ATOMIC_SET(&mbid_cam_ctl->mbid_entry_num, 0);
|
||||
_rtw_memset(&dvobj->mbid_cam_cache, 0, sizeof(dvobj->mbid_cam_cache));
|
||||
|
|
|
@ -80,7 +80,7 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
|||
for (i = 0; i < NR_RECVBUFF ; i++) {
|
||||
_rtw_init_listhead(&precvbuf->list);
|
||||
|
||||
_rtw_spinlock_init(&precvbuf->recvbuf_lock);
|
||||
spin_lock_init(&precvbuf->recvbuf_lock);
|
||||
|
||||
precvbuf->alloc_sz = MAX_RECVBUF_SZ;
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ void rtw_hal_dm_init(_adapter *padapter)
|
|||
|
||||
padapter->hal_func.dm_init(padapter);
|
||||
|
||||
_rtw_spinlock_init(&pHalData->IQKSpinLock);
|
||||
spin_lock_init(&pHalData->IQKSpinLock);
|
||||
|
||||
phy_load_tx_power_ext_info(padapter, 1);
|
||||
}
|
||||
|
|
|
@ -304,9 +304,6 @@ extern void _rtw_up_sema(_sema *sema);
|
|||
extern u32 _rtw_down_sema(_sema *sema);
|
||||
extern void _rtw_mutex_init(_mutex *pmutex);
|
||||
extern void _rtw_mutex_free(_mutex *pmutex);
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void _rtw_spinlock_init(_lock *plock);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
extern void _rtw_spinlock_free(_lock *plock);
|
||||
extern void _rtw_spinlock(_lock *plock);
|
||||
extern void _rtw_spinunlock(_lock *plock);
|
||||
|
|
|
@ -7072,7 +7072,7 @@ int rtw_wdev_alloc(_adapter *padapter, struct wiphy *wiphy)
|
|||
pwdev_priv->ifname_mon[0] = '\0';
|
||||
pwdev_priv->padapter = padapter;
|
||||
pwdev_priv->scan_request = NULL;
|
||||
_rtw_spinlock_init(&pwdev_priv->scan_req_lock);
|
||||
spin_lock_init(&pwdev_priv->scan_req_lock);
|
||||
|
||||
pwdev_priv->p2p_enabled = _FALSE;
|
||||
pwdev_priv->probe_resp_ie_update_time = rtw_get_current_time();
|
||||
|
|
|
@ -1816,10 +1816,10 @@ struct dvobj_priv *devobj_init(void)
|
|||
ATOMIC_SET(&pdvobj->disable_func, 0);
|
||||
|
||||
rtw_macid_ctl_init(&pdvobj->macid_ctl);
|
||||
_rtw_spinlock_init(&pdvobj->cam_ctl.lock);
|
||||
spin_lock_init(&pdvobj->cam_ctl.lock);
|
||||
_rtw_mutex_init(&pdvobj->cam_ctl.sec_cam_access_mutex);
|
||||
#if defined(RTK_129X_PLATFORM) && defined(CONFIG_PCI_HCI)
|
||||
_rtw_spinlock_init(&pdvobj->io_reg_lock);
|
||||
spin_lock_init(&pdvobj->io_reg_lock);
|
||||
#endif
|
||||
#ifdef CONFIG_MBSSID_CAM
|
||||
rtw_mbid_cam_init(pdvobj);
|
||||
|
@ -1846,7 +1846,7 @@ struct dvobj_priv *devobj_init(void)
|
|||
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
_rtw_mutex_init(&(pdvobj->mcc_objpriv.mcc_mutex));
|
||||
_rtw_spinlock_init(&pdvobj->mcc_objpriv.mcc_lock);
|
||||
spin_lock_init(&pdvobj->mcc_objpriv.mcc_lock);
|
||||
#endif /* CONFIG_MCC_MODE */
|
||||
|
||||
return pdvobj;
|
||||
|
@ -2048,7 +2048,7 @@ u8 rtw_init_drv_sw(_adapter *padapter)
|
|||
goto exit;
|
||||
}
|
||||
/* add for CONFIG_IEEE80211W, none 11w also can use */
|
||||
_rtw_spinlock_init(&padapter->security_key_mutex);
|
||||
spin_lock_init(&padapter->security_key_mutex);
|
||||
|
||||
/* We don't need to memset padapter->XXX to zero, because adapter is allocated by rtw_zvmalloc(). */
|
||||
/* _rtw_memset((unsigned char *)&padapter->securitypriv, 0, sizeof (struct security_priv)); */
|
||||
|
@ -2110,7 +2110,7 @@ u8 rtw_init_drv_sw(_adapter *padapter)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_BR_EXT
|
||||
_rtw_spinlock_init(&padapter->br_ext_lock);
|
||||
spin_lock_init(&padapter->br_ext_lock);
|
||||
#endif /* CONFIG_BR_EXT */
|
||||
|
||||
#ifdef CONFIG_BEAMFORMING
|
||||
|
|
|
@ -1213,25 +1213,6 @@ void _rtw_mutex_free(_mutex *pmutex)
|
|||
#endif
|
||||
}
|
||||
|
||||
void _rtw_spinlock_init(_lock *plock)
|
||||
{
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
spin_lock_init(plock);
|
||||
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
mtx_init(plock, "", NULL, MTX_DEF | MTX_RECURSE);
|
||||
#endif
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
NdisAllocateSpinLock(plock);
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void _rtw_spinlock_free(_lock *plock)
|
||||
{
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
|
@ -1346,7 +1327,7 @@ void _rtw_spinunlock_ex(_lock *plock)
|
|||
void _rtw_init_queue(_queue *pqueue)
|
||||
{
|
||||
_rtw_init_listhead(&(pqueue->queue));
|
||||
_rtw_spinlock_init(&(pqueue->lock));
|
||||
spin_lock_init(&(pqueue->lock));
|
||||
}
|
||||
|
||||
void _rtw_deinit_queue(_queue *pqueue)
|
||||
|
|
Loading…
Reference in a new issue