mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 00:24:20 +00:00
rtl8188eu: Remove wrappers around spin_lock_bh and spin_unlock_bh
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
dc4dbd3a7c
commit
c0ef452bab
19 changed files with 389 additions and 604 deletions
|
@ -206,18 +206,13 @@ sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj)
|
|||
if (obj == NULL)
|
||||
goto exit;
|
||||
|
||||
/* _enter_critical_bh(&queue->lock, &irqL); */
|
||||
_enter_critical(&queue->lock, &irqL);
|
||||
|
||||
rtw_list_insert_tail(&obj->list, &queue->queue);
|
||||
|
||||
/* _exit_critical_bh(&queue->lock, &irqL); */
|
||||
_exit_critical(&queue->lock, &irqL);
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -228,7 +223,6 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
|||
|
||||
;
|
||||
|
||||
/* _enter_critical_bh(&(queue->lock), &irqL); */
|
||||
_enter_critical(&queue->lock, &irqL);
|
||||
if (rtw_is_list_empty(&(queue->queue)))
|
||||
obj = NULL;
|
||||
|
@ -238,11 +232,7 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
|||
rtw_list_delete(&obj->list);
|
||||
}
|
||||
|
||||
/* _exit_critical_bh(&(queue->lock), &irqL); */
|
||||
_exit_critical(&queue->lock, &irqL);
|
||||
|
||||
;
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
@ -561,11 +551,11 @@ u32 rtw_enqueue_evt(struct evt_priv *pevtpriv, struct evt_obj *obj)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
rtw_list_insert_tail(&obj->list, &queue->queue);
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
/* rtw_evt_notify_isr(pevtpriv); */
|
||||
|
||||
|
@ -583,7 +573,7 @@ struct evt_obj *rtw_dequeue_evt(_queue *queue)
|
|||
|
||||
;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
spin_lock_bh(&queue->lock);
|
||||
|
||||
if (rtw_is_list_empty(&(queue->queue)))
|
||||
pevtobj = NULL;
|
||||
|
@ -593,7 +583,7 @@ struct evt_obj *rtw_dequeue_evt(_queue *queue)
|
|||
rtw_list_delete(&pevtobj->list);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
spin_unlock_bh(&queue->lock);
|
||||
|
||||
;
|
||||
|
||||
|
@ -2780,9 +2770,9 @@ void rtw_disassoc_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
|||
|
||||
if (pcmd->res != H2C_SUCCESS)
|
||||
{
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
set_fwstate(pmlmepriv, _FW_LINKED);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_err_,("\n ***Error: disconnect_cmd_callback Fail ***\n."));
|
||||
|
||||
|
@ -2797,11 +2787,9 @@ void rtw_disassoc_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
|||
rtw_free_cmd_obj(pcmd);
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
void rtw_joinbss_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -2819,10 +2807,7 @@ void rtw_joinbss_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
|||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_err_,("********Error:rtw_select_and_join_from_scanned_queue Wait Sema Fail ************\n"));
|
||||
_set_timer(&pmlmepriv->assoc_timer, 1);
|
||||
}
|
||||
|
||||
rtw_free_cmd_obj(pcmd);
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
||||
|
@ -2864,7 +2849,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
|||
pnetwork->IELength = le32_to_cpu(pnetwork->IELength);
|
||||
#endif
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
|
||||
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) )
|
||||
|
@ -2887,14 +2872,14 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
|||
_irqL irqL;
|
||||
|
||||
pwlan = _rtw_alloc_network(pmlmepriv);
|
||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
if ( pwlan == NULL)
|
||||
{
|
||||
pwlan = rtw_get_oldest_wlan_network(&pmlmepriv->scanned_queue);
|
||||
if( pwlan == NULL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_cmd_c_,_drv_err_,("\n Error: can't get pwlan in rtw_joinbss_event_callback \n"));
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
goto createbss_cmd_fail;
|
||||
}
|
||||
pwlan->last_scanned = rtw_get_current_time();
|
||||
|
@ -2918,23 +2903,18 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
|||
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||
/* we will set _FW_LINKED when there is one more sat to join us (rtw_stassoc_event_callback) */
|
||||
|
||||
}
|
||||
|
||||
createbss_cmd_fail:
|
||||
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
rtw_free_cmd_obj(pcmd);
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rtw_setstaKey_cmdrsp_callback(struct adapter* padapter , struct cmd_obj *pcmd)
|
||||
{
|
||||
|
||||
|
@ -2973,13 +2953,13 @@ void rtw_setassocsta_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *
|
|||
|
||||
psta->aid = psta->mac_id = passocsta_rsp->cam_id;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) && (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true))
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
set_fwstate(pmlmepriv, _FW_LINKED);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
|
||||
exit:
|
||||
rtw_free_cmd_obj(pcmd);
|
||||
|
@ -2987,7 +2967,6 @@ exit:
|
|||
;
|
||||
}
|
||||
|
||||
void rtw_getrttbl_cmd_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd);
|
||||
void rtw_getrttbl_cmd_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
||||
{
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue