rtl98188eu: On Linux, _rtw_spinlock_free() is a no-op

Remove all such calls.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-12-21 21:36:02 -06:00
parent 4b2c469f5f
commit 7a75f128ba
15 changed files with 1 additions and 101 deletions

View file

@ -46,8 +46,6 @@ void free_mlme_ap_info(_adapter *padapter)
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
stop_ap_mode(padapter);
_rtw_spinlock_free(&pmlmepriv->bcn_update_lock);
}
static void update_BCNTIM(_adapter *padapter)
@ -3290,9 +3288,7 @@ void stop_ap_mode(_adapter *padapter)
RTW_INFO("%s -"ADPT_FMT"\n", __func__, ADPT_ARG(padapter));
pmlmepriv->update_bcn = false;
/*pmlmeext->bstart_bss = false;*/
padapter->netif_up = false;
/* _rtw_spinlock_free(&pmlmepriv->bcn_update_lock); */
/* reset and init security priv , this can refine with rtw_reset_securitypriv */
memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv));

View file

@ -218,10 +218,7 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv)
void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv)
{
if (pcmdpriv) {
_rtw_spinlock_free(&(pcmdpriv->cmd_queue.lock));
if (pcmdpriv->cmd_allocated_buf)
rtw_mfree(pcmdpriv->cmd_allocated_buf, MAX_CMDSZ + CMDBUFF_ALIGN_SZ);

View file

@ -119,12 +119,8 @@ exit:
return res;
}
void rtw_mfree_mlme_priv_lock(struct mlme_priv *pmlmepriv);
void rtw_mfree_mlme_priv_lock(struct mlme_priv *pmlmepriv)
{
_rtw_spinlock_free(&pmlmepriv->lock);
_rtw_spinlock_free(&(pmlmepriv->free_bss_pool.lock));
_rtw_spinlock_free(&(pmlmepriv->scanned_queue.lock));
}
static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen)

View file

@ -158,15 +158,6 @@ exit:
static void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv)
{
_rtw_spinlock_free(&precvpriv->lock);
_rtw_spinlock_free(&precvpriv->free_recv_queue.lock);
_rtw_spinlock_free(&precvpriv->recv_pending_queue.lock);
_rtw_spinlock_free(&precvpriv->free_recv_buf_queue.lock);
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
_rtw_spinlock_free(&precvpriv->recv_buf_pending_queue.lock);
#endif /* CONFIG_USE_USB_BUFFER_ALLOC_RX */
}
void _rtw_free_recv_priv(struct recv_priv *precvpriv)

View file

@ -313,43 +313,21 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int
return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
}
void _rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv);
void _rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv)
{
_rtw_spinlock_free(&psta_xmitpriv->lock);
_rtw_spinlock_free(&(psta_xmitpriv->be_q.sta_pending.lock));
_rtw_spinlock_free(&(psta_xmitpriv->bk_q.sta_pending.lock));
_rtw_spinlock_free(&(psta_xmitpriv->vi_q.sta_pending.lock));
_rtw_spinlock_free(&(psta_xmitpriv->vo_q.sta_pending.lock));
}
static void _rtw_free_sta_recv_priv_lock(struct sta_recv_priv *psta_recvpriv)
{
_rtw_spinlock_free(&psta_recvpriv->lock);
_rtw_spinlock_free(&(psta_recvpriv->defrag_q.lock));
}
void rtw_mfree_stainfo(struct sta_info *psta);
void rtw_mfree_stainfo(struct sta_info *psta)
{
if (&psta->lock != NULL)
_rtw_spinlock_free(&psta->lock);
_rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv);
_rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv);
}
/* this function is used to free the memory of lock || sema for all stainfos */
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv);
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
{
unsigned long irqL;
@ -378,18 +356,6 @@ void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv);
void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv)
{
rtw_mfree_all_stainfo(pstapriv); /* be done before free sta_hash_lock */
_rtw_spinlock_free(&pstapriv->free_sta_queue.lock);
_rtw_spinlock_free(&pstapriv->sta_hash_lock);
_rtw_spinlock_free(&pstapriv->wakeup_q.lock);
_rtw_spinlock_free(&pstapriv->sleep_q.lock);
#ifdef CONFIG_AP_MODE
_rtw_spinlock_free(&pstapriv->asoc_list_lock);
_rtw_spinlock_free(&pstapriv->auth_list_lock);
#endif
}
u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
@ -757,8 +723,6 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
rtw_st_ctl_deinit(&psta->st_ctl);
if (is_pre_link_sta == false) {
_rtw_spinlock_free(&psta->lock);
/* _enter_critical_bh(&(pfree_sta_queue->lock), &irqL0); */
_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL0);
list_add_tail(&psta->list, get_list_head(pfree_sta_queue));
@ -1154,8 +1118,6 @@ void rtw_pre_link_sta_ctl_deinit(struct sta_priv *stapriv)
int i;
rtw_pre_link_sta_ctl_reset(stapriv);
_rtw_spinlock_free(&pre_link_sta_ctl->lock);
}
void dump_pre_link_sta_ctl(void *sel, struct sta_priv *stapriv)

View file

@ -87,11 +87,7 @@ int rtw_init_tdls_info(_adapter *padapter)
void rtw_free_tdls_info(struct tdls_info *ptdlsinfo)
{
_rtw_spinlock_free(&ptdlsinfo->cmd_lock);
_rtw_spinlock_free(&ptdlsinfo->hdl_lock);
memset(ptdlsinfo, 0, sizeof(struct tdls_info));
}
int check_ap_tdls_prohibited(u8 *pframe, u8 pkt_len)

View file

@ -3504,7 +3504,6 @@ inline void rtw_macid_ctl_init(struct macid_ctl_t *macid_ctl)
inline void rtw_macid_ctl_deinit(struct macid_ctl_t *macid_ctl)
{
_rtw_spinlock_free(&macid_ctl->lock);
}
_adapter *dvobj_get_port0_adapter(struct dvobj_priv *dvobj)

View file

@ -309,19 +309,8 @@ exit:
return res;
}
void rtw_mfree_xmit_priv_lock(struct xmit_priv *pxmitpriv);
void rtw_mfree_xmit_priv_lock(struct xmit_priv *pxmitpriv)
{
_rtw_spinlock_free(&pxmitpriv->lock);
_rtw_spinlock_free(&pxmitpriv->be_pending.lock);
_rtw_spinlock_free(&pxmitpriv->bk_pending.lock);
_rtw_spinlock_free(&pxmitpriv->vi_pending.lock);
_rtw_spinlock_free(&pxmitpriv->vo_pending.lock);
_rtw_spinlock_free(&pxmitpriv->bm_pending.lock);
_rtw_spinlock_free(&pxmitpriv->free_xmit_queue.lock);
_rtw_spinlock_free(&pxmitpriv->free_xmitbuf_queue.lock);
_rtw_spinlock_free(&pxmitpriv->pending_xmitbuf_queue.lock);
}
void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
@ -365,10 +354,6 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)
}
if (pxmitpriv->xframe_ext_alloc_addr)
rtw_vmfree(pxmitpriv->xframe_ext_alloc_addr, NR_XMIT_EXTBUFF * sizeof(struct xmit_frame) + 4);
_rtw_spinlock_free(&pxmitpriv->free_xframe_ext_queue.lock);
/* free xmit extension buff */
_rtw_spinlock_free(&pxmitpriv->free_xmit_extbuf_queue.lock);
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
for (i = 0; i < NR_XMIT_EXTBUFF; i++) {

View file

@ -2059,9 +2059,6 @@ void rtw_mbid_cam_init(struct dvobj_priv *dvobj)
void rtw_mbid_cam_deinit(struct dvobj_priv *dvobj)
{
struct mbid_cam_ctl_t *mbid_cam_ctl = &dvobj->mbid_cam_ctl;
_rtw_spinlock_free(&mbid_cam_ctl->lock);
}
void rtw_mbid_cam_reset(_adapter *adapter)

View file

@ -150,10 +150,9 @@ void rtw_hal_dm_deinit(_adapter *padapter)
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(padapter);
padapter->hal_func.dm_deinit(padapter);
_rtw_spinlock_free(&pHalData->IQKSpinLock);
}
}
void rtw_hal_sw_led_init(_adapter *padapter)
{
if (padapter->hal_func.InitSwLeds)

View file

@ -287,6 +287,5 @@ void rtl8188e_deinit_dm_priv(PADAPTER Adapter)
{
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
struct PHY_DM_STRUCT *podmpriv = &pHalData->odmpriv;
/* _rtw_spinlock_free(&pHalData->odm_stainfo_lock); */
odm_cancel_all_timers(podmpriv);
}

View file

@ -259,7 +259,6 @@ extern void list_del_init(_list *plist);
extern u32 _rtw_down_sema(_sema *sema);
extern void _rtw_mutex_init(_mutex *pmutex);
extern void _rtw_mutex_free(_mutex *pmutex);
extern void _rtw_spinlock_free(_lock *plock);
extern void _rtw_spinlock(_lock *plock);
extern void _rtw_spinunlock(_lock *plock);
extern void _rtw_spinlock_ex(_lock *plock);

View file

@ -6953,7 +6953,6 @@ void rtw_wdev_free(struct wireless_dev *wdev)
_adapter *adapter = (_adapter *)rtw_netdev_priv(wdev_to_ndev(wdev));
struct rtw_wdev_priv *wdev_priv = adapter_wdev_data(adapter);
_rtw_spinlock_free(&wdev_priv->scan_req_lock);
_rtw_mutex_free(&wdev_priv->roch_mutex);
}

View file

@ -1789,7 +1789,6 @@ void devobj_deinit(struct dvobj_priv *pdvobj)
#ifdef CONFIG_MCC_MODE
_rtw_mutex_free(&(pdvobj->mcc_objpriv.mcc_mutex));
_rtw_spinlock_free(&pdvobj->mcc_objpriv.mcc_lock);
#endif /* CONFIG_MCC_MODE */
_rtw_mutex_free(&pdvobj->hw_init_mutex);
@ -1807,15 +1806,12 @@ void devobj_deinit(struct dvobj_priv *pdvobj)
#endif
rtw_macid_ctl_deinit(&pdvobj->macid_ctl);
_rtw_spinlock_free(&pdvobj->cam_ctl.lock);
_rtw_mutex_free(&pdvobj->cam_ctl.sec_cam_access_mutex);
#ifdef CONFIG_MBSSID_CAM
rtw_mbid_cam_deinit(pdvobj);
#endif
_rtw_spinlock_free(&(pdvobj->ap_if_q.lock));
rtw_mfree((u8 *)pdvobj, sizeof(*pdvobj));
}
@ -2131,12 +2127,6 @@ u8 rtw_free_drv_sw(_adapter *padapter)
}
}
#endif
/* add for CONFIG_IEEE80211W, none 11w also can use */
_rtw_spinlock_free(&padapter->security_key_mutex);
#ifdef CONFIG_BR_EXT
_rtw_spinlock_free(&padapter->br_ext_lock);
#endif /* CONFIG_BR_EXT */
#ifdef CONFIG_INTEL_WIDI
rtw_free_intel_widi(padapter);

View file

@ -716,10 +716,6 @@ void _rtw_mutex_free(_mutex *pmutex)
#endif
}
void _rtw_spinlock_free(_lock *plock)
{
}
void _rtw_spinlock(_lock *plock)
{
spin_lock(plock);
@ -748,7 +744,6 @@ void _rtw_init_queue(_queue *pqueue)
void _rtw_deinit_queue(_queue *pqueue)
{
_rtw_spinlock_free(&(pqueue->lock));
}
u32 _rtw_queue_empty(_queue *pqueue)