From 7a75f128ba64fbfe7613fd9887ba6891e9ce7649 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 21 Dec 2018 21:36:02 -0600 Subject: [PATCH] rtl98188eu: On Linux, _rtw_spinlock_free() is a no-op Remove all such calls. Signed-off-by: Larry Finger --- core/rtw_ap.c | 4 ---- core/rtw_cmd.c | 3 --- core/rtw_mlme.c | 4 ---- core/rtw_recv.c | 9 --------- core/rtw_sta_mgt.c | 38 -------------------------------------- core/rtw_tdls.c | 4 ---- core/rtw_wlan_util.c | 1 - core/rtw_xmit.c | 15 --------------- hal/hal_com.c | 3 --- hal/hal_intf.c | 3 +-- hal/rtl8188e_dm.c | 1 - include/osdep_service.h | 1 - os_dep/ioctl_cfg80211.c | 1 - os_dep/os_intfs.c | 10 ---------- os_dep/osdep_service.c | 5 ----- 15 files changed, 1 insertion(+), 101 deletions(-) diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 481c2d9..f5ebce0 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -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)); diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 4fc008c..ccf77d2 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -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); diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index dabe10e..abae8a0 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -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) diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 0d045ac..bf6fb43 100755 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -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) diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 1d5e0a0..35d215e 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -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) diff --git a/core/rtw_tdls.c b/core/rtw_tdls.c index 3dc320a..5579b98 100644 --- a/core/rtw_tdls.c +++ b/core/rtw_tdls.c @@ -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) diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index f81fc96..97c6a57 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -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) diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 6b25557..24abbd0 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -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++) { diff --git a/hal/hal_com.c b/hal/hal_com.c index 6397d43..4531a63 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -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) diff --git a/hal/hal_intf.c b/hal/hal_intf.c index 7cde539..8f523ff 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -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) diff --git a/hal/rtl8188e_dm.c b/hal/rtl8188e_dm.c index ba19b60..61dc078 100644 --- a/hal/rtl8188e_dm.c +++ b/hal/rtl8188e_dm.c @@ -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); } diff --git a/include/osdep_service.h b/include/osdep_service.h index f4f1106..c18ef26 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -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); diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index d9312a5..8efcc94 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -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); } diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 195bf30..6708a7c 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -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); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index adb39c7..2d0163d 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -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)