mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2026-04-05 08:59:35 +00:00
Remove wrappers for atomic operations
These wrappers were useful when this driver had the hooks for Windows, but are no longer needed. Link: https://lore.kernel.org/r/20210802192721.23110-4-Larry.Finger@lwfinger.net
This commit is contained in:
committed by
Carlos Garcés
parent
e8b235e056
commit
d7c3737cd5
@@ -139,7 +139,7 @@ sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
||||
#endif
|
||||
|
||||
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
|
||||
ATOMIC_SET(&pevtpriv->event_seq, 0);
|
||||
atomic_set(&pevtpriv->event_seq, 0);
|
||||
pevtpriv->evt_done_cnt = 0;
|
||||
|
||||
#ifdef CONFIG_EVENT_THREAD_MODE
|
||||
@@ -424,11 +424,11 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||
bAllow = _TRUE;
|
||||
|
||||
if ((!rtw_is_hw_init_completed(pcmdpriv->padapter) && (bAllow == _FALSE))
|
||||
|| ATOMIC_READ(&(pcmdpriv->cmdthd_running)) == _FALSE /* com_thread not running */
|
||||
|| atomic_read(&(pcmdpriv->cmdthd_running)) == _FALSE /* com_thread not running */
|
||||
) {
|
||||
if (DBG_CMD_EXECUTE)
|
||||
RTW_INFO(ADPT_FMT" drop "CMD_FMT" hw_init_completed:%u, cmdthd_running:%u\n", ADPT_ARG(cmd_obj->padapter)
|
||||
, CMD_ARG(cmd_obj), rtw_get_hw_init_completed(cmd_obj->padapter), ATOMIC_READ(&pcmdpriv->cmdthd_running));
|
||||
, CMD_ARG(cmd_obj), rtw_get_hw_init_completed(cmd_obj->padapter), atomic_read(&pcmdpriv->cmdthd_running));
|
||||
if (0)
|
||||
rtw_warn_on(1);
|
||||
|
||||
@@ -545,7 +545,7 @@ thread_return rtw_cmd_thread(thread_context context)
|
||||
|
||||
pcmdbuf = pcmdpriv->cmd_buf;
|
||||
prspbuf = pcmdpriv->rsp_buf;
|
||||
ATOMIC_SET(&(pcmdpriv->cmdthd_running), _TRUE);
|
||||
atomic_set(&(pcmdpriv->cmdthd_running), _TRUE);
|
||||
_rtw_up_sema(&pcmdpriv->start_cmdthread_sema);
|
||||
|
||||
|
||||
@@ -702,7 +702,7 @@ post_process:
|
||||
#endif
|
||||
|
||||
/* to avoid enqueue cmd after free all cmd_obj */
|
||||
ATOMIC_SET(&(pcmdpriv->cmdthd_running), _FALSE);
|
||||
atomic_set(&(pcmdpriv->cmdthd_running), _FALSE);
|
||||
|
||||
/* free all cmd_obj resources */
|
||||
do {
|
||||
@@ -3243,8 +3243,8 @@ static void dynamic_update_bcn_check(_adapter *padapter)
|
||||
if (count % 10 == 0) {
|
||||
count = 1;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
if (_FALSE == ATOMIC_READ(&pmlmepriv->olbc)
|
||||
&& _FALSE == ATOMIC_READ(&pmlmepriv->olbc_ht)) {
|
||||
if (_FALSE == atomic_read(&pmlmepriv->olbc)
|
||||
&& _FALSE == atomic_read(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
@@ -3257,16 +3257,16 @@ static void dynamic_update_bcn_check(_adapter *padapter)
|
||||
#ifdef CONFIG_80211N_HT
|
||||
/* In 2s, there are any legacy AP, update HT info, and then reset count */
|
||||
|
||||
if (_FALSE != ATOMIC_READ(&pmlmepriv->olbc)
|
||||
&& _FALSE != ATOMIC_READ(&pmlmepriv->olbc_ht)) {
|
||||
if (_FALSE != atomic_read(&pmlmepriv->olbc)
|
||||
&& _FALSE != atomic_read(&pmlmepriv->olbc_ht)) {
|
||||
|
||||
if (rtw_ht_operation_update(padapter) > 0) {
|
||||
update_beacon(padapter, _HT_CAPABILITY_IE_, NULL, _FALSE);
|
||||
update_beacon(padapter, _HT_ADD_INFO_IE_, NULL, _TRUE);
|
||||
|
||||
}
|
||||
ATOMIC_SET(&pmlmepriv->olbc, _FALSE);
|
||||
ATOMIC_SET(&pmlmepriv->olbc_ht, _FALSE);
|
||||
atomic_set(&pmlmepriv->olbc, _FALSE);
|
||||
atomic_set(&pmlmepriv->olbc_ht, _FALSE);
|
||||
count = 0;
|
||||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
Reference in New Issue
Block a user