From 4a5aa7a8b72e48ede64c9b727e649aab69232c4e Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 24 Dec 2018 15:25:35 -0600 Subject: [PATCH] rtl8188eu: Remove wrappers around spin_lock() and spin_unlock() Signed-off-by: Larry Finger --- core/rtw_cmd.c | 4 ++-- core/rtw_recv.c | 24 ++++++++++++------------ hal/rtl8188e_dm.c | 2 +- include/osdep_service.h | 4 ---- os_dep/osdep_service.c | 20 -------------------- 5 files changed, 15 insertions(+), 39 deletions(-) diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index eda101c..72f842c 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -2255,11 +2255,11 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option) goto exit; } - _rtw_spinlock(&(padapter->tdlsinfo.cmd_lock)); + spin_lock(&(padapter->tdlsinfo.cmd_lock)); if (addr != NULL) memcpy(TDLSoption->addr, addr, 6); TDLSoption->option = option; - _rtw_spinunlock(&(padapter->tdlsinfo.cmd_lock)); + spin_unlock(&(padapter->tdlsinfo.cmd_lock)); init_h2fwcmd_w_parm_no_rsp(pcmdobj, TDLSoption, GEN_CMD_CODE(_TDLS)); res = rtw_enqueue_cmd(pcmdpriv, pcmdobj); diff --git a/core/rtw_recv.c b/core/rtw_recv.c index d1d2b78..fa83dba 100755 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -316,7 +316,7 @@ sint rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue) /* _spinlock(&pfree_recv_queue->lock); */ _enter_critical_bh(&queue->lock, &irqL); ret = _rtw_enqueue_recvframe(precvframe, queue); - /* _rtw_spinunlock(&pfree_recv_queue->lock); */ + /* spin_unlock(&pfree_recv_queue->lock); */ _exit_critical_bh(&queue->lock, &irqL); return ret; @@ -345,7 +345,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue) union recv_frame *precvframe; _list *plist, *phead; - _rtw_spinlock(&pframequeue->lock); + spin_lock(&pframequeue->lock); phead = get_list_head(pframequeue); plist = get_next(phead); @@ -360,7 +360,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue) rtw_free_recvframe(precvframe, pfree_recv_queue); } - _rtw_spinunlock(&pframequeue->lock); + spin_unlock(&pframequeue->lock); } @@ -2443,10 +2443,10 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec /* Then enqueue the 0~(n-1) fragment into the defrag_q */ - /* _rtw_spinlock(&pdefrag_q->lock); */ + /* spin_lock(&pdefrag_q->lock); */ phead = get_list_head(pdefrag_q); list_add_tail(&pfhdr->list, phead); - /* _rtw_spinunlock(&pdefrag_q->lock); */ + /* spin_unlock(&pdefrag_q->lock); */ prtnframe = NULL; @@ -2463,10 +2463,10 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec /* the last fragment frame */ /* enqueue the last fragment */ if (pdefrag_q != NULL) { - /* _rtw_spinlock(&pdefrag_q->lock); */ + /* spin_lock(&pdefrag_q->lock); */ phead = get_list_head(pdefrag_q); list_add_tail(&pfhdr->list, phead); - /* _rtw_spinunlock(&pdefrag_q->lock); */ + /* spin_unlock(&pdefrag_q->lock); */ /* call recvframe_defrag to defrag */ precv_frame = recvframe_defrag(padapter, pdefrag_q); @@ -2641,7 +2641,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un /* DbgPrint("+enqueue_reorder_recvframe()\n"); */ /* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */ - /* _rtw_spinlock_ex(&ppending_recvframe_queue->lock); */ + /* spin_lock(&ppending_recvframe_queue->lock); */ phead = get_list_head(ppending_recvframe_queue); @@ -2668,13 +2668,13 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un /* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */ - /* _rtw_spinlock_ex(&ppending_recvframe_queue->lock); */ + /* spin_lock(&ppending_recvframe_queue->lock); */ list_del_init(&(prframe->u.hdr.list)); list_add_tail(&(prframe->u.hdr.list), plist); - /* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */ + /* spin_unlock(&ppending_recvframe_queue->lock); */ /* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */ @@ -2711,7 +2711,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre /* DbgPrint("+recv_indicatepkts_in_order\n"); */ /* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */ - /* _rtw_spinlock_ex(&ppending_recvframe_queue->lock); */ + /* spin_lock(&ppending_recvframe_queue->lock); */ phead = get_list_head(ppending_recvframe_queue); plist = get_next(phead); @@ -2721,7 +2721,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre pdbgpriv->dbg_rx_ampdu_forced_indicate_count++; if (list_empty(phead)) { /* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */ - /* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */ + /* spin_unlock(&ppending_recvframe_queue->lock); */ return true; } diff --git a/hal/rtl8188e_dm.c b/hal/rtl8188e_dm.c index 61dc078..9fac373 100644 --- a/hal/rtl8188e_dm.c +++ b/hal/rtl8188e_dm.c @@ -277,7 +277,7 @@ void rtl8188e_init_dm_priv(PADAPTER Adapter) PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); struct PHY_DM_STRUCT *podmpriv = &pHalData->odmpriv; - /* _rtw_spinlock_init(&(pHalData->odm_stainfo_lock)); */ + /* spin_lock_init(&(pHalData->odm_stainfo_lock)); */ Init_ODM_ComInfo_88E(Adapter); odm_init_all_timers(podmpriv); diff --git a/include/osdep_service.h b/include/osdep_service.h index f3ec69f..efde90c 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -259,10 +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(_lock *plock); -extern void _rtw_spinunlock(_lock *plock); -extern void _rtw_spinlock_ex(_lock *plock); -extern void _rtw_spinunlock_ex(_lock *plock); extern void _rtw_init_queue(_queue *pqueue); extern u32 _rtw_queue_empty(_queue *pqueue); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 07cf2ad..2366246 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -716,26 +716,6 @@ void _rtw_mutex_free(_mutex *pmutex) #endif } -void _rtw_spinlock(_lock *plock) -{ - spin_lock(plock); -} - -void _rtw_spinunlock(_lock *plock) -{ - spin_unlock(plock); -} - -void _rtw_spinlock_ex(_lock *plock) -{ - spin_lock(plock); -} - -void _rtw_spinunlock_ex(_lock *plock) -{ - spin_unlock(plock); -} - void _rtw_init_queue(_queue *pqueue) { INIT_LIST_HEAD(&(pqueue->queue));