rtl8188eu: Remove wrappers around spin_lock() and spin_unlock()

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-12-24 15:25:35 -06:00
parent 45a86628d2
commit 4a5aa7a8b7
5 changed files with 15 additions and 39 deletions

View file

@ -2255,11 +2255,11 @@ u8 rtw_tdls_cmd(_adapter *padapter, u8 *addr, u8 option)
goto exit; goto exit;
} }
_rtw_spinlock(&(padapter->tdlsinfo.cmd_lock)); spin_lock(&(padapter->tdlsinfo.cmd_lock));
if (addr != NULL) if (addr != NULL)
memcpy(TDLSoption->addr, addr, 6); memcpy(TDLSoption->addr, addr, 6);
TDLSoption->option = option; 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)); init_h2fwcmd_w_parm_no_rsp(pcmdobj, TDLSoption, GEN_CMD_CODE(_TDLS));
res = rtw_enqueue_cmd(pcmdpriv, pcmdobj); res = rtw_enqueue_cmd(pcmdpriv, pcmdobj);

View file

@ -316,7 +316,7 @@ sint rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
/* _spinlock(&pfree_recv_queue->lock); */ /* _spinlock(&pfree_recv_queue->lock); */
_enter_critical_bh(&queue->lock, &irqL); _enter_critical_bh(&queue->lock, &irqL);
ret = _rtw_enqueue_recvframe(precvframe, queue); ret = _rtw_enqueue_recvframe(precvframe, queue);
/* _rtw_spinunlock(&pfree_recv_queue->lock); */ /* spin_unlock(&pfree_recv_queue->lock); */
_exit_critical_bh(&queue->lock, &irqL); _exit_critical_bh(&queue->lock, &irqL);
return ret; return ret;
@ -345,7 +345,7 @@ void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue)
union recv_frame *precvframe; union recv_frame *precvframe;
_list *plist, *phead; _list *plist, *phead;
_rtw_spinlock(&pframequeue->lock); spin_lock(&pframequeue->lock);
phead = get_list_head(pframequeue); phead = get_list_head(pframequeue);
plist = get_next(phead); 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_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 */ /* 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); phead = get_list_head(pdefrag_q);
list_add_tail(&pfhdr->list, phead); list_add_tail(&pfhdr->list, phead);
/* _rtw_spinunlock(&pdefrag_q->lock); */ /* spin_unlock(&pdefrag_q->lock); */
prtnframe = NULL; prtnframe = NULL;
@ -2463,10 +2463,10 @@ union recv_frame *recvframe_chk_defrag(PADAPTER padapter, union recv_frame *prec
/* the last fragment frame */ /* the last fragment frame */
/* enqueue the last fragment */ /* enqueue the last fragment */
if (pdefrag_q != NULL) { if (pdefrag_q != NULL) {
/* _rtw_spinlock(&pdefrag_q->lock); */ /* spin_lock(&pdefrag_q->lock); */
phead = get_list_head(pdefrag_q); phead = get_list_head(pdefrag_q);
list_add_tail(&pfhdr->list, phead); list_add_tail(&pfhdr->list, phead);
/* _rtw_spinunlock(&pdefrag_q->lock); */ /* spin_unlock(&pdefrag_q->lock); */
/* call recvframe_defrag to defrag */ /* call recvframe_defrag to defrag */
precv_frame = recvframe_defrag(padapter, pdefrag_q); 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"); */ /* DbgPrint("+enqueue_reorder_recvframe()\n"); */
/* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */ /* _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); 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); */ /* _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_del_init(&(prframe->u.hdr.list));
list_add_tail(&(prframe->u.hdr.list), plist); 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); */ /* _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"); */ /* DbgPrint("+recv_indicatepkts_in_order\n"); */
/* _enter_critical_ex(&ppending_recvframe_queue->lock, &irql); */ /* _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); phead = get_list_head(ppending_recvframe_queue);
plist = get_next(phead); 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++; pdbgpriv->dbg_rx_ampdu_forced_indicate_count++;
if (list_empty(phead)) { if (list_empty(phead)) {
/* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */ /* _exit_critical_ex(&ppending_recvframe_queue->lock, &irql); */
/* _rtw_spinunlock_ex(&ppending_recvframe_queue->lock); */ /* spin_unlock(&ppending_recvframe_queue->lock); */
return true; return true;
} }

View file

@ -277,7 +277,7 @@ void rtl8188e_init_dm_priv(PADAPTER Adapter)
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
struct PHY_DM_STRUCT *podmpriv = &pHalData->odmpriv; 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); Init_ODM_ComInfo_88E(Adapter);
odm_init_all_timers(podmpriv); odm_init_all_timers(podmpriv);

View file

@ -259,10 +259,6 @@ extern void list_del_init(_list *plist);
extern u32 _rtw_down_sema(_sema *sema); extern u32 _rtw_down_sema(_sema *sema);
extern void _rtw_mutex_init(_mutex *pmutex); extern void _rtw_mutex_init(_mutex *pmutex);
extern void _rtw_mutex_free(_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 void _rtw_init_queue(_queue *pqueue);
extern u32 _rtw_queue_empty(_queue *pqueue); extern u32 _rtw_queue_empty(_queue *pqueue);

View file

@ -716,26 +716,6 @@ void _rtw_mutex_free(_mutex *pmutex)
#endif #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) void _rtw_init_queue(_queue *pqueue)
{ {
INIT_LIST_HEAD(&(pqueue->queue)); INIT_LIST_HEAD(&(pqueue->queue));